Kaynağa Gözat

审核加loding

@dongkboy 2 yıl önce
ebeveyn
işleme
c7ab0e4a4f

+ 564 - 547
src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyuntasks.vue

@@ -5,17 +5,17 @@
     <el-table size="small" :data="pageResult" height="590" border v-loading="loading" highlight-current-row stripe
       @expand-change="handleRowChange" ref="expandTable"
       :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }">
-      <el-table-column prop="subOrderId" label="订单号" align="center"  ></el-table-column>
-      <el-table-column prop="username" label="业务员" align="center"  width="200">
+      <el-table-column prop="subOrderId" label="订单号" align="center"></el-table-column>
+      <el-table-column prop="username" label="业务员" align="center" width="200">
         <template slot-scope="scope">
           <span>{{ scope.row.username }}({{ scope.row.userid }})</span>
         </template>
       </el-table-column>
       <el-table-column prop="managementSource" label="机构来源" align="center">
         <template slot-scope="scope">
-          <el-tag v-if=" scope.row.managementSource=='渠道'" >渠道</el-tag>
-          <el-tag v-if=" scope.row.managementSource=='个代'" type="success">个代</el-tag>
-          <el-tag v-if=" scope.row.managementSource=='电销'" type="warning">电销</el-tag>
+          <el-tag v-if="scope.row.managementSource == '渠道'">渠道</el-tag>
+          <el-tag v-if="scope.row.managementSource == '个代'" type="success">个代</el-tag>
+          <el-tag v-if="scope.row.managementSource == '电销'" type="warning">电销</el-tag>
         </template>
       </el-table-column>
       <el-table-column prop="agreementName" label="协议名称" align="center" width="180"></el-table-column>
@@ -26,7 +26,7 @@
       </el-table-column>
       <el-table-column prop="isExternal" label="外部订单" align="center">
         <template slot-scope="scope">
-          <span>{{ scope.row.isExternal=='1' ?'是' : '否' }}</span>
+          <span>{{ scope.row.isExternal == '1' ? '是' : '否' }}</span>
         </template>
       </el-table-column>
 
