k94314517
2025-07-04 50fb58286ed3b718c39a97e0987ee7561a295651
company/src/components/enterprise/onlineReporting.vue
@@ -7,7 +7,7 @@
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <div class="box">
        <div class="box" id="section1">
            <div class="box_status">
                <div class="box_status_row" v-for="(item, index) in statusList" :key="index">
                    <div :class="index <= i ? 'box_status_row_icon statusColor2 statusColor3' : 'box_status_row_icon'">
@@ -162,7 +162,7 @@
                                            <span>{{ item.name }}</span>
                                        </div>
                                    </div>
                                    <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 6)" />
                                    <uploadProgress width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 6)" />
                                </div>
                            </div>
                        </div>
@@ -181,7 +181,7 @@
                            </div>
                            <div class="box_desc_list_row">
                                <el-form-item label="报案人联系方式" prop="informantPhone">
                                    <el-input v-model="form.informantPhone" placeholder="请输入"></el-input>
                                    <el-input v-model="form.informantPhone" type="number" maxlength="11" placeholder="请输入"></el-input>
                                </el-form-item>
                            </div>
                            <div class="box_desc_list_ZW"></div>
@@ -199,7 +199,11 @@
                    </div>
                    <div class="box_item">
                        <div class="box_item_title">
                            <span>理赔材料</span>
                          <div> <span>上传理赔材料</span></div>
                          <div style="float: right">
                            <el-button type="primary" v-if="insurance && insurance.lpStampTempFile && insurance.lpStampTempFile.fileurlFull"   @click="openLinkUrl(insurance.lpStampTempFile.fileurlFull)">盖章文件模版</el-button>
                            <el-button type="primary" v-if="insurance && insurance.lpFile && insurance.lpFile.fileurlFull"   @click="openLinkUrl(insurance.lpFile.fileurlFull)">理赔材料一览表</el-button>
                          </div>
                        </div>
                        <div class="box_item_list">
                            <div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -209,7 +213,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpYggxFileInfo" class="content" v-html="insurance.lpYggxFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.relationFileList" :key="index">
@@ -227,7 +231,7 @@
                                            <span>{{ item.name }}</span>
                                        </div>
                                    </div>
                                    <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 1)" />
                                    <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 1)" />
                                </div>
                            </div>
                            <div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -237,7 +241,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpMzFileInfo" class="content" v-html="insurance.lpMzFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.outpatientFileList" :key="index">
@@ -255,7 +259,7 @@
                                            <span>{{ item.name }}</span>
                                        </div>
                                    </div>
                                    <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 2)" />
                                    <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 2)" />
                                </div>
                            </div>
                            <div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -265,7 +269,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpZyFileInfo" class="content" v-html="insurance.lpZyFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.hospitalFileList" :key="index">
@@ -283,7 +287,7 @@
                                            <span>{{ item.name }}</span>
                                        </div>
                                    </div>
                                    <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 3)" />
                                    <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 3)" />
                                </div>
                            </div>
                            <div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -293,7 +297,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                  <div v-if="insurance && insurance.lpScFileInfo" class="content" v-html="insurance.lpScFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.disabilityFileList" :key="index">
@@ -311,7 +315,7 @@
                                            <span>{{ item.name }}</span>
                                        </div>
                                    </div>
                                    <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 4)" />
                                    <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 4)" />
                                </div>
                            </div>
                            <div class="box_item_list_row" style="width: 100%; margin-bottom: 30px;">
@@ -321,7 +325,7 @@
                                </div>
                                <div class="box_item_list_row_info">
                                    <div class="label">文件上传说明:</div>
                                    <div class="content">需上传的文件:劳动合同复印件、工资流水、考勤记录、身份证正反面、;</div>
                                    <div v-if="insurance && insurance.lpYggxFileInfo" class="content" v-html="insurance.lpYggxFileInfo"></div>
                                </div>
                                <div class="box_item_list_row_l">
                                    <div class="desc_data_list_item" v-for="(item, index) in form.otherFileList" :key="index">
