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

Merge branch 'master' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc

lihongxiao 2 лет назад
Родитель
Сommit
0014adf6ff
2 измененных файлов с 145 добавлено и 13 удалено
  1. 24 0
      src/http/moudules/letter.js
  2. 121 13
      src/views/Letter/Letter.vue

+ 24 - 0
src/http/moudules/letter.js

@@ -82,6 +82,14 @@ export const zhongmeiquote = (data) => {
         data
     })
 }
+//华泰报价
+export const huataiquote = (data) => {
+    return axios({
+        url: '/order/huaTaiApi/quote',
+        method: 'post',
+        data
+    })
+}
 //永诚报价
 export const yongchengquote = (data) => {
     return axios({
@@ -140,6 +148,14 @@ export const insZhongmeisubmitImage = (data) => {
         data
     })
 }
+//华泰提交影像
+export const insHuataisubmitImage = (data) => {
+    return axios({
+        url: "/order/huaTaiApi/submitImage",
+        method: "post",
+        data
+    })
+}
 //永诚提交影像
 export const insyongchengsubmitImage = (data) => {
     return axios({
@@ -196,6 +212,14 @@ export const Zhongmeiaudit = (data) => {
         data
     })
 }
+//华泰核保
+export const huataiaudit = (data) => {
+    return axios({
+        url: '/order/huaTaiApi/audit',
+        method: 'post',
+        data
+    })
+}
 //中煤人工核保
 export const manualUnderwriting = (data) => {
     return axios({

+ 121 - 13
src/views/Letter/Letter.vue

@@ -339,7 +339,7 @@
               <el-select v-model="policyHolderInfo.identifyType" placeholder="身份证" disabled>
                 <el-option label="身份证" value="01"></el-option>
               </el-select>
-              
+
             </el-form-item>
           </el-col>
           <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
@@ -1132,9 +1132,9 @@
             车船税:
             <span>¥{{ queryOrders.taxamount }}</span>
           </div>
-          <div v-if="queryOrders.accidentInfo">
+          <div v-if="queryOrders.jypremium">
             驾意险:
-            <span>¥{{ queryOrders.accidentInfo.sumPremium }}</span>
+            <span>¥{{ queryOrders.jypremium }}</span>
           </div>
           <div v-show="queryOrders.jqstartdate">
             交强险起保日期:
@@ -3594,7 +3594,7 @@ export default {
       this.systartDate=item.startDateSy?item.startDateSy:this.systartDate
       this.syendDate=item.endDateSy?item.endDateSy:this.syendDate
     },
-  
+
     //纳税类型事件
     taxRelifFlagChange(val){
       if (val == 4) {
@@ -4576,6 +4576,63 @@ export default {
         }
       });
     },
+    //华泰报价
+    huatai(num,id){
+      let params = {
+        orderNo: this.orderno,
+        companyId: id,
+        agreementId: this.totalCompanyList[num].agreementId,
+      };
+      this.$api.letter.huataiquote(params).then(res => {
+        this.totalCompanyList[num].msg = res.msg;
+        if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
+          this.totalCompanyList[num].quoteCode = "4";
+          this.totalCompanyList[num].msg = res.msg;
+          return;
+        } else if ( res.data == null && res.msg.indexOf("交强险平台返回") > -1 && res.msg.indexOf(";终保日期") > -1  ) {//判断保司返回重复投保信息,进行默认赋值起终保日期,重新算费  后面联调需要调整
+          let time = res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
+          this.jqstartDate = time;
+          this.jqendDate = this.oneYearPast1(time);
+          this.systartDate = time;
+          this.syendDate = this.oneYearPast1(time);
+          if (this.riskList.length > 0) {
+            for (let i = 0; i < this.riskList.length; i++) {
+              if (this.riskList[i].riskCode == "0507") {
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
+              } else if (this.riskList[i].riskCode == "0510") {
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
+              }
+            }
+          }
+          let param = {
+            userId: this.userId,
+            quoteno: this.quoteno,
+            orderNo: this.orderno,
+            carInfo: this.carInfo,
+            insuredPersonInfo: this.insuredPersonInfo,
+            ownerInfo: this.ownerInfo,
+            policyHolderInfo: this.policyHolderInfo,
+            kindList: this.kindList,
+            riskList: this.riskList,
+            vehicleAndVesselTax:this.vehicleAndVesselTaxForm
+
+          };
+          return this.$api.letter.generateOrder(param).then(res => {
+            this.huatai(num, id);
+          });
+        } else if (!!res.data) {
+          this.totalCompanyList[num].quoteCode = 200;
+          this.totalCompanyList[num].result = res.data;
+          this.QuotationHistory();
+        } else {
+          this.totalCompanyList[num].quoteCode = "3";
+          this.totalCompanyList[num].msg = res.msg;
+          return;
+        }
+      });
+    },
     //紫金报价
     zijin(num, id) {
       let params = {
@@ -4769,7 +4826,7 @@ export default {
         agreementId: this.totalCompanyList[num].agreementId,
       };
       this.$api.letter.guorenquote(params).then(res => {
-      
+
         this.totalCompanyList[num].msg = res.msg;
         if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
           this.totalCompanyList[num].quoteCode = "4";
@@ -5402,6 +5459,57 @@ export default {
                   }
                 });
               break;
+            case "华泰财险":
+              await this.$api.letter
+                .insHuataisubmitImage({
+                  companyId: this.companyId
+                })
+                .then(res => {
+                  if (res.code == "200") {
+                    var _this = this;
+                    _this.$api.letter
+                      .huataiaudit({
+                        companyId: this.companyId,
+                        jqappoint: "",
+                        syappoint: ""
+                      })
+                      .then(res => {
+                        if (res.code == "200") {
+                          loading.close();
+                          _this.$message({
+                            message: "核保成功",
+                            type: "success"
+                          });
+                          this.QuotationHistory();
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
+                            _this.orderstatus = res.data.orderstatus; //订单状态
+                            _this.underwritingdialogVisible = true;
+                            let indexid = this.totalCompanyList.findIndex(item => item.namesimple == this.queryOrders.inscompany);
+                            this.totalCompanyList[indexid].orderstatus = res.data.orderstatus;
+                          });
+                        } else {
+                          loading.close();
+                          _this.$message({
+                            showClose: true,
+                            message: this.queryOrders.inscompany + "提核--:" + res.msg,
+                            type: "error",
+                            duration: 0
+                          });
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
+                            _this.orderstatus = res.data.orderstatus; //订单状态
+                          });
+                        }
+                      });
+                  } else {
+                    this.$message({
+                      message: this.queryOrders.inscompany + "影像--:" + res.msg,
+                      type: "error",
+                      duration: 7000
+                    });
+                    loading.close();
+                  }
+                });
+              break;
             case "紫金财险":
               await this.$api.letter
                 .zijinsubmitImage({
@@ -5855,7 +5963,7 @@ export default {
         this.carInfo.transferDate=""
       }
     },
-   
+
     //影像上传
     drivingupload(file, imageIdList, imgurl, type) {
       let that=this
@@ -5875,7 +5983,7 @@ export default {
       let name=file.raw.name
       var image = new Image();
       image.src = window.URL.createObjectURL(file.raw);
-      that.carfrontImg =  image.src 
+      that.carfrontImg =  image.src
       image.onload = function(){
         let aaa= that.base64ToFile(that.compress(image, 500, 400, 0.7),name)
       const params = new FormData()
@@ -5944,12 +6052,12 @@ export default {
         });
       }
     },
-      compress(img, width, height, ratio) {                
+      compress(img, width, height, ratio) {
           var canvas, ctx, img64;
-          canvas = document.createElement('canvas');                
+          canvas = document.createElement('canvas');
           canvas.width = width;
           canvas.height = height;
-          ctx = canvas.getContext("2d");                
+          ctx = canvas.getContext("2d");
           ctx.drawImage(img, 0, 0, width, height);
           img64 = canvas.toDataURL("image/jpeg", ratio);
           return img64;
@@ -5986,7 +6094,7 @@ export default {
       let name=file.raw.name
       var image = new Image();
       image.src = window.URL.createObjectURL(file.raw);
-      that.carfrontImg =  image.src 
+      that.carfrontImg =  image.src
       image.onload = function(){
         let aaa= that.base64ToFile(that.compress(image, 500, 400, 0.7),name)
 
@@ -6577,7 +6685,7 @@ export default {
       // //上传图片
       const mergedArray = [...this.imageList1, ...this.imageList2, ...this.imageList3, ...this.imageList4];
       let imageparam = {
-        imageList: mergedArray, 
+        imageList: mergedArray,
         quoteNo: this.quoteno
       }
       this.$api.letter.uploadImages(imageparam).then(responses => {
@@ -7469,7 +7577,7 @@ export default {
   .el-upload-list__item {
     width: 198px;
     height: 128px;
-    margin: 0 !important; 
+    margin: 0 !important;
     display: block !important;
   }