MrShi
2024-04-02 174350e855349919ee287a52d3198c7c7558b858
wx/pages/policyDetails/policyDetails.vue
@@ -9,13 +9,14 @@
                  <text>保单号:{{info.code ? info.code : '-'}}</text>
               </view>
               <image v-if="info.statusCollect === 2" src="@/static/icon/progress_baozhangzhong@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 0" src="@/static/icon/progress_daishenhe@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 0 || info.statusCollect === 22" src="@/static/icon/progress_daishenhe@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 7" src="@/static/icon/progress_daiqianshu@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 1" src="@/static/icon/progress_daichudan@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 5" src="@/static/icon/progress_shenqingtuihui@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 4" src="@/static/icon/progress_yituihui@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 6" src="@/static/icon/progress_yiguanbi@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 6 || info.statusCollect === 25" src="@/static/icon/progress_yiguanbi@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 3" src="@/static/icon/progress_yiguoqi@2x.png" mode="widthFix"></image>
               <image v-if="info.statusCollect === 26" src="@/static/icon/ic_toubaozhong.png" mode="widthFix"></image>
            </view>
            <view class="box_info_center">
               <view class="box_info_center_x"></view>
@@ -86,7 +87,9 @@
            </view>
         </view>
      </view>
      <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);"></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>
      <!-- 直保 -->
      <template v-if="info.solutionType === 0">
      <!-- 保障中 -->
      <view class="details_footer" v-if="info.statusCollect === 2">
         <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="查看投保单"></u-button>
@@ -100,22 +103,45 @@
      </view>
      <!-- 待签署 -->
      <view class="details_footer" v-if="info.statusCollect === 7">
         <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="申请退回"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="申请退回" @click="show = true"></u-button>
         <view style="width: 44rpx; height: 50rpx;"></view>
         <u-button type="primary" shape="circle" color="#437CB3" @click="show1 = true" text="签署投保单"></u-button>
             <!-- @click="show1 = true" -->
            <u-button type="primary" shape="circle" color="#437CB3" text="签署投保单" @click="signApplication"></u-button>
      </view>
      <!-- 待出账 -->
      <view class="details_footer" v-if="info.statusCollect === 1">
         <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="申请退回"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="申请退回" @click="show = true"></u-button>
         <view style="width: 44rpx; height: 50rpx;"></view>
         <u-button type="primary" shape="circle" color="#437CB3" text="查看投保单"></u-button>
            <u-button type="primary" shape="circle" color="#437CB3" text="查看投保单" @click="seePdf"></u-button>
      </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>
         <view style="width: 44rpx; height: 50rpx;"></view>
         <u-button type="primary" shape="circle" color="#437CB3" text="再次投保"></u-button>
      </view>
      </template>
      <!-- 委托投保 -->
      <template v-else>
         <!-- 待签署 -->
         <view class="details_footer" v-if="info.statusCollect === 7">
            <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="签署确认书"></u-button>
            <view style="width: 44rpx; height: 50rpx;"></view>
            <u-button type="primary" shape="circle" color="#437CB3" text="签署申请单"></u-button>
         </view>
         <!-- 待审核/待出账 -->
         <view class="details_footer" v-if="info.statusCollect === 0 || info.statusCollect === 1">
            <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="查看申请单"></u-button>
            <view style="width: 44rpx; height: 50rpx;"></view>
            <u-button type="primary" shape="circle" color="#437CB3" text="查看确认书"></u-button>
         </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>
         </view>
         <!-- 投保中 -->
         <view class="details_footer" v-if="info.statusCollect === 26 && info.unionApplyTbdStatus !== 0">
            <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="签署投保单"></u-button>
         </view>
      </template>
      <!-- 申请退回确认弹窗 -->
      <u-modal :show="show" title="温馨提示" :showCancelButton="true" cancelText="我再想想" confirmColor="#437CB3" @cancel="cancel" @confirm="confirm">
         确认申请退回?
@@ -162,6 +188,24 @@
         this.applyDetailPage()
      },
      methods: {
         signApplication() {
            uni.navigateTo({
               url: `/pages/webView/webView?url=https://web.sandbox.junziqian.com/signInfo/viewDetail?ts=1711966477502&signNo=SSN1774742154020143104&sign=GHW6wWRJfEZiXO-gXZwTezR5CYUvhwbmoWHlPsqUCLA`
            })
         },
         // 查看pdf
         seePdf() {
            uni.downloadFile({
                url: this.info.toubaodanSignedFile.fileurlFull,
                success: function (res) {
                  var filePath = res.tempFilePath;
                  uni.openDocument({
                     filePath: filePath,
                     success: function (res) {}
                  })
                }
            })
         },
         // 获取详情
         getDetails() {
            this.$u.api.insuranceApplyById(this.orderId)
@@ -221,7 +265,16 @@
            return age;
         },
         confirm() {
            this.$u.api.applyOpt({
               applyId: this.info.id,
               optIllustration: '',
               optType: 1
            }).then(res => {
               if (res.code === 200) {
                  this.getDetails()
            this.show = false
               }
            })
         },
         cancel() {
            this.show = false
@@ -233,26 +286,34 @@
            this.show1 = false
         },
         confirm2() {
            this.$u.api.applyOpt({
               applyId: this.info.id,
               optType: 2
            }).then(res => {
               if (res.code === 200) {
            this.show2 = false
                  this.getDetails()
               }
            })
         },
         cancel2() {
            this.show2 = false
         },
         returnStyle(type) {
            if ([2].includes(type)) {
            if ([2,26].includes(type)) {
               return 'linear-gradient( 180deg, #E5F7F1 0%, rgba(255,255,255,0) 100%);'
            } else if ([0,7,1].includes(type)) {
            } else if ([0,7,1,22].includes(type)) {
               return 'linear-gradient( 180deg, #FFF2E3 0%, rgba(255,255,255,0) 100%);'
            } else if ([5,4,6,3].includes(type)) {
            } else if ([5,4,6,3,25].includes(type)) {
               return '#f7f7f7'
            }
         },
         returnStyle1(type) {
            if ([2].includes(type)) {
            if ([2,26].includes(type)) {
               return 'linear-gradient( 180deg, #E5F7F1 0%, rgba(255,255,255,0) 100%);'
            } else if ([0,7,1].includes(type)) {
            } else if ([0,7,1,22].includes(type)) {
               return 'linear-gradient( 180deg, #FFF2E3 0%, rgba(255,255,255,0) 100%);'
            } else if ([5,4,6,3].includes(type)) {
            } else if ([5,4,6,3,25].includes(type)) {
               return '#ffffff'
            }
         }