@@ -339,7 +343,7 @@
                                            <span>{{ item.name }}</span>
                                        </div>
                                    </div>
                                    <upload width="100px" height="100px" :list="[]" accept=".png,.jpg,.jpeg,.mp4,.word,.xlsx,.xls,.pdf,.excel" folder="settle" @success="claimsUploadFile($event, 5)" />
                                    <uploadProgress width="100px" height="100px" :list="[]" folder="settle" @success="claimsUploadFile($event, 5)" />
                                </div>
                            </div>
                        </div>
@@ -356,17 +360,17 @@
                        </div>
                        <div class="box_desc_list">
                            <div class="box_desc_list_row">
                                <el-form-item label="收款银行" prop="receiveBank">
                                <el-form-item label="收款银行" :prop="userInfo.type === 1 ? '' : 'receiveBank'">
                                    <el-input v-model="form.receiveBank" placeholder="请输入收款银行支行名称"></el-input>
                                </el-form-item>
                            </div>
                            <div class="box_desc_list_row">
                                <el-form-item label="收款人" prop="receiveUserName">
                                <el-form-item label="收款人" :prop="userInfo.type === 1 ? '' : 'receiveUserName'">
                                    <el-input v-model="form.receiveUserName" placeholder="请输入开户姓名"></el-input>
                                </el-form-item>
                            </div>
                            <div class="box_desc_list_row">
                                <el-form-item label="收款账号" prop="receiveAccount">
                                <el-form-item label="收款账号" :prop="userInfo.type === 1 ? '' : 'receiveAccount'">
                                    <el-input v-model="form.receiveAccount" placeholder="请输入银行账号"></el-input>
                                </el-form-item>
                            </div>
@@ -389,13 +393,13 @@
            </el-form>
            <div class="box_footer">
                <div class="box_footer_btns" v-if="i === 0">
                    <el-button type="primary" @click="confirm(0)">暂存</el-button>
                    <el-button type="primary" :loading="isWorking" @click="confirm(0)">暂存</el-button>
                    <el-button type="primary" @click="next">下一步</el-button>
                </div>
                <div class="box_footer_btns" v-if="i === 1">
                    <el-button @click="i--">上一步</el-button>
                    <el-button type="primary" @click="confirm(0)">暂存</el-button>
                    <el-button type="primary" @click="confirm(1)">提交</el-button>
                    <el-button @click="previousStep">上一步</el-button>
                    <el-button type="primary" :loading="isWorking" @click="confirm(0)">暂存</el-button>
                    <el-button type="primary" :loading="isWorking" @click="confirm(1)">提交</el-button>
                </div>
            </div>
        </div>
@@ -410,6 +414,7 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import upload from '@/components/common/upload'
import uploadProgress from '@/components/common/uploadProgress'
import { saveSettleClaims } from '@/api/business/settleRisk'
import { findById } from '@/api/business/settleClaims'
import { findListByDTO } from '@/api/business/member'
@@ -419,14 +424,24 @@
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import OperaSettleClaimsWindow from '@/components/business/OperaSettleClaimsWindow'
import { mapState } from 'vuex'
import { getById } from '@/api/business/insurance'
export default {
  name: 'onlineReporting',
  extends: BaseOpera,
  components: { GlobalWindow, upload, OperaSettleClaimsWindow, OperaWtbApplyShopWindow, OperaInsuranceApplyDetails },
  components: { GlobalWindow, upload,uploadProgress, OperaSettleClaimsWindow, OperaWtbApplyShopWindow, OperaInsuranceApplyDetails },
  computed: {
    ...mapState(['userInfo'])
  },
  data () {
      var checkPhone = (rule, value, callback) => {
          if (value === '') {
              callback(new Error('请输入'));
          } else if (!/^[1]\d{10}$/.test(value)) {
              callback(new Error('手机号不合法'));
          } else {
              callback();
          }
      };
    return {
      i: 0,
      id: null,
@@ -516,16 +531,17 @@
          { required: true, message: '不能为空' }
        ],
        informantPhone: [
          { required: true, message: '不能为空' }
          { required: true, validator: checkPhone }
        ]
      },
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now(); // 禁用未来的日期
        disabledDate (time) {
          return time.getTime() > Date.now() // 禁用未来的日期
        }
      },
      area: [],
      user: [],
      insurance: null,
      solutionList: []
    }
  },
