MrShi
2025-05-28 2d881f8c1b0675646329462225c9aa2f9095e90a
wx/pages/new_report/new_report.vue
@@ -26,7 +26,7 @@
         <view class="box_list">
            <view class="box_list_Label">基本信息</view>
               <view class="box_list_from">
                  <u-form-item label="出险人:" prop="memberName" borderBottom required v-if="!id">
                  <u-form-item label="出险人:" prop="memberName" borderBottom required>
                     <u--input v-model="model.memberName" placeholder="请选择出险人" @input="changeSearch" border="none"></u--input>
                     <scroll-view scroll-y class="box_list_data" v-if="model.memberName && columns2.length > 0">
                        <view class="box_list_data_item" v-for="(item, index) in columns2" :key="index" @click="clickItem(item)">
@@ -48,7 +48,7 @@
            <view class="box_list">
               <view class="box_list_Label">保险方案</view>
               <view class="box_list_from">
                  <u-form-item label="保险方案:" prop="solutionName" borderBottom required @click="openFA" v-if="!id">
                  <u-form-item label="保险方案:" prop="solutionName" borderBottom required @click="openFA">
                     <view style="width: 100%; display: flex; align-items: center; justify-content: space-between;">
                        <u--input v-model="model.solutionName" disabled disabledColor="#ffffff" placeholder="请选择保险方案" border="none"></u--input>
                        <u-icon slot="right" name="arrow-right"></u-icon>
@@ -97,7 +97,7 @@
                     <view class="list">
                        <view :class="model.hurtType === 0 ? 'list_item active' : 'list_item'" @click="model.hurtType = 0">是</view>
                        <view :class="model.hurtType === 1 ? 'list_item active' : 'list_item'" @click="model.hurtType = 1">否</view>
                        <view :class="model.hurtType === 1 ? 'list_item active' : 'list_item'" @click="model.hurtType = 1">待确定</view>
                        <view :class="model.hurtType === 2 ? 'list_item active' : 'list_item'" @click="model.hurtType = 2">待确定</view>
                     </view>
                  </u-form-item>
                  <u-form-item label="是否有医保:" prop="medicalInsurance" borderBottom required>
@@ -106,13 +106,13 @@
                        <view :class="model.medicalInsurance === 1 ? 'list_item active' : 'list_item'" @click="model.medicalInsurance = 1">否</view>
                     </view>
                  </u-form-item>
                  <u-form-item label="事故视频/图片:" prop="reportFileList" v-if="!id">
                  <u-form-item label="事故视频/图片:" prop="reportFileList">
                     <view style="width: 100%; height: 15rpx;"></view>
                     <view class="meade">
                        <view class="meade_content" v-for="(item,index) in model.reportFileList" :key="index">
                           <image class="dele" src="@/static/icon/ic_delete@2x.png" mode="widthFix" @click="deletePic(index, 6)"></image>
                           <image class="image" :src="item.url" mode="widthFix" v-if="item.type === 0"></image>
                           <video class="video" :src="item.url" controls v-if="item.type === 1"></video>
                           <image class="image" :src="item.fileurlFull" mode="widthFix" v-if="item.type === 0"></image>
                           <video class="video" :src="item.fileurlFull" controls v-if="item.type === 1"></video>
                        </view>
                        <view class="meade_upload" @click="upload(6)">
                           <u-icon name="plus" color="#999999" size="20"></u-icon>
@@ -157,8 +157,8 @@
                  <view class="meade">
                     <view class="meade_content" v-for="(item,index) in model.relationFileList" :key="index">
                        <image class="dele" src="@/static/icon/ic_delete@2x.png" mode="widthFix" @click="deletePic(index, 1)"></image>
                        <image class="image" :src="item.url" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.url" controls v-if="item.type === 1"></video>
                        <image class="image" :src="item.fileurlFull" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.fileurlFull" controls v-if="item.type === 1"></video>
                     </view>
                     <view class="meade_upload" @click="upload(1)">
                        <u-icon name="plus" color="#999999" size="20"></u-icon>
