jiangping
2025-06-17 78a173f85f8a4666d83cf8d900f04dd9f8e3e127
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>
@@ -140,7 +140,7 @@
            </view>
            <view class="box_up_title">
               <text>上传理赔材料</text>
               <view class="box_up_title_downlod">
               <view class="box_up_title_downlod" @click="openDownLodFile">
                  <text>下载示例</text>
                  <image src="/static/icon/ic_download@2x.png" mode="widthFix"></image>
               </view>
@@ -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>
@@ -172,7 +172,7 @@
               <view class="box_up_list_row">
                  <view class="box_up_list_row_title">
                     <text>门诊</text>
                     <view class="box_up_list_row_title_icon">
                     <view class="box_up_list_row_title_icon" @click="openInfo(2)">
                        <image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
                        <text>上传说明</text>
                     </view>
@@ -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>
@@ -195,7 +195,7 @@
               <view class="box_up_list_row">
                  <view class="box_up_list_row_title">
                     <text>住院</text>
                     <view class="box_up_list_row_title_icon">
                     <view class="box_up_list_row_title_icon" @click="openInfo(3)">
                        <image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
                        <text>上传说明</text>
                     </view>
@@ -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>
@@ -218,7 +218,7 @@
               <view class="box_up_list_row">
                  <view class="box_up_list_row_title">
                     <text>伤残</text>
                     <view class="box_up_list_row_title_icon">
                     <view class="box_up_list_row_title_icon" @click="openInfo(4)">
                        <image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
                        <text>上传说明</text>
                     </view>
@@ -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>
@@ -241,7 +241,7 @@
               <view class="box_up_list_row">
                  <view class="box_up_list_row_title">
                     <text>其他</text>
                     <view class="box_up_list_row_title_icon">
                     <view class="box_up_list_row_title_icon" @click="openInfo(5)">
                        <image src="/static/icon/ic_shuoming@2x.png" mode="widthFix"></image>
                        <text>上传说明</text>
                     </view>
@@ -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>
@@ -337,15 +337,22 @@
      <!-- 弹窗提醒 -->
      <u-modal :show="show" title="无法完成报案" content='该出险人无有效保单 请重新选择'></u-modal>
      <!-- 上传说明 -->
      <u-popup :show="show6" closeable mode="bottom">
      <u-popup :show="show6" closeable mode="bottom" @close="show6 = false">
         <view class="info">
            <view class="info_title">上传说明</view>
            <view class="info_content">需上传的文件:劳动合同复印件、工资流水、</view>
            <view class="info_content" v-html="htmlVal"></view>
            <view class="info_btn">
               <u-button shape="circle" style="height: 100%;" text="我知道了" color="#437CB3" @click="show6 = false"></u-button>
            </view>
         </view>
      </u-popup>
      <!-- 下载文件 -->
      <u-action-sheet
         :show="show7"
         :actions="btns"
         :closeOnClickOverlay="true"
         :closeOnClickAction="true"
         @select="selectRow" />
   </view>
</template>
@@ -354,7 +361,7 @@
      data() {
         return {
            id: null,
            i: 1,
            i: 0,
            show: false,
            show1: false,
            show2: false,
@@ -362,6 +369,7 @@
            show4: false,
            show5: false,
            show6: false,
            show7: false,
            date: Number(new Date()),
            minDate: '',
            maxDate: '',
@@ -378,6 +386,8 @@
               { name: '上传理赔材料' },
               { name: '完成报案' },
            ],
            btns: [],
            insurance: null,
            scheme: null,
            columns1: [],
            columns2: [],
@@ -493,7 +503,8 @@
                  trigger: ['blur']
               }
            },
            fileList: []
            fileList: [],
            htmlVal: ''
         };
      },
      onLoad(option) {
@@ -504,20 +515,73 @@
            })
            this.getDetails()
            this.getArea()
            this.getUser()
            return
         }
         this.getArea()
         this.getUser()
         this.model.informantName = this.$store.state.userInfo.realname
      },
      methods: {
         getInsuranceFile (obj) {
            this.insurance = null
            this.$u.api.insuranceFile(obj.insuranceId, 1)
               .then(res => {
                  console.log(res)
                  this.insurance = res.data
               })
         },
         selectRow(row) {
            console.log(row)
            var that = this;
            uni.downloadFile({
               url: row.type === 0 ? this.insurance.lpStampTempFile.fileurlFull : this.insurance.lpFile.fileurlFull,
               success: (res) => {
                  if (res.statusCode === 200) {
                     let fileManager = wx.getFileSystemManager();
                     fileManager.saveFile({
                        tempFilePath: res.tempFilePath,
                        success: (res) => {
                           uni.showToast({ title: '保存成功!', icon: 'success' })
                           that.show7 = false
                        },
                        fail: (err) => {
                           uni.showToast({ title: '保存失败!', icon: 'error' })
                           that.show7 = false
                        }
                     });
                  }
               }
            })
         },
         openDownLodFile() {
            let arr = []
            if (this.insurance && this.insurance.lpStampTempFile && this.insurance.lpStampTempFile.fileurlFull) {
               arr.push({
                  name: '盖章文件模版',
                  type: 0,
                  fontSize: '20'
               })
            }
            if (this.insurance && this.insurance.lpFile && this.insurance.lpFile.fileurlFull) {
               arr.push({
                  name: '理赔材料一览表',
                  type: 1,
                  fontSize: '20'
               })
            }
            this.btns = arr
            if (arr.length === 0) {
               uni.showToast({ title: '暂无文件', icon: 'none' })
               return;
            }
            this.show7 = true
         },
         jixu() {
            uni.navigateTo({
               url: `/pages/report_details/report_details?id=${this.id}`
            })
         },
         jixu() {
            this.scheme = null
            this.model = {
               memberId: '',
               memberName: '',
@@ -596,11 +660,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 +692,31 @@
                     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.getInsuranceFile(item)
                                 this.minDate = this.dateToTimestamp(item.parentStartTime)
                                 this.maxDate = this.dateToTimestamp(item.parentEndTime)
                                 this.date = this.dateToTimestamp(item.parentStartTime)
                              }
                           })
                        }
                     })
                  }
               })
         },
@@ -628,7 +730,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 +837,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 +913,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() {
@@ -849,8 +958,17 @@
         },
         openInfo(type) {
            if (type === 1) {
               this.show6 = true
               this.htmlVal = this.insurance.lpYggxFileInfo
            } else if (type === 2) {
               this.htmlVal = this.insurance.lpMzFileInfo
            } else if (type === 3) {
               this.htmlVal = this.insurance.lpZyFileInfo
            } else if (type === 4) {
               this.htmlVal = this.insurance.lpScFileInfo
            } else if (type === 5) {
               this.htmlVal = this.insurance.lpYggxFileInfo
            }
            this.show6 = true
         },
         confirm4(e) {
            this.minDate = this.dateToTimestamp(e.value[0].parentStartTime)
@@ -865,6 +983,7 @@
            this.model.applyDetailId = e.value[0].id
            this.model.insuranceApplyId = e.value[0].applyId
            this.scheme = e.value[0]
            this.getInsuranceFile(e.value[0])
            this.show5 = false
         },
         confirm3(e) {