k94314517
2025-05-19 16e8c7adbee6c9ee9bac09a80d44d3bfd3fe2f0c
wx/pages/policyDetails/policyDetails.vue
@@ -52,7 +52,7 @@
            <view class="box_people_label">被保人员</view>
            <view class="box_people_list">
               <view class="box_people_list_item" v-for="(item, index) in list" :key="index">
                  <template v-if="info.statusCollect !== 2">
                  <template v-if="info.statusCollect !== 2 && info.statusCollect !== 27">
                     <view class="item_status des">不在保</view>
                  </template>
                  <template v-else>
@@ -66,6 +66,9 @@
                     </view>
                     <view class="item_head_bottom">
                        身份证号:{{item.idcardNo}}
                     </view>
                     <view class="item_head_bottom">
                        备注:{{item.remark || ''}}
                     </view>
                  </view>
                  <view class="item_x"></view>
@@ -87,7 +90,7 @@
            </view>
         </view>
      </view>
      <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);" v-if="[2,0,7,1,4,22,25,26].includes(info.statusCollect)"></view>
      <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);" v-if="[2,0,7,1,4,22,25,26,27,28].includes(info.statusCollect)"></view>
      <!-- 直保 -->
      <template v-if="info.solutionType === 0">
         <!-- 保障中 -->
@@ -106,7 +109,7 @@
            <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="申请退回" @click="show = true"></u-button>
            <view style="width: 44rpx; height: 50rpx;"></view>
             <!-- @click="show1 = true" -->
            <u-button type="primary" shape="circle" color="#437CB3" text="签署投保单" @click="openmessage(4)"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" :loading="loading" text="签署投保单" @click="openmessage(4)"></u-button>
         </view>
         <!-- 待出账 -->
         <view class="details_footer" v-if="info.statusCollect === 1">
@@ -116,15 +119,15 @@
         </view>
         <!-- 已退回 -->
         <view class="details_footer" v-if="info.statusCollect === 4">
            <u-button type="primary" shape="circle" color="#437CB3" @click="show2 = true" :plain="true" text="关闭订单"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" @click="show2 = true" :plain="true" text="关闭申请"></u-button>
         </view>
      </template>
      <!-- 委托投保 -->
      <template v-else>
         <!-- 待签署 -->
         <view class="details_footer" v-if="info.statusCollect === 7 || info.statusCollect === 28">
            <u-button type="primary" shape="circle" color="#437CB3" text="签署确认书" @click="openmessage(2)" v-if="info.status !== 21"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" text="签署申请单" @click="openmessage(3)" v-if="info.status === 21"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" text="签署确认书" :loading="loading" @click="openmessage(2)" v-if="info.status !== 21"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" text="签署申请单" :loading="loading" @click="openmessage(3)" v-if="info.status === 21"></u-button>
         </view>
         <!-- 待审核/待出单 -->
         <view class="details_footer" v-if="info.statusCollect === 22 || info.statusCollect === 0 || info.statusCollect === 1 || info.statusCollect === 23">
@@ -138,10 +141,12 @@
         </view>
         <!-- 投保中 -->
         <view class="details_footer" v-if="info.statusCollect === 26 && info.unionApplyTbdStatus !== 0">
            <u-button type="primary" shape="circle" color="#437CB3" text="签署投保单" @click="openmessage(1)"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" :loading="loading" text="签署投保单" @click="openmessage(1)"></u-button>
         </view>
         <!-- 保障中 -->
         <view class="details_footer" v-if="info.statusCollect === 27">
            <u-button type="primary" shape="circle" color="#437CB3" text="查看投保单" @click="seePdf(info.toubaodanSignedFile ? info.toubaodanSignedFile.fileurlFull : info.toubaodanFile.fileurlFull)"></u-button>
            <view style="width: 44rpx; height: 50rpx;"></view>
            <u-button type="primary" shape="circle" color="#437CB3" text="查看保险单" @click="seePdf(info.baoxiandanFile.fileurlFull)"></u-button>
         </view>
      </template>
