jiangping
2024-05-07 529d0b8982cf30f57ba7e366c0f822c1d82c0b69
company/src/components/business/OperaWtbApplyShopWindow.vue
@@ -12,8 +12,8 @@
                    <div class="desc_item_label_left">
                        <span>保险到期还有 <b style="color: #F95601;">{{model.loseEfficacyDays ? model.loseEfficacyDays : '-'}}</b> 天</span>
                        <el-button type="primary" v-if="model.status === 27" @click="$refs.OperaInsuranceApply.open('续保', { id: dataId, type: 1 })">一键续保</el-button>
                        <el-button type="primary" v-if="model.status === 27" @click="$refs.additionSubtractionApplication.open('加减保申请', { id: dataId })">加减保申请</el-button>
                        <el-button type="primary" v-if="model.status === 27" @click="$refs.factoryChange.open('更换派遣单位申请', { id: dataId })">更换派遣单位申请</el-button>
                        <el-button type="primary" v-if="model.status === 27 && model.loseEfficacyDays" @click="$refs.additionSubtractionApplication.open('加减保申请', { id: dataId })">加减保申请</el-button>
                        <el-button type="primary" v-if="model.status === 27 && model.loseEfficacyDays" @click="$refs.factoryChange.open('更换派遣单位申请', { id: dataId })">更换派遣单位申请</el-button>
                    </div>
                </div>
                <div class="desc_item_label">
@@ -32,9 +32,9 @@
                        <el-button v-if="[1,2,3].includes(model.unionApplyTbdStatus) &&(model.toubaodanFile || model.oubaodanSignedFile)" type="primary" @click="viewToubaodan">查看投保单</el-button>
                        <el-button v-if="[3].includes(model.unionApplyTbdStatus) &&(model.baoxiandanFile)" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
                        <!--                          goSign-->
                        <el-button v-if="model.status == 20" type="primary" @click="getSignLink(0)">签署方案确认书</el-button>
                        <el-button v-if="model.status == 21" type="primary" @click="getSignLink(1)">签署申请单</el-button>
                        <el-button v-if="model.unionApplyTbdStatus == 1" type="primary" @click="getSignLink(2)">签署投保单</el-button>
                        <el-button v-if="model.status == 20" type="primary" :disabled="loading" :loading="loading" @click="getSignLink(0)">签署方案确认书</el-button>
                        <el-button v-if="model.status == 21" type="primary" :disabled="loading" :loading="loading" @click="getSignLink(1)">签署申请单</el-button>
                        <el-button v-if="model.unionApplyTbdStatus == 1" type="primary" :disabled="loading" :loading="loading" @click="getSignLink(2)">签署投保单</el-button>
                        <el-button v-if="model.status == 24" type="danger" @click="closeOrder">关闭订单</el-button>
                      </template>
                    <template v-if="userInfo.type === 2">
@@ -568,7 +568,9 @@
      gzList: [],
      activeName: '0',
      total: 0,
      currentPage: 1
      currentPage: 1,
        loading: false
    }
  },
  created () {
@@ -616,46 +618,51 @@
        this.signTitle = '签署投保单'
      }
      this.form.type = flag
      this.visiblePhone = true
      this.$nextTick(() => {
        this.$refs.form.resetFields()
      });
        this.goSignDo()
      // this.visiblePhone = true
      // this.$nextTick(() => {
      //   this.$refs.form.resetFields()
      // });
    },
    goSignDo(){
      this.$refs.form.validate((valid) => {
        if (!valid) {
          return
        }
        this.isWorking = true
      // this.$refs.form.validate((valid) => {
      //   if (!valid) {
      //     return
      //   }
      //   this.isWorking = true
        this.loading = true
        if(this.form.type===0){
          getSignTBQRSLink(this.form).then(res => {
            setTimeout(() => {
              this.visiblePhone=false
              this.loading = false
            // setTimeout(() => {
            //   this.visiblePhone=false
              window.open(res)
            }, 500)
            // }, 500)
          }).catch(err => {
            this.$tip.apiFailed(err)
          })
        } else if (this.form.type === 1) {
          getMemberListOnlineSignLink(this.form).then(res => {
            setTimeout(() => {
              this.visiblePhone=false
              this.loading = false
            // setTimeout(() => {
            //   this.visiblePhone=false
              window.open(res)
            }, 500)
            // }, 500)
          }).catch(err => {
            this.$tip.apiFailed(err)
          })
        } else if (this.form.type === 2) {
          getSignWTBTBDLink(this.form).then(res => {
            setTimeout(() => {
              this.visiblePhone=false
              this.loading = false
            // setTimeout(() => {
            //   this.visiblePhone=false
              window.open(res)
            }, 500)
            // }, 500)
          }).catch(err => {
            this.$tip.apiFailed(err)
          })
        }
      })
      // })
    },
    send () {
      sendSms({