@@ -538,6 +554,7 @@
  methods: {
    open (title, id) {
      this.title = title
      this.continueReporting()
      this.form.area = []
      this.i = 0
      this.solutionList = []
@@ -545,6 +562,7 @@
      this.user = []
      this.getUser()
      this.getCityTree()
      this.insurance = {}
      if (id) {
        findById(id)
          .then(res => {
@@ -560,12 +578,13 @@
                .then(res1 => {
                  res1.forEach(item => {
                    if (item.id === res.applyDetailId) {
                      this.getInsuranceFile(item)//获取保险方案文件说明
                      item.active = true
                      this.pickerOptions = {
                        disabledDate (time) {
                          var start = new Date(item.startTime)
                          var end = new Date(item.endTime)
                          return ( time.getTime() < start.getTime() ||  time.getTime()>end.getTime())
                          return (time.getTime() < start.getTime() || time.getTime() > end.getTime())
                        }
                      }
                    } else {
@@ -583,6 +602,9 @@
          this.form.informantName = this.userInfo.realname
        })
      }
    },
    openLinkUrl(url){
      window.open(url)
    },
    continueReporting () {
      this.i = 0
@@ -675,6 +697,13 @@
        this.form.reportFileList.splice(index, 1)
      }
    },
    getInsuranceFile (obj) {
      this.insurance = null
      getById(obj.insuranceId,1)
        .then(res => {
          this.insurance = res
        })
    },
    claimsUploadFile (file, type) {
      file.fileurl = file.imgaddr
      file.name = file.originname
@@ -696,30 +725,31 @@
    getSolutions (id) {
      const row = this.user.filter(item => item.id === id)
      this.form.idcardNo = row[0].idcardNo
      findList({ memberId: id })
      findList({ memberId: id, isSettleClaims: 1 })
        .then(res => {
          this.form.insuranceApplyId = ''
          res.forEach(item=> {
              item.active = false
          res.forEach(item => {
            item.active = false
          })
          this.solutionList = res
          this.changeSolution(null,0)
          this.changeSolution(null, 0)
        })
    },
    changeSolution (e, i) {
      this.pickerOptions = {}
      if(this.solutionList.length < i){
      if (this.solutionList.length < i) {
        return
      }
      this.solutionList.forEach((item, index) => {
        item.active = i === index
      })
      const obj = this.solutionList.filter(item => item.active)[0]
      this.getInsuranceFile(obj)
      this.pickerOptions = {
        disabledDate (time) {
          var start = new Date(obj.startTime)
          var end = new Date(obj.endTime)
          return ( time.getTime() < start.getTime() ||  time.getTime()>end.getTime())
          return (time.getTime() < start.getTime() || time.getTime() > end.getTime())
        }
      }
      this.form.insuranceApplyId = obj.applyId
@@ -739,40 +769,37 @@
      }
    },
    confirm (saveType) {
      this.isWorking = true
      saveSettleClaims({ ...this.form, saveType })
        .then(res => {
          console.log(res)
          if (saveType === 0) {
            this.visible = false
          } else {
            this.id = res
            this.i = 2
          }
          this.$emit('success')
        }).catch(err => {
            this.$tip.apiFailed(err)
         })
        .finally(() => {
          this.isWorking = false
        this.$refs.form.validate((valid) => {
            if (!valid) return;
            this.isWorking = true
            saveSettleClaims({ ...this.form, saveType })
                .then(res => {
                    if (saveType === 0) {
                        this.visible = false
                    } else {
                        this.id = res
                        this.i = 2
                    }
                    this.$emit('success')
                }).catch(err => {
                this.$tip.apiFailed(err)
            })
                .finally(() => {
                    this.isWorking = false
                })
        })
    },
      previousStep() {
          this.i--
          var element = document.getElementById('section1');
          element.scrollIntoView({ behavior: 'smooth' });
      },
    next () {
      this.$refs.form.validate((valid) => {
        if (!valid) return
        this.i++
        // this.isWorking = true
        // createSys(obj)
        //     .then(() => {
        //         this.visible = false
        //         this.$emit('success')
        //     })
        //     .catch(e => {
        //         this.$tip.apiFailed(e)
        //     })
        //     .finally(() => {
        //         this.isWorking = false
        //     })
          var element = document.getElementById('section1');
          element.scrollIntoView({ behavior: 'smooth' });
      })
    }
  }