@@ -180,8 +180,8 @@
                  <view class="meade">
                     <view class="meade_content" v-for="(item,index) in model.outpatientFileList" :key="index">
                        <image class="dele" src="@/static/icon/ic_delete@2x.png" mode="widthFix" @click="deletePic(index, 2)"></image>
                        <image class="image" :src="item.url" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.url" controls v-if="item.type === 1"></video>
                        <image class="image" :src="item.fileurlFull" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.fileurlFull" controls v-if="item.type === 1"></video>
                     </view>
                     <view class="meade_upload" @click="upload(2)">
                        <u-icon name="plus" color="#999999" size="20"></u-icon>
@@ -203,8 +203,8 @@
                  <view class="meade">
                     <view class="meade_content" v-for="(item,index) in model.hospitalFileList" :key="index">
                        <image class="dele" src="@/static/icon/ic_delete@2x.png" mode="widthFix" @click="deletePic(index, 3)"></image>
                        <image class="image" :src="item.url" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.url" controls v-if="item.type === 1"></video>
                        <image class="image" :src="item.fileurlFull" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.fileurlFull" controls v-if="item.type === 1"></video>
                     </view>
                     <view class="meade_upload" @click="upload(3)">
                        <u-icon name="plus" color="#999999" size="20"></u-icon>
@@ -226,8 +226,8 @@
                  <view class="meade">
                     <view class="meade_content" v-for="(item,index) in model.disabilityFileList" :key="index">
                        <image class="dele" src="@/static/icon/ic_delete@2x.png" mode="widthFix" @click="deletePic(index, 4)"></image>
                        <image class="image" :src="item.url" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.url" controls v-if="item.type === 1"></video>
                        <image class="image" :src="item.fileurlFull" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.fileurlFull" controls v-if="item.type === 1"></video>
                     </view>
                     <view class="meade_upload" @click="upload(4)">
                        <u-icon name="plus" color="#999999" size="20"></u-icon>
@@ -249,8 +249,8 @@
                  <view class="meade">
                     <view class="meade_content" v-for="(item,index) in model.otherFileList" :key="index">
                        <image class="dele" src="@/static/icon/ic_delete@2x.png" mode="widthFix" @click="deletePic(index, 5)"></image>
                        <image class="image" :src="item.url" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.url" controls v-if="item.type === 1"></video>
                        <image class="image" :src="item.fileurlFull" mode="widthFix" v-if="item.type === 0"></image>
                        <video class="video" :src="item.fileurlFull" controls v-if="item.type === 1"></video>
                     </view>
                     <view class="meade_upload" @click="upload(5)">
                        <u-icon name="plus" color="#999999" size="20"></u-icon>