@@ -151,7 +156,7 @@
      </u-modal>
      <!-- 关闭确认弹窗 -->
      <u-modal :show="show2" title="温馨提示" :showCancelButton="true" cancelText="我再想想" confirmColor="#437CB3" @cancel="cancel2" @confirm="confirm2">
         确认关闭订单?
         确认关闭申请?
      </u-modal>
      <!-- 签署投保单验证码弹窗 -->
      <u-modal :show="show1" title="获取验证码" :showCancelButton="true" confirmColor="#437CB3" @cancel="cancel1" @confirm="confirm1">
@@ -190,7 +195,9 @@
            code: '',
            num: 0,
            error: false,
            timer: null
            timer: null,
            loading: false
         };
      },
      computed: {
@@ -227,13 +234,14 @@
         },
         // 打开发送验证码弹窗
         openmessage(type) {
            this.code = ''
            clearInterval(this.timer)
            this.error = ''
            this.timer = null
            this.num = 0
            // this.code = ''
            // clearInterval(this.timer)
            // this.error = ''
            // this.timer = null
            // this.num = 0
            this.type = type
            this.show1 = true
            // this.show1 = true
            this.confirm1()
         },
         signApplication() {
            uni.navigateTo({
@@ -311,25 +319,28 @@
            this.show = false
         },
         confirm1() {
            if (!this.code) {
               this.error = 1
               return
            }
            // if (!this.code) {
            //    this.error = 1
            //    return
            // }
            // 签署投保单
            this.loading = true
            if (this.type === 1) {
               this.$u.api.getSignWTBTBDLink({
                  code: this.code,
                  businessId: this.info.id
               }).then(res => {
                  this.loading = false
                  if (res.code === 200) {
                     this.error = ''
                     this.show1 = false
                     // this.error = ''
                     // this.show1 = false
                     uni.navigateTo({
                        url: `/pages/webView/webView?url=${encodeURIComponent(res.data)}`
                     })
                  } else {
                     this.error = 2
                  }
                  //  else {
                  //    this.error = 2
                  // }
               })
            // 确认书
            } else if (this.type === 2) {
@@ -338,14 +349,16 @@
                  code: this.code
               }).then(res => {
                  if (res.code === 200) {
                     this.error = ''
                     this.show1 = false
                     this.loading = false
                     // this.error = ''
                     // this.show1 = false
                     uni.navigateTo({
                        url: `/pages/webView/webView?url=${encodeURIComponent(res.data)}`
                     })
                  } else {
                     this.error = 2
                  }
                  //  else {
                  //    this.error = 2
                  // }
               })
            // 签署申请单 --- 委托
            } else if (this.type === 3) {
@@ -354,14 +367,16 @@
                  code: this.code
               }).then(res => {
                  if (res.code === 200) {
                     this.error = ''
                     this.show1 = false
                     this.loading = false
                     // this.error = ''
                     // this.show1 = false
                     uni.navigateTo({
                        url: `/pages/webView/webView?url=${encodeURIComponent(res.data)}`
                     })
                  } else {
                     this.error = 2
                  }
                  //  else {
                  //    this.error = 2
                  // }
               })
            // 签署申请单 --- 直保
            } else if (this.type === 4) {
@@ -371,17 +386,19 @@
                  if (res.code === 200) {
                     this.$u.api.getSignLink(this.info.id)
                        .then(data => {
                           this.loading = false
                           if (data.code === 200) {
                              this.error = ''
                              this.show1 = false
                              // this.error = ''
                              // this.show1 = false
                              uni.navigateTo({
                                 url: `/pages/webView/webView?url=${encodeURIComponent(res.data)}`
                                 url: `/pages/webView/webView?url=${encodeURIComponent(data.data)}`
                              })
                           }
                        })
                  } else {
                     this.error = 2
                  }
                  //  else {
                  //    this.error = 2
                  // }
               })
            }
         },