瀏覽代碼

报价修改

@dongkboy 3 年之前
父節點
當前提交
8e779709da

+ 2 - 2
config/dev.env.js

@@ -5,9 +5,9 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
-  BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
+  // BASE_URL: '"http://39.98.239.48/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/"' //君
 
 })

+ 1 - 2
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -2215,7 +2215,7 @@ export default {
           this.costform.scheme = scheme;
           this.nonCarProductCosts = res.data.nonCarProductCosts;
           this.UnderwritingRules = res.data.underwritingRules;
-          // this.attributionform = res.data.ptlAgreementAttribution;
+          this.attributionform = res.data.ptlAgreementAttribution;
           if (res.data.dept.length > 0) {
             res.data.dept.map(ele => {
               this.treekeys.push(ele.deptId);
@@ -2385,7 +2385,6 @@ export default {
         return
       })
       this.CostfactorForm.licenseNumber = linumber.slice(0, -1)
-
     },
     vehicleCategoryChange(e) {
       let data = "";

+ 119 - 20
src/views/Letter/Letter.vue

@@ -2884,26 +2884,10 @@ export default {
       this.imageIdList4 = this.bbtbcarShow ? this.imageIdList3 : this.imageIdList4; //被保人同投保人
       //上传图片
       Promise.all([
-        this.$api.letter.uploadImages({
-          imageIdList: this.imageIdList1,
-          imageType: "C01",
-          quoteNo: this.quoteno
-        }),
-        this.$api.letter.uploadImages({
-          imageIdList: this.imageIdList2,
-          imageType: "C02",
-          quoteNo: this.quoteno
-        }),
-        this.$api.letter.uploadImages({
-          imageIdList: this.imageIdList3,
-          imageType: "C03",
-          quoteNo: this.quoteno
-        }),
-        this.$api.letter.uploadImages({
-          imageIdList: this.imageIdList4,
-          imageType: "C04",
-          quoteNo: this.quoteno
-        })
+        this.$api.letter.uploadImages({imageIdList: this.imageIdList1,imageType: "C01",quoteNo: this.quoteno}),
+        this.$api.letter.uploadImages({imageIdList: this.imageIdList2,imageType: "C02",quoteNo: this.quoteno}),
+        this.$api.letter.uploadImages({imageIdList: this.imageIdList3,imageType: "C03",quoteNo: this.quoteno}),
+        this.$api.letter.uploadImages({imageIdList: this.imageIdList4,imageType: "C04",quoteNo: this.quoteno})
       ])
         .then(responses => {
           this.imageEcho(this.quoteno); // 获取图片
@@ -3231,6 +3215,69 @@ export default {
         }
       });
     },
+    //众安报价
+    zhongan(num, id) {
+      let api = '';
+      api = this.totalCompanyList[num].apiType == 2 ? "pythonquote" : "anshengquote";
+      let params = {
+        orderNo: this.orderno,
+        companyId: id,
+        agreementId: this.totalCompanyList[num].agreementId,
+      };
+      this.$api.letter[api](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";
+          let Aortime = this.transformTime2(time); //终保日期的后一天
+          this.jqstartDate = Aortime;
+          this.jqendDate = this.oneYearPast(Aortime);
+          this.systartDate = Aortime;
+          this.syendDate = this.oneYearPast(Aortime);
+          if (this.riskList.length > 0) {
+            for (let i = 0; i < this.riskList.length; i++) {
+              if (this.riskList[i].riskCode == "0507") {
+                this.riskList[i].startDate = Aortime;
+                this.riskList[i].endDate = this.oneYearPast(Aortime);
+              } else if (this.riskList[i].riskCode == "0510") {
+                this.riskList[i].startDate = Aortime;
+                this.riskList[i].endDate = this.oneYearPast(Aortime);
+              }
+            }
+          }
+          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.zhongan(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) {
       let accidentalDrivingVo = {};
@@ -3767,6 +3814,58 @@ export default {
                   }
                 });
               break;
+              case "众安财险":
+              let zhonganapi = "";
+              zhonganapi = apiType == 2 ? "pythonsubmitImage" : "anshengsubmitImage"
+              await this.$api.letter[zhonganapi]({
+                orderNo: this.orderno
+              })
+                .then(res => {
+                  if (res.code == "200") {
+                    var _this = this;
+                    let zhonganapi1 = "";
+                    zhonganapi1 = apiType == 2 ? "pythonaudit" : "anshengaudit"
+                    _this.$api.letter
+                    [zhonganapi1]({
+                      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
+                          });
+                        }
+                      });
+                  } else {
+                    loading.close();
+                    this.$message({
+                      message: res.msg,
+                      type: "error",
+                      duration: 7000
+                    });
+                  }
+                });
+              break;
           }
         }
       });

+ 1 - 21
src/views/ProductManage/CarInsurance/ProductEntry.vue

@@ -164,6 +164,7 @@ export default {
             message: '删除成功',
             type: 'success'
           })
+          this.findPage();
         } else {
           this.$message({
             message: '操作失败',
@@ -172,27 +173,7 @@ export default {
         }
       })
     },
-    handleTableBatchDelete(data) {
-      let params = [];
-      let isFalg = true;
-      for (let i = 0; i < data.params.length; i++) {
-        this.$api.product.productTree(data.params[i].id).then(res => {
-          if (res.data.length > 1) {
-            isFalg = false;
-            this.$message({
-              message: '产品类型(' + res.data[0].id + '-' + res.data[0].name + ')下存在产品,请先清空产品',
-              type: 'info'
-            })
-          }
-          params.push(res.data[0].id);
-          if ((i == (data.params.length - 1)) && isFalg) {
-            this.$api.product.deleteProduct(params).then(data != null ? data.callback : '')
-          }
-        });
-      }
-    },
     //-- tree end-------
-
     // 右侧按钮方法Start
     handleAddProduct() {
       this.operType = "ADD";//'ADD','EDIT'
@@ -200,7 +181,6 @@ export default {
       this.productDialogVisible = true;
     },
     // 右侧按钮方法End
-
     // 右侧列表的方法Start
     findPage(data) {
       // 获取分页数据