li.pengfei 2 лет назад
Родитель
Сommit
7b8cd0058c
2 измененных файлов с 132 добавлено и 0 удалено
  1. 24 0
      src/http/moudules/letter.js
  2. 108 0
      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({

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

@@ -4557,6 +4557,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 = {
@@ -5372,6 +5429,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({