@@ -35,8 +35,8 @@
           <span>{{ scope.row.partnerCompaniesName ? scope.row.partnerCompaniesName : '--' }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="licenseno" label="车牌号"  align="center"></el-table-column>
-      <el-table-column prop="insuredname" label="投保人姓名" align="center" ></el-table-column>
+      <el-table-column prop="licenseno" label="车牌号" align="center"></el-table-column>
+      <el-table-column prop="insuredname" label="投保人姓名" align="center"></el-table-column>
       <el-table-column prop="product" label="投保险种" align="center"></el-table-column>
       <el-table-column prop="auditStatus" label="状态" align="center">
         <template slot-scope="scope">
@@ -45,17 +45,16 @@
           <el-tag v-if="scope.row.auditStatus == '2'" type="danger" size="small">审核驳回</el-tag>
         </template>
       </el-table-column>
-      <el-table-column prop="createtime" label="录单日期" align="center"  width="140"></el-table-column>
-      <el-table-column prop="signingTime" label="签单时间" align="center"  width="140"></el-table-column>
-      <el-table-column prop="payDate" label="支付时间" align="center"  width="140"></el-table-column>
+      <el-table-column prop="createtime" label="录单日期" align="center" width="140"></el-table-column>
+      <el-table-column prop="signingTime" label="签单时间" align="center" width="140"></el-table-column>
+      <el-table-column prop="payDate" label="支付时间" align="center" width="140"></el-table-column>
       <el-table-column label="操作" align="center" min-width="100" fixed="right">
         <template slot-scope="scope">
           <kt-button label="审核" type="text" perms="carInsurance:expenseVerification:pendingReview:review"
             @click="OrderDetails(scope.row)" />
-            <!-- <kt-button label="轨迹" type="text" perms="carInsurance:expenseVerification:pendingReview:trajectory"
+          <!-- <kt-button label="轨迹" type="text" perms="carInsurance:expenseVerification:pendingReview:trajectory"
             @click="trajectory(scope.row)" /> -->
-            <kt-button label="轨迹" type="text"
-            @click="trajectory(scope.row)" />
+          <kt-button label="轨迹" type="text" @click="trajectory(scope.row)" />
         </template>
       </el-table-column>
     </el-table>
@@ -75,10 +74,10 @@
       </div>
       <div style="height: 300px; overflow-y: auto">
         <el-steps direction="vertical" :active="trajectoryTable.length - 1" finish-status="success">
-          <el-step :title=" auditstatusCap(item.auditstatus)" :key="item.id" v-for="item in trajectoryTable">
+          <el-step :title="auditstatusCap(item.auditstatus)" :key="item.id" v-for="item in trajectoryTable">
             <template slot="description">
               <div>保险公司:{{ item.insCompany }} <span style="margin-left:15px">创建用户:{{ item.operator }}</span></div>
-              <div>创建时间:{{item.operatorTime}}</div>
+              <div>创建时间:{{ item.operatorTime }}</div>
             </template>
           </el-step>
         </el-steps>
@@ -101,8 +100,8 @@ export default {
   },
   data() {
     return {
-      ddgjdialogVisible:false,
-      trajectoryTable:[],
+      ddgjdialogVisible: false,
+      trajectoryTable: [],
       feeOrderNewVoList: {},
       isAuditing: {},
       oldFeeInfo: [],//原始跟单费用比例
@@ -255,7 +254,7 @@ export default {
           type: 'date',
           list: 'signList'
         },
-          {
+        {
           name: ["payStartDateStr", "payEndDateStr"],
           label: '支付时间',
           type: 'date',
@@ -346,14 +345,14 @@ export default {
         return "审核驳回";
       }
     },
-    trajectory(row){
+    trajectory(row) {
       // let a='1797905916021248000'
       this.$api.task.getFeeAuditHistory(row.orderno).then((res) => {
-        if(res.code==200 && res.data.length>0){
-          this.trajectoryTable=res.data
-          this.ddgjdialogVisible=true
+        if (res.code == 200 && res.data.length > 0) {
+          this.trajectoryTable = res.data
+          this.ddgjdialogVisible = true
         }
-        else{
+        else {
           this.$message.error('暂无数据!')
         }
       });
@@ -448,9 +447,9 @@ export default {
           })
           console.log(data)
           this.feeOrderNewVoList = {
-              deptManagerFee: data.deptManagerFee,
-              list: [...data.entranceFee,...data.exportFee],
-            }
+            deptManagerFee: data.deptManagerFee,
+            list: [...data.entranceFee, ...data.exportFee],
+          }
           this.$message({
             type: 'success',
             message: res.msg,
@@ -468,25 +467,43 @@ export default {
     },
     //审核通过
     adusitFUn() {
-      let subParam = {
-        orderNo: this.orderInfo.orderno,
-        jqCostsProportionStr: this.adjustFeeDescInfo.jqAllFeeRate,
-        syCostsProportionStr: this.adjustFeeDescInfo.syAllFeeRate,
-        updateFlag: this.adjustFeeFlag ? "1" : "0",
-      }
-      this.$api.task.auditFee(subParam).then((res) => {
-        if (res.code == 200) {
-          this.$message({
-            type: 'success',
-            message:"审核通过",
-          });
-          this.findPage();
-          // this.quotedetailsdialogVisible = false;
-          this.$refs.detailsDialog.setBackupVisible(false);
-        } else {
-          this.$message.error(res.msg)
+      console.log(1)
+      this.$confirm('是否确认审核?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+        let subParam = {
+          orderNo: this.orderInfo.orderno,
+          jqCostsProportionStr: this.adjustFeeDescInfo.jqAllFeeRate,
+          syCostsProportionStr: this.adjustFeeDescInfo.syAllFeeRate,
+          updateFlag: this.adjustFeeFlag ? "1" : "0",
         }
-      })
+        this.$api.task.auditFee(subParam).then((res) => {
+          if (res.code == 200) {
+            loading.close();
+            this.$message({
+              type: 'success',
+              message: "审核通过",
+            });
+            this.findPage();
+            // this.quotedetailsdialogVisible = false;
+            this.$refs.detailsDialog.setBackupVisible(false);
+          } else {
+            loading.close();
+            this.$message.error(res.msg)
+          }
+        })
+      }).catch(() => {
+
+      });
+
     },
     toChinesNum(num) {
       let changeNum = [
@@ -711,7 +728,7 @@ export default {
             })
             this.feeOrderNewVoList = {
               deptManagerFee: data.deptManagerFee,
-              list: [...data.entranceFee,...data.exportFee],
+              list: [...data.entranceFee, ...data.exportFee],
             }
           }
           res.data.carinfo.carnature = this.natureOfVehicleUseCap(res.data.carinfo.carnature)
@@ -724,11 +741,11 @@ export default {
           let businessList = []
           let accidentList = []
           if (res.data.orderstatus == "3") {
-            if(res.data.isExternal==1){
+            if (res.data.isExternal == 1) {
               this.$api.letter
-              .getPolicyPrintexternalOrder(res.data.id).then(res1=>{
-                if(res1.code==200){
-                  if (res1.data.jqPolicy) {
+                .getPolicyPrintexternalOrder(res.data.id).then(res1 => {
+                  if (res1.code == 200) {
+                    if (res1.data.jqPolicy) {
                       this.oldfileList.push({
                         fileTitle: "交强电子保单",
                         filename: this.orderInfo.jqpolicyno,
@@ -741,7 +758,7 @@ export default {
                         filename: this.orderInfo.jqpolicyno,
                         fileurl: res1.data.jqSign
                       });
-                      }
+                    }
                     if (res1.data.syPolicy) {
                       accidentList.push({
                         fileTitle: "商业电子保单",
@@ -757,200 +774,179 @@ export default {
                       });
                     }
                   }
-                else{
-                  this.$message.error(res1.msg)
-                }
-              })
+                  else {
+                    this.$message.error(res1.msg)
+                  }
+                })
             }
-            else{
-            switch (res.data.inscompany) {
-              case "永安财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .getPolicyPrint({
-                      companyId: res.data.id,
-                      policytype: "jq",
-                    })
-                    .then((res) => {
-                      //交强保单
-                      if (res.data) {
-                        let result = res.data.replace(/[\r\n]/g, "");
-                        let pdfBase64 = `data:application/pdf;base64,${result}`;
-                        base64ToPath(pdfBase64).then((path) => {
-                          if (path) {
+            else {
+              switch (res.data.inscompany) {
+                case "永安财险":
+                  if (this.orderInfo.jqpolicyno) {
+                    this.$api.letter
+                      .getPolicyPrint({
+                        companyId: res.data.id,
+                        policytype: "jq",
+                      })
+                      .then((res) => {
+                        //交强保单
+                        if (res.data) {
+                          let result = res.data.replace(/[\r\n]/g, "");
+                          let pdfBase64 = `data:application/pdf;base64,${result}`;
+                          base64ToPath(pdfBase64).then((path) => {
+                            if (path) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子保单",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: path,
+                              });
+                            }
+                          });
+                        }
+                      });
+                    this.$api.letter
+                      .getPolicyPrint2({
+                        companyId: res.data.id,
+                        policytype: "jq",
+                      })
+                      .then((res) => {
+                        //交强保单
+                        if (res.data) {
+                          let result = res.data.replace(/[\r\n]/g, "");
+                          let pdfBase64 = `data:application/pdf;base64,${result}`;
+                          base64ToPath(pdfBase64).then((path) => {
+                            if (path) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子标志",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: path,
+                              });
+                            }
+                          });
+                        }
+                      });
+                  }
+                  if (this.orderInfo.sypolicyno) {
+                    this.$api.letter
+                      .getPolicyPrint({
+                        companyId: res.data.id,
+                        policytype: "sy",
+                      })
+                      .then((res) => {
+                        //商业保单
+                        if (res.data) {
+                          let result = res.data.replace(/[\r\n]/g, "");
+                          let pdfBase64 = `data:application/pdf;base64,${result}`;
+                          base64ToPath(pdfBase64).then((path) => {
+                            if (path) {
+                              businessList.push({
+                                fileTitle: "商业电子保单",
+                                filename: this.orderInfo.sypolicyno,
+                                fileurl: path,
+                              });
+                            }
+                          });
+                        }
+                      });
+                  }
+                  break;
+                case "华泰财险":
+                  if (this.orderInfo.jqpolicyno) {
+                    this.$api.letter
+                      .HuataigetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0507",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
+                          if (res.data.jqxPolicyUrl) {
                             this.oldfileList.push({
                               fileTitle: "交强电子保单",
                               filename: this.orderInfo.jqpolicyno,
-                              fileurl: path,
+                              fileurl: res.data.jqxPolicyUrl,
                             });
                           }
-                        });
-                      }
-                    });
-                  this.$api.letter
-                    .getPolicyPrint2({
-                      companyId: res.data.id,
-                      policytype: "jq",
-                    })
-                    .then((res) => {
-                      //交强保单
-                      if (res.data) {
-                        let result = res.data.replace(/[\r\n]/g, "");
-                        let pdfBase64 = `data:application/pdf;base64,${result}`;
-                        base64ToPath(pdfBase64).then((path) => {
-                          if (path) {
+                          if (res.data.jqxFlagUrl) {
                             this.oldfileList.push({
                               fileTitle: "交强电子标志",
                               filename: this.orderInfo.jqpolicyno,
-                              fileurl: path,
-                            });
-                          }
-                        });
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .getPolicyPrint({
-                      companyId: res.data.id,
-                      policytype: "sy",
-                    })
-                    .then((res) => {
-                      //商业保单
-                      if (res.data) {
-                        let result = res.data.replace(/[\r\n]/g, "");
-                        let pdfBase64 = `data:application/pdf;base64,${result}`;
-                        base64ToPath(pdfBase64).then((path) => {
-                          if (path) {
-                            businessList.push({
-                              fileTitle: "商业电子保单",
-                              filename: this.orderInfo.sypolicyno,
-                              fileurl: path,
+                              fileurl: res.data.jqxFlagUrl,
                             });
                           }
-                        });
-                      }
-                    });
-                }
-                break;
-              case "华泰财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .HuataigetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        if (res.data.jqxPolicyUrl) {
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  }
+                  if (this.orderInfo.sypolicyno) {
+                    this.$api.letter
+                      .HuataigetPolicyPrint({
+                        companyId: res.data.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 "中煤财险":
+                  if (this.orderInfo.jqpolicyno) {
+                    this.$api.letter
+                      .ZhongmeigetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0507",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data && res.data[0]) {
                           this.oldfileList.push({
                             fileTitle: "交强电子保单",
                             filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqxPolicyUrl,
+                            fileurl: res.data[0],
                           });
+                        } else {
+                          this.$message.error(res.msg);
                         }
-                        if (res.data.jqxFlagUrl) {
+                      });
+                    this.$api.letter
+                      .ZhongmeigetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0507",
+                        type: "1", // 1:标志
+                      })
+                      .then((res) => {
+                        if (res.data && res.data[0]) {
                           this.oldfileList.push({
                             fileTitle: "交强电子标志",
                             filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqxFlagUrl,
+                            fileurl: res.data[0],
                           });
+                        } else {
+                          this.$message.error(res.msg);
                         }
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .HuataigetPolicyPrint({
-                      companyId: res.data.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 "中煤财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .ZhongmeigetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data && res.data[0]) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子保单",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data[0],
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                  this.$api.letter
-                    .ZhongmeigetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "1", // 1:标志
-                    })
-                    .then((res) => {
-                      if (res.data && res.data[0]) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子标志",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data[0],
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .ZhongmeigetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0510",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data && res.data[0]) {
-                        businessList.push({
-                          fileTitle: "商业电子保单",
-                          filename: this.orderInfo.sypolicyno,
-                          fileurl: res.data[0],
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.crossInsurance.length > 0) {
-                  this.orderInfo.crossInsurance.map((ele) => {
+                      });
+                  }
+                  if (this.orderInfo.sypolicyno) {
                     this.$api.letter
                       .ZhongmeigetPolicyPrint({
-                        ridePolicyNo: ele.ridePolicyNo,
                         companyId: res.data.id,
-                        riskCode: "0513",
+                        riskCode: "0510",
                         type: "2", //2:保单
                       })
                       .then((res) => {
-                        if (res.code == 200 && res.data) {
-                          accidentList.push({
-                            fileTitle: "驾意险保单",
+                        if (res.data && res.data[0]) {
+                          businessList.push({
+                            fileTitle: "商业电子保单",
                             filename: this.orderInfo.sypolicyno,
                             fileurl: res.data[0],
                           });
@@ -958,419 +954,440 @@ export default {
                           this.$message.error(res.msg);
                         }
                       });
-                  });
-                }
-                break;
-              case "永诚财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .yongchenggetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.code == 200 && res.data) {
-                        if (res.data.jqUrl) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子保单",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqUrl,
-                          });
-                        }
-                        if (res.data.jqFlagUrl) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子标志",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqFlagUrl,
-                          });
-                        }
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .yongchenggetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0510",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data && res.data.syUrl) {
-                        businessList.push({
-                          fileTitle: "商业电子保单",
-                          filename: this.orderInfo.sypolicyno,
-                          fileurl: res.data.syUrl,
+                  }
+                  if (this.orderInfo.crossInsurance.length > 0) {
+                    this.orderInfo.crossInsurance.map((ele) => {
+                      this.$api.letter
+                        .ZhongmeigetPolicyPrint({
+                          ridePolicyNo: ele.ridePolicyNo,
+                          companyId: res.data.id,
+                          riskCode: "0513",
+                          type: "2", //2:保单
+                        })
+                        .then((res) => {
+                          if (res.code == 200 && res.data) {
+                            accidentList.push({
+                              fileTitle: "驾意险保单",
+                              filename: this.orderInfo.sypolicyno,
+                              fileurl: res.data[0],
+                            });
+                          } else {
+                            this.$message.error(res.msg);
+                          }
                         });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
                     });
-                }
-                if (this.orderInfo.crossInsurance.length > 0) {
-                  this.orderInfo.crossInsurance.map((ele) => {
+                  }
+                  break;
+                case "永诚财险":
+                  if (this.orderInfo.jqpolicyno) {
                     this.$api.letter
                       .yongchenggetPolicyPrint({
                         companyId: res.data.id,
-                        policyNumber: ele.policyNumber,
-                        riskCode: "0513",
+                        riskCode: "0507",
                         type: "2", //2:保单
                       })
                       .then((res) => {
                         if (res.code == 200 && res.data) {
-                          accidentList.push({
-                            fileTitle: "驾意险保单",
-                            filename: ele.policyNumber,
-                            fileurl: res.data.jyUrl,
-                          });
+                          if (res.data.jqUrl) {
+                            this.oldfileList.push({
+                              fileTitle: "交强电子保单",
+                              filename: this.orderInfo.jqpolicyno,
+                              fileurl: res.data.jqUrl,
+                            });
+                          }
+                          if (res.data.jqFlagUrl) {
+                            this.oldfileList.push({
+                              fileTitle: "交强电子标志",
+                              filename: this.orderInfo.jqpolicyno,
+                              fileurl: res.data.jqFlagUrl,
+                            });
+                          }
                         } else {
                           this.$message.error(res.msg);
                         }
                       });
-                  });
-                }
-                break;
-              case "国任财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .guoRengetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子保单",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data,
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                  this.$api.letter
-                    .guoRengetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "1", //1:标志
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子标志",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data,
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .guoRengetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0510",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        businessList.push({
-                          fileTitle: "商业电子保单",
-                          filename: this.orderInfo.sypolicyno,
-                          fileurl: res.data,
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.crossInsurance.length > 0) {
-                  this.orderInfo.crossInsurance.map((ele) => {
+                  }
+                  if (this.orderInfo.sypolicyno) {
                     this.$api.letter
-                      .guoRengetPolicyPrint({
+                      .yongchenggetPolicyPrint({
                         companyId: res.data.id,
-                        policyNumber: ele.policyNumber,
-
-                        riskCode: "0513",
+                        riskCode: "0510",
                         type: "2", //2:保单
                       })
                       .then((res) => {
-                        if (res.data) {
-                          accidentList.push({
-                            fileTitle: "驾意险保单",
-                            filename: ele.policyNumber,
-                            fileurl: res.data,
+                        if (res.data && res.data.syUrl) {
+                          businessList.push({
+                            fileTitle: "商业电子保单",
+                            filename: this.orderInfo.sypolicyno,
+                            fileurl: res.data.syUrl,
                           });
                         } else {
                           this.$message.error(res.msg);
                         }
                       });
-                  });
-                }
-                break;
-
-              case "紫金财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .zijingetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子保单",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data,
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                  this.$api.letter
-                    .zijingetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "1", //1:标志
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子标志",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data,
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .zijingetPolicyPrint({
-                      companyId: res.data.id,
-                      riskCode: "0510",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        businessList.push({
-                          fileTitle: "商业电子保单",
-                          filename: this.orderInfo.sypolicyno,
-                          fileurl: res.data,
+                  }
+                  if (this.orderInfo.crossInsurance.length > 0) {
+                    this.orderInfo.crossInsurance.map((ele) => {
+                      this.$api.letter
+                        .yongchenggetPolicyPrint({
+                          companyId: res.data.id,
+                          policyNumber: ele.policyNumber,
+                          riskCode: "0513",
+                          type: "2", //2:保单
+                        })
+                        .then((res) => {
+                          if (res.code == 200 && res.data) {
+                            accidentList.push({
+                              fileTitle: "驾意险保单",
+                              filename: ele.policyNumber,
+                              fileurl: res.data.jyUrl,
+                            });
+                          } else {
+                            this.$message.error(res.msg);
+                          }
                         });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
                     });
-                }
-                if (this.orderInfo.crossInsurance.length > 0) {
-                  this.orderInfo.crossInsurance.map((ele) => {
+                  }
+                  break;
+                case "国任财险":
+                  if (this.orderInfo.jqpolicyno) {
                     this.$api.letter
-                      .zijingetPolicyPrint({
+                      .guoRengetPolicyPrint({
                         companyId: res.data.id,
-                        policyNumber: ele.policyNumber,
-                        riskCode: "0513",
+                        riskCode: "0507",
                         type: "2", //2:保单
                       })
                       .then((res) => {
                         if (res.data) {
-                          accidentList.push({
-                            fileTitle: "驾意险保单",
-                            filename: ele.policyNumber,
+                          this.oldfileList.push({
+                            fileTitle: "交强电子保单",
+                            filename: this.orderInfo.jqpolicyno,
                             fileurl: res.data,
                           });
                         } else {
                           this.$message.error(res.msg);
                         }
                       });
-                  });
-                }
-                break;
-              case "渤海财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .getPolicyPrintboHai({
-                      companyId: res.data.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.$api.letter
+                      .guoRengetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0507",
+                        type: "1", //1:标志
+                      })
+                      .then((res) => {
+                        if (res.data) {
                           this.oldfileList.push({
                             fileTitle: "交强电子标志",
                             filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqxFlagUrl,
+                            fileurl: res.data,
                           });
+                        } else {
+                          this.$message.error(res.msg);
                         }
-                        if (res.data.syxPolicyUrl) {
+                      });
+                  }
+                  if (this.orderInfo.sypolicyno) {
+                    this.$api.letter
+                      .guoRengetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0510",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
                           businessList.push({
                             fileTitle: "商业电子保单",
                             filename: this.orderInfo.sypolicyno,
-                            fileurl: res.data.syxPolicyUrl,
+                            fileurl: res.data,
                           });
+                        } else {
+                          this.$message.error(res.msg);
                         }
-                        if (
-                          res.data.jyxInfoList &&
-                          res.data.jyxInfoList.length > 0
-                        ) {
-                          res.data.jyxInfoList.forEach((val) => {
+                      });
+                  }
+                  if (this.orderInfo.crossInsurance.length > 0) {
+                    this.orderInfo.crossInsurance.map((ele) => {
+                      this.$api.letter
+                        .guoRengetPolicyPrint({
+                          companyId: res.data.id,
+                          policyNumber: ele.policyNumber,
+
+                          riskCode: "0513",
+                          type: "2", //2:保单
+                        })
+                        .then((res) => {
+                          if (res.data) {
                             accidentList.push({
                               fileTitle: "驾意险保单",
-                              filename: "驾意险保单",
-                              fileurl: val.jyx_policy_url,
+                              filename: ele.policyNumber,
+                              fileurl: res.data,
                             });
-                          });
-                        }
-                      } else {
-                        this.$message.error(res.msg);
-                      }
+                          } else {
+                            this.$message.error(res.msg);
+                          }
+                        });
                     });
-                }
-                break;
-              case "恒邦财险":
-              case "安盛天平":
-              case "中国人寿":
-              case "太平财险":
-              case "华农财险":
-              case "众安财险":
-                if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .pythongetPolicyPrint({
-                      subOrderNo: res.data.id,
-                    })
-                    .then((res) => {
-                      if (res.code == 200 && res.data) {
-                        if (res.data.jqxPolicyUrl) {
+                  }
+                  break;
+
+                case "紫金财险":
+                  if (this.orderInfo.jqpolicyno) {
+                    this.$api.letter
+                      .zijingetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0507",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
                           this.oldfileList.push({
                             fileTitle: "交强电子保单",
                             filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqxPolicyUrl,
+                            fileurl: res.data,
                           });
+                        } else {
+                          this.$message.error(res.msg);
                         }
-                        if (res.data.jqxFlagUrl) {
+                      });
+                    this.$api.letter
+                      .zijingetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0507",
+                        type: "1", //1:标志
+                      })
+                      .then((res) => {
+                        if (res.data) {
                           this.oldfileList.push({
                             fileTitle: "交强电子标志",
                             filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data.jqxFlagUrl,
+                            fileurl: res.data,
                           });
+                        } else {
+                          this.$message.error(res.msg);
                         }
-                        if (res.data.syxPolicyUrl) {
+                      });
+                  }
+                  if (this.orderInfo.sypolicyno) {
+                    this.$api.letter
+                      .zijingetPolicyPrint({
+                        companyId: res.data.id,
+                        riskCode: "0510",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
                           businessList.push({
                             fileTitle: "商业电子保单",
                             filename: this.orderInfo.sypolicyno,
-                            fileurl: res.data.syxPolicyUrl,
+                            fileurl: res.data,
                           });
+                        } else {
+                          this.$message.error(res.msg);
                         }
-                        if (
-                          res.data.jyxInfoList &&
-                          res.data.jyxInfoList.length > 0
-                        ) {
-                          res.data.jyxInfoList.forEach((val) => {
+                      });
+                  }
+                  if (this.orderInfo.crossInsurance.length > 0) {
+                    this.orderInfo.crossInsurance.map((ele) => {
+                      this.$api.letter
+                        .zijingetPolicyPrint({
+                          companyId: res.data.id,
+                          policyNumber: ele.policyNumber,
+                          riskCode: "0513",
+                          type: "2", //2:保单
+                        })
+                        .then((res) => {
+                          if (res.data) {
                             accidentList.push({
                               fileTitle: "驾意险保单",
-                              filename: "驾意险保单",
-                              fileurl: val.jyx_policy_url,
+                              filename: ele.policyNumber,
+                              fileurl: res.data,
                             });
-                          });
-                        }
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                break;
-              case "大家财险":
-                if (this.orderInfo.jqpolicyno) {
-                  this.$api.letter
-                    .obtainWarranty({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子保单",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data,
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                  this.$api.letter
-                    .obtainWarranty({
-                      companyId: res.data.id,
-                      riskCode: "0507",
-                      type: "1", //1:标志
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        this.oldfileList.push({
-                          fileTitle: "交强电子标志",
-                          filename: this.orderInfo.jqpolicyno,
-                          fileurl: res.data,
-                        });
-                      } else {
-                        this.$message.error(res.msg);
-                      }
-                    });
-                }
-                if (this.orderInfo.sypolicyno) {
-                  this.$api.letter
-                    .obtainWarranty({
-                      companyId: res.data.id,
-                      riskCode: "0510",
-                      type: "2", //2:保单
-                    })
-                    .then((res) => {
-                      if (res.data) {
-                        businessList.push({
-                          fileTitle: "商业电子保单",
-                          filename: this.orderInfo.sypolicyno,
-                          fileurl: res.data,
+                          } else {
+                            this.$message.error(res.msg);
+                          }
                         });
-                      }
                     });
-                }
-                if (this.orderInfo.crossInsurance.length > 0) {
-                  this.orderInfo.crossInsurance.map((ele) => {
+                  }
+                  break;
+                case "渤海财险":
+                  if (this.orderInfo.jqpolicyno) {
                     this.$api.letter
-                      .zijingetPolicyPrint({
+                      .getPolicyPrintboHai({
                         companyId: res.data.id,
-                        policyNumber: ele.policyNumber,
-                        riskCode: "0513",
+                      })
+                      .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;
+                case "恒邦财险":
+                case "安盛天平":
+                case "中国人寿":
+                case "太平财险":
+                case "华农财险":
+                case "众安财险":
+                  if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
+                    this.$api.letter
+                      .pythongetPolicyPrint({
+                        subOrderNo: res.data.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;
+                case "大家财险":
+                  if (this.orderInfo.jqpolicyno) {
+                    this.$api.letter
+                      .obtainWarranty({
+                        companyId: res.data.id,
+                        riskCode: "0507",
                         type: "2", //2:保单
                       })
                       .then((res) => {
                         if (res.data) {
-                          accidentList.push({
-                            fileTitle: "驾意险保单",
-                            filename: ele.policyNumber,
+                          this.oldfileList.push({
+                            fileTitle: "交强电子保单",
+                            filename: this.orderInfo.jqpolicyno,
                             fileurl: res.data,
                           });
                         } else {
                           this.$message.error(res.msg);
                         }
                       });
-                  });
-                }
-                break;
-              default:
+                    this.$api.letter
+                      .obtainWarranty({
+                        companyId: res.data.id,
+                        riskCode: "0507",
+                        type: "1", //1:标志
+                      })
+                      .then((res) => {
+                        if (res.data) {
+                          this.oldfileList.push({
+                            fileTitle: "交强电子标志",
+                            filename: this.orderInfo.jqpolicyno,
+                            fileurl: res.data,
+                          });
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  }
+                  if (this.orderInfo.sypolicyno) {
+                    this.$api.letter
+                      .obtainWarranty({
+                        companyId: res.data.id,
+                        riskCode: "0510",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
+                          businessList.push({
+                            fileTitle: "商业电子保单",
+                            filename: this.orderInfo.sypolicyno,
+                            fileurl: res.data,
+                          });
+                        }
+                      });
+                  }
+                  if (this.orderInfo.crossInsurance.length > 0) {
+                    this.orderInfo.crossInsurance.map((ele) => {
+                      this.$api.letter
+                        .zijingetPolicyPrint({
+                          companyId: res.data.id,
+                          policyNumber: ele.policyNumber,
+                          riskCode: "0513",
+                          type: "2", //2:保单
+                        })
+                        .then((res) => {
+                          if (res.data) {
+                            accidentList.push({
+                              fileTitle: "驾意险保单",
+                              filename: ele.policyNumber,
+                              fileurl: res.data,
+                            });
+                          } else {
+                            this.$message.error(res.msg);
+                          }
+                        });
+                    });
+                  }
+                  break;
+                default:
+              }
             }
-          }
 
             let obj = {
               oldfileList: this.oldfileList,