MrShi
2024-05-03 9607e7e25475d7533944f2218eb0a40189c343f2
wx/pages/policyDetails/policyDetails.vue
@@ -106,7 +106,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">
@@ -123,8 +123,8 @@
      <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,7 +138,7 @@
         </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">
@@ -192,7 +192,9 @@
            code: '',
            num: 0,
            error: false,
            timer: null
            timer: null,
            loading: false
         };
      },
      computed: {
@@ -229,13 +231,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({
@@ -313,25 +316,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) {
@@ -340,14 +346,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) {
@@ -356,14 +364,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) {
@@ -373,17 +383,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(data.data)}`
                              })
                           }
                        })
                  } else {
                     this.error = 2
                  }
                  //  else {
                  //    this.error = 2
                  // }
               })
            }
         },