Kaynağa Gözat

华泰电子保单

@dongkboy 2 yıl önce
ebeveyn
işleme
a7fc1101ba
1 değiştirilmiş dosya ile 96 ekleme ve 50 silme
  1. 96 50
      src/views/Task/daikeComponents/KtOrder.vue

+ 96 - 50
src/views/Task/daikeComponents/KtOrder.vue

@@ -302,7 +302,7 @@
           <div>非车险:{{ jypremium }}</div>
           <div>非车险:{{ jypremium }}</div>
         </div>
         </div>
         <div>
         <div>
-          <img v-if="['太平财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" />
+          <img v-if="['太平财险', '华泰财险'].includes(inscompany)" :src="paycodeimg" alt style="width:200px;height: 200px;" />
           <div v-else id="qrcode" ref="qrcode"></div>
           <div v-else id="qrcode" ref="qrcode"></div>
         </div>
         </div>
         <div class="scan-code">
         <div class="scan-code">
@@ -1008,8 +1008,6 @@ export default {
           this.systartdate = res.data.syStartDate; //商业起保日期
           this.systartdate = res.data.syStartDate; //商业起保日期
           // this.mobile = res.data.applyinfo.mobile;//投保人手机号
           // this.mobile = res.data.applyinfo.mobile;//投保人手机号
           let qrCodeUrl = res.data.qrCodeUrl;
           let qrCodeUrl = res.data.qrCodeUrl;
-          console.log(item.apiType)
-          console.log(qrCodeUrl)
           this.$api.letter.getThemeByUserId().then(res => {
           this.$api.letter.getThemeByUserId().then(res => {
             if (res.code == 200) {
             if (res.code == 200) {
               if (res.data[0] == 'GD') {
               if (res.data[0] == 'GD') {
@@ -1356,55 +1354,103 @@ export default {
                 }
                 }
                 break;
                 break;
               case "华泰财险":
               case "华泰财险":
-                let HtApiType =
-                  item.apiType == 2
-                    ? "pythongetPolicyPrint"
-                    : "HuataigetPolicyPrint";
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter[HtApiType]({
-                    [this.apiType == 2 ? "subOrderNo" : "companyId"]: item.id,
-                    riskCode: "0507",
-                    type: "2" //2:保单
-                  })
-                    .then(res => {
-                      if (res.data) {
-                        if (res.data.jqxPolicyUrl) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子保单",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqxPolicyUrl
-                          });
-                        }
-                        if (res.data.jqxFlagUrl) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子标志",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqxFlagUrl
-                          });
-                        }
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter[HtApiType]({
-                    [this.apiType == 2 ? "subOrderNo" : "companyId"]: item.id,
-                    riskCode: "0510",
-                    type: "2" //2:保单
-                  })
-                    .then(res => {
-                      if (res.data && res.data.syxPolicyUrl) {
-                        businessList.push({
-                          fileTitle: "商业电子保单",
-                          filename: this.orderInfo.sypolicyno,
-                          fileurl: res.data.syxPolicyUrl
+                switch (item.apiType) {
+                  case 1:
+                    if (this.orderInfo.jqpolicyno) {
+                      this.$api.letter.HuataigetPolicyPrint({
+                        companyId: item.id,
+                        riskCode: "0507",
+                        type: "2" //2:保单
+                      })
+                        .then(res => {
+                          if (res.data) {
+                            if (res.data.jqxPolicyUrl) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子保单",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: res.data.jqxPolicyUrl
+                              });
+                            }
+                            if (res.data.jqxFlagUrl) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子标志",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: res.data.jqxFlagUrl
+                              });
+                            }
+                          } else {
+                            this.$message.error(res.msg);
+                          }
                         });
                         });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
+                    }
+                    if (this.orderInfo.sypolicyno) {
+                      this.$api.letter.HuataigetPolicyPrint({
+                        companyId: item.id,
+                        riskCode: "0510",
+                        type: "2" //2:保单
+                      })
+                        .then(res => {
+                          if (res.data && res.data.syxPolicyUrl) {
+                            businessList.push({
+                              fileTitle: "商业电子保单",
+                              filename: this.orderInfo.sypolicyno,
+                              fileurl: res.data.syxPolicyUrl
+                            });
+                          } else {
+                            this.$message.error(res.msg);
+                          }
+                        });
+                    }
+                    break;
+                  case 2:
+                    if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
+                      this.$api.letter
+                        .pythongetPolicyPrint({
+                          subOrderNo: item.id
+                        })
+                        .then(res => {
+                          if (res.code == 200 && res.data) {
+                            if (res.data.jqxPolicyUrl) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子保单",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: res.data.jqxPolicyUrl
+                              });
+                            }
+                            if (res.data.jqxFlagUrl) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子标志",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: res.data.jqxFlagUrl
+                              });
+                            }
+                            if (res.data.syxPolicyUrl) {
+                              businessList.push({
+                                fileTitle: "商业电子保单",
+                                filename: this.orderInfo.sypolicyno,
+                                fileurl: res.data.syxPolicyUrl
+                              });
+                            }
+                            if (
+                              res.data.jyxInfoList &&
+                              res.data.jyxInfoList.length > 0
+                            ) {
+                              res.data.jyxInfoList.forEach(val => {
+                                accidentList.push({
+                                  fileTitle: "驾意险保单",
+                                  filename: "驾意险保单",
+                                  fileurl: val.jyx_policy_url
+                                });
+                              });
+                            }
+                          } else {
+                            this.$message.error(res.msg);
+                          }
+                        });
+                    }
+                    break;
                 }
                 }
+
                 break;
                 break;
               case "中煤财险":
               case "中煤财险":
                 if (this.orderInfo.jqpolicyno) {
                 if (this.orderInfo.jqpolicyno) {