MrShi
2025-07-02 39ae52b3f65e2bba3b6570adb51e791cb3befff7
wx/pages/new_report/new_report.vue
@@ -35,7 +35,7 @@
                     </scroll-view>
                  </u-form-item>
                  <u-form-item label="证件号码:" prop="idcardNo" required>
                     <u--input v-model="model.idcardNo" maxlength="18" placeholder="请输入证件号码" border="none"></u--input>
                     <u--input v-model="model.idcardNo" disabled maxlength="18" placeholder="请输入证件号码" border="none"></u--input>
                  </u-form-item>
                  <u-form-item label="报案人:" prop="informantName" borderBottom required>
                     <u--input v-model="model.informantName" placeholder="请输入报案人姓名" border="none"></u--input>
@@ -54,7 +54,7 @@
                        <u-icon slot="right" name="arrow-right"></u-icon>
                     </view>
                     <view class="faList" v-if="scheme">
                        <text>保单号:{{scheme.applyCode || ''}}</text>
                        <text>保单号:{{scheme.applyCode || ''}}</text>
                        <text>保障期限:<template v-if="scheme.parentStartTime">{{scheme.parentStartTime}}~{{scheme.parentEndTime}}</template></text>
                        <text>投保单位:{{scheme.companyName || ''}}</text>
                        <text>派遣单位:{{scheme.duName}}</text>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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: [],
@@ -420,24 +430,24 @@
               otherFileList: [],
            },
            rules: {
               'receiveAccount': {
                  type: 'string',
                  required: true,
                  message: '请填写收款账号',
                  trigger: ['blur']
               },
               'receiveUserName': {
                  type: 'string',
                  required: true,
                  message: '请填写收款人',
                  trigger: ['blur']
               },
               'receiveBank': {
                  type: 'string',
                  required: true,
                  message: '请填写收款银行',
                  trigger: ['blur']
               },
               // 'receiveAccount': {
               //    type: 'string',
               //    required: true,
               //    message: '请填写收款账号',
               //    trigger: ['blur']
               // },
               // 'receiveUserName': {
               //    type: 'string',
               //    required: true,
               //    message: '请填写收款人',
               //    trigger: ['blur']
               // },
               // 'receiveBank': {
               //    type: 'string',
               //    required: true,
               //    message: '请填写收款银行',
               //    trigger: ['blur']
               // },
               'memberName': {
                  type: 'string',
                  required: true,
@@ -493,7 +503,8 @@
                  trigger: ['blur']
               }
            },
            fileList: []
            fileList: [],
            htmlVal: ''
         };
      },
      onLoad(option) {
@@ -504,14 +515,66 @@
            })
            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}`
@@ -560,6 +623,7 @@
         clickItem(item) {
            this.model.memberName = item.name
            this.model.memberId = item.id
            this.model.idcardNo = item.idcardNo
            this.columns2 = []
         },
         // 搜索
@@ -646,6 +710,7 @@
                           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)
@@ -894,8 +959,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)
@@ -910,6 +984,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) {