Просмотр исходного кода

1、各家保险显示上年信息
2、国任财险电子保单

lihongxiao 2 лет назад
Родитель
Сommit
1fb9b3e4bd
2 измененных файлов с 88 добавлено и 17 удалено
  1. 49 0
      src/views/Letter/Letter.vue
  2. 39 17
      src/views/Letter/Orderlist.vue

+ 49 - 0
src/views/Letter/Letter.vue

@@ -4605,6 +4605,13 @@ export default {
           this.totalCompanyList[num].quoteCode = "-9999";
           this.totalCompanyList[num].msg = res.msg;
         } else {
+          if (res.data.warnMessageList.length > 0) {
+            this.totalCompanyList[num].lastYearMsg = "";
+            let dat = res.data.warnMessageList;
+            dat.map(ele => {
+              this.totalCompanyList[num].lastYearMsg += ele + '<br>';
+            })
+          }
           this.totalCompanyList[num].quoteCode = 200;
           this.totalCompanyList[num].result = res.data;
           this.QuotationHistory();
@@ -4671,6 +4678,13 @@ export default {
             this.zhongmei(num, id);
           });
         } else if (!!res.data) {
+          if (res.data.warnMessageList.length > 0) {
+            this.totalCompanyList[num].lastYearMsg = "";
+            let dat = res.data.warnMessageList;
+            dat.map(ele => {
+              this.totalCompanyList[num].lastYearMsg += ele + '<br>';
+            })
+          }
           this.totalCompanyList[num].quoteCode = 200;
           this.totalCompanyList[num].result = res.data;
           this.QuotationHistory();
@@ -4791,6 +4805,13 @@ export default {
             this.zijin(num, id);
           });
         } else if (!!res.data) {
+          if (res.data.warnMessageList.length > 0) {
+            this.totalCompanyList[num].lastYearMsg = "";
+            let dat = res.data.warnMessageList;
+            dat.map(ele => {
+              this.totalCompanyList[num].lastYearMsg += ele + '<br>';
+            })
+          }
           this.totalCompanyList[num].quoteCode = 200;
           this.totalCompanyList[num].result = res.data;
           this.QuotationHistory();
@@ -5076,6 +5097,13 @@ export default {
                 this.quoteInsurance(num, id, namesimple, apiType);
               });
             } else if (!!res.data) {
+              if (res.data.warnMessageList.length > 0) {
+                this.totalCompanyList[num].lastYearMsg = "";
+                let dat = res.data.warnMessageList;
+                dat.map(ele => {
+                  this.totalCompanyList[num].lastYearMsg += ele + '<br>';
+                })
+              }
               this.totalCompanyList[num].quoteCode = 200;
               this.totalCompanyList[num].result = res.data;
               this.QuotationHistory();
@@ -5146,6 +5174,13 @@ export default {
                 this.quoteInsurance(num, id, namesimple, apiType);
               });
             } else if (!!res.data) {
+              if (res.data.warnMessageList.length > 0) {
+                this.totalCompanyList[num].lastYearMsg = "";
+                let dat = res.data.warnMessageList;
+                dat.map(ele => {
+                  this.totalCompanyList[num].lastYearMsg += ele + '<br>';
+                })
+              }
               this.totalCompanyList[num].quoteCode = 200;
               this.totalCompanyList[num].result = res.data;
               this.QuotationHistory();
@@ -5215,6 +5250,13 @@ export default {
                 this.quoteInsurance(num, id, namesimple, apiType);
               });
             } else if (!!res.data) {
+              if (res.data.warnMessageList.length > 0) {
+                this.totalCompanyList[num].lastYearMsg = "";
+                let dat = res.data.warnMessageList;
+                dat.map(ele => {
+                  this.totalCompanyList[num].lastYearMsg += ele + '<br>';
+                })
+              }
               this.totalCompanyList[num].quoteCode = 200;
               this.totalCompanyList[num].result = res.data;
               this.QuotationHistory();
@@ -5239,6 +5281,13 @@ export default {
                     </div>`
                 });
               }
+              if (res.data.warnMessageList.length > 0) {
+                this.totalCompanyList[num].lastYearMsg = "";
+                let dat = res.data.warnMessageList;
+                dat.map(ele => {
+                  this.totalCompanyList[num].lastYearMsg += ele + '<br>';
+                })
+              }
               this.totalCompanyList[num].quoteCode = 200;
               this.totalCompanyList[num].result = res.data;
 

+ 39 - 17
src/views/Letter/Orderlist.vue

@@ -2355,7 +2355,7 @@ export default {
                 })
               }
               break;
-              case "国任财险":
+            case "国任财险":
               if (this.orderInfo.jqpolicyno) {
                 this.$api.letter.guoRengetPolicyPrint({
                   companyId: item.id,
@@ -2363,20 +2363,24 @@ export default {
                   type: '2',//2:保单
                 }).then(res => {
                   if (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,
-                      });
-                    }
+                    this.oldfileList.push({
+                      fileTitle: "交强电子保单",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  }
+                })
+                this.$api.letter.guoRengetPolicyPrint({
+                  companyId: item.id,
+                  riskCode: "0507",
+                  type: '1',//1:标志
+                }).then(res => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子标志",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
                   }
                 })
               }
@@ -2386,15 +2390,33 @@ export default {
                   riskCode: "0510",
                   type: '2',//2:保单
                 }).then(res => {
-                  if (res.data && res.data.syUrl) {
+                  if (res.data) {
                     this.oldfileList.push({
                       fileTitle: "商业电子保单",
                       filename: this.orderInfo.sypolicyno,
-                      fileurl: res.data.syUrl,
+                      fileurl: res.data,
                     });
                   }
                 })
               }
+              if (this.orderInfo.crossInsurance.length > 0) {
+                this.orderInfo.crossInsurance.map(ele => {
+                  this.$api.letter.guoRengetPolicyPrint({
+                    companyId: item.id,
+                    policyNumber: ele.policyNumber,
+                    riskCode: "0513",
+                    type: '2',//2:保单
+                  }).then(res => {
+                    if (res.data) {
+                      this.oldfileList.push({
+                        fileTitle: "驾意险保单",
+                        filename: ele.policyNumber,
+                        fileurl: res.data,
+                      });
+                    }
+                  })
+                })
+              }
               break;
             case "紫金财险":
               if (this.orderInfo.jqpolicyno) {