Browse Source

永诚bug修复

@dongkboy 3 years ago
parent
commit
5478027f84
3 changed files with 163 additions and 5 deletions
  1. 2 2
      config/dev.env.js
  2. 32 0
      src/http/moudules/letter.js
  3. 129 3
      src/views/Letter/Letter.vue

+ 2 - 2
config/dev.env.js

@@ -6,9 +6,9 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
   // BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
-  BASE_URL: '"http://sxzgkj.baoxianzhanggui.com/web-api"',//正式服务器
+  // BASE_URL: '"http://sxzgkj.baoxianzhanggui.com/web-api"',//正式服务器
   // BASE_URL: '"http://192.168.0.111:8080/"' //大哥
-  // BASE_URL: '"http://192.168.0.115:8080/"'
+  BASE_URL: '"http://192.168.0.115:8080/"'
   // BASE_URL: '"http://192.168.0.14:8080/"' //君
 
 })

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

@@ -377,6 +377,38 @@ export const ycgainAccidentSchemeList = (data) => {
         data
     })
 }
+//紫金报价
+export const zijinquote = (data) => {
+  return axios({
+      url: "/order/zijin/quote",
+      method: "post",
+      data
+  })
+}
+//紫金核保
+export const zijinaudit = (data) => {
+  return axios({
+      url: "/order/zijin/audit",
+      method: "post",
+      data
+  })
+}
+//紫金提交影像
+export const zijinsubmitImage = (data) => {
+  return axios({
+      url: "/order/zijin/submitImage",
+      method: "post",
+      data
+  })
+}
+//紫金意外险
+export const zijinqueryVehicleProducts = (data) => {
+  return axios({
+      url: "/order/zijin/queryVehicleProducts",
+      method: "post",
+      data
+  })
+}
 /***
     爬虫统一调用模块
  *

+ 129 - 3
src/views/Letter/Letter.vue

@@ -1029,7 +1029,7 @@
                   <span>保费</span>
                 </div>
               </div>
-              <div class="Risk_data dis align jus" v-for="(kindinfoitem, kindinfoindex) in queryOrders.kindinfo"
+              <div v-if="" class="Risk_data dis align jus" v-for="(kindinfoitem, kindinfoindex) in queryOrders.kindinfo"
                 :key="kindinfoindex">
                 <template>
                   <div>
@@ -2625,6 +2625,14 @@ export default {
     },
   },
   methods: {
+    open2() {
+        this.$notify({
+          title: '警告',
+          message: '这是一条警告的提示消息',
+          type: 'warning',
+          duration: 0
+        });
+      },
     iconfftter(icon){
       return CommonUtil.getDataName({
         dataList: this.global.insCompanyList,
@@ -3064,6 +3072,7 @@ export default {
       this.imageIdList3 = this.tbczcarShow ? this.imageIdList2 : this.imageIdList3;//投保人同车主
       this.imageIdList4 = this.bbczcarShow ? this.imageIdList2 : this.imageIdList4;//被保人同车主
       this.imageIdList4 = this.bbtbcarShow ? this.imageIdList3 : this.imageIdList4; //被保人同投保人
+
       //上传图片
       Promise.all([
         this.$api.letter.uploadImages({ imageIdList: this.imageIdList1, imageType: "C01", quoteNo: this.quoteno }),
@@ -3276,6 +3285,67 @@ export default {
           return;
         }
       });
+    },
+     //紫金报价
+     zijin(num, id) {
+      let params = {
+        accidentalDrivingVo: [],
+        orderNo: this.orderno,
+        companyId: id,
+        agreementId: this.totalCompanyList[num].agreementId,
+      };
+      this.$api.letter.zijinquote(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.oneYearPast(time);
+          this.systartDate = time;
+          this.syendDate = this.oneYearPast(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.oneYearPast(time);
+              } else if (this.riskList[i].riskCode == "0510") {
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast(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
+          };
+          return this.$api.letter.generateOrder(param).then(res => {
+            this.zijin(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;
+        }
+      });
     },
     //永诚报价
     yongcheng(num, id) {
@@ -3507,7 +3577,6 @@ export default {
                 return ele;
               });
             });
-
             this.imgList1 = res.data.C01;
             this.imgList2 = res.data.C02;
             this.imgList3 = res.data.C03;
@@ -3640,6 +3709,60 @@ export default {
                   }
                 });
               break;
+              case "紫金财险":
+              await this.$api.letter
+                .zijinsubmitImage({
+                  companyId: companyId
+                })
+                .then(res => {
+                  if (res.code == "200") {
+                    var _this = this;
+                    _this.$api.letter
+                      .zijinaudit({
+                        companyId: companyId,
+                        jqappoint: "",
+                        syappoint: ""
+                      })
+                      .then(res => {
+                        if (res.code == "200") {
+                          loading.close();
+                          _this.$message({
+                            message: "核保成功",
+                            type: "success"
+                          });
+                          let params = {
+                            companyId: companyId
+                          };
+                          _this.$api.letter.getByCompanyId(params).then(res => {
+                            _this.orderstatus = res.data.orderstatus; //订单状态
+                            _this.underwritingdialogVisible = true;
+                          });
+                        } else {
+                          loading.close();
+                          _this.$message({
+                            showClose: true,
+                            message: res.msg,
+                            type: "error",
+                            duration: 0
+                          });
+                          let params = {
+                            companyId: companyId
+                          };
+                          _this.$api.letter.getByCompanyId(params).then(res => {
+                            _this.orderstatus = res.data.orderstatus; //订单状态
+                          });
+                        }
+                      });
+                  } else {
+                    this.$message({
+                      message: res.msg,
+                      type: "error",
+                      duration: 7000
+                    });
+                    loading.close();
+                  }
+                });
+              break;
             case "恒邦财险":
             case "安盛天平":
             case "众安财险":
@@ -4311,7 +4434,8 @@ export default {
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
           var data = res.data;
-          data.kindinfo.map((ele, index) => {
+          if(data.kindinfo!=null){
+            data.kindinfo.map((ele, index) => {
             switch (ele.kindCode) {
               case "A":
                 ele.amount = "投保";
@@ -4331,6 +4455,8 @@ export default {
             }
             return ele;
           });
+          }
+
           this.queryOrders = data;
           this.logoImg=this.iconfftter(res.data.inscompany)
           this.bjddialogVisible = true;