@@ -354,7 +354,7 @@
      data() {
         return {
            id: null,
            i: 1,
            i: 0,
            show: false,
            show1: false,
            show2: false,
@@ -504,11 +504,11 @@
            })
            this.getDetails()
            this.getArea()
            this.getUser()
            // this.getUser()
            return
         }
         this.getArea()
         this.getUser()
         // this.getUser()
         this.model.informantName = this.$store.state.userInfo.realname
      },
      methods: {
@@ -518,6 +518,7 @@
            })
         },
         jixu() {
            this.scheme = null
            this.model = {
               memberId: '',
               memberName: '',
@@ -596,11 +597,24 @@
                     this.model.duName = res.data.duName
                     this.model.content = res.data.content
                     this.model.reportFileList = res.data.reportFileList
                     this.model.idcardNo = res.data.idcardNo
                     this.model.address = res.data.address
                     
                     this.model.receiveBank = res.data.receiveBank
                     this.model.receiveUserName = res.data.receiveUserName
                     this.model.receiveAccount = res.data.receiveAccount
                     this.model.informantName = res.data.informantName
                     this.model.informantPhone = res.data.informantPhone
                     this.model.hospital = res.data.hospital
                     this.model.happenTime = res.data.happenTime
                     this.model.hurtType = res.data.hurtType
                     this.model.relationFileList = res.data.relationFileList
                     this.model.outpatientFileList = res.data.outpatientFileList
                     this.model.hospitalFileList = res.data.hospitalFileList
                     this.model.disabilityFileList = res.data.disabilityFileList
                     this.model.otherFileList = res.data.otherFileList
                     this.model.type = res.data.type
                     if (res.data.type === 0) {
                        this.model.typeName = '工作期间受伤'
@@ -615,6 +629,30 @@
                     this.model.medicalInsurance = res.data.medicalInsurance
                     this.model.areaInfo = res.data.areaInfo
                     this.model.areaId = res.data.areaId
                     this.model.solutionId = res.data.solutionId
                     this.model.solutionName = res.data.solutionName
                     this.model.duId = res.data.duId
                     this.model.duName = res.data.duName
                     this.model.worktypeId = res.data.worktypeId
                     this.model.worktypeName = res.data.worktypeName
                     this.model.applyDetailId = res.data.applyDetailId
                     this.model.insuranceApplyId = res.data.insuranceApplyId
                     this.$u.api.findList({
                        memberId: this.model.memberId
                     }).then(res => {
                        if (res.code === 200) {
                           res.data.forEach(item => {
                              if (item.solutionId === this.model.solutionId) {
                                 this.scheme = item
                                 this.minDate = this.dateToTimestamp(item.parentStartTime)
                                 this.maxDate = this.dateToTimestamp(item.parentEndTime)
                                 this.date = this.dateToTimestamp(item.parentStartTime)
                              }
                           })
                        }
                     })
                  }
               })
         },
@@ -628,7 +666,7 @@
         // 提交报案
         submit(saveType) {
            this.$refs.uForm.validate().then(res => {
               this.$u.api.saveSettleClaims({ ...this.model, saveType })
               this.$u.api.saveSettleClaims({ ...this.model, saveType, id: this.id })
                  .then(res => {
                     if (res.code === 200) {
                        this.id = res.data
@@ -735,42 +773,48 @@
                                 fileurl: res.data.imgaddr,
                                 name: res.data.originname,
                                 type: res.data.type,
                                 url: res.data.url
                                 url: res.data.url,
                                 fileurlFull: res.data.url
                              })
                           } else if (type === 1) {
                              that.model.relationFileList.push({
                                 fileurl: res.data.imgaddr,
                                 name: res.data.originname,
                                 type: res.data.type,
                                 url: res.data.url
                                 url: res.data.url,
                                 fileurlFull: res.data.url
                              })
                           } else if (type === 2) {
                              that.model.outpatientFileList.push({
                                 fileurl: res.data.imgaddr,
                                 name: res.data.originname,
                                 type: res.data.type,
                                 url: res.data.url
                                 url: res.data.url,
                                 fileurlFull: res.data.url
                              })
                           } else if (type === 3) {
                              that.model.hospitalFileList.push({
                                 fileurl: res.data.imgaddr,
                                 name: res.data.originname,
                                 type: res.data.type,
                                 url: res.data.url
                                 url: res.data.url,
                                 fileurlFull: res.data.url
                              })
                           } else if (type === 4) {
                              that.model.disabilityFileList.push({
                                 fileurl: res.data.imgaddr,
                                 name: res.data.originname,
                                 type: res.data.type,
                                 url: res.data.url
                                 url: res.data.url,
                                 fileurlFull: res.data.url
                              })
                           } else if (type === 5) {
                              that.model.otherFileList.push({
                                 fileurl: res.data.imgaddr,
                                 name: res.data.originname,
                                 type: res.data.type,
                                 url: res.data.url
                                 url: res.data.url,
                                 fileurlFull: res.data.url
                              })
                           }
                        },
@@ -805,7 +849,8 @@
                     this.model.reportFileList.push({
                        fileurl: res.data.imgaddr,
                        name: res.data.originname,
                        type: res.data.type
                        type: res.data.type,
                        fileurlFull: res.data.url
                     })
                  },
                  complete() {