Procházet zdrojové kódy

1、大家报价、核保、查看保单功能
2、永诚添加意外险

lihongxiao před 2 roky
rodič
revize
51d62c0acf

+ 2 - 2
config/dev.env.js

@@ -5,10 +5,10 @@ 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://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
-  // BASE_URL: '"http:///192.168.0.106:8080/"',//田智
+  BASE_URL: '"http:///192.168.0.253:8080/"',//田智
 })
 
 

+ 41 - 1
src/http/moudules/letter.js

@@ -129,7 +129,14 @@ export const hengbangquote = (data) => {
         data
     })
 }
-
+//大家报价
+export const dajiaquote = (data) => {
+    return axios({
+        url: '/api/dajia/quote',
+        method: 'post',
+        data
+    })
+}
 //核保接口
 export const queryOrder = (data) => {
     return axios({
@@ -203,6 +210,15 @@ export const anshengsubmitImage = (data) => {
         data
     })
 }
+//大家提交影像
+export const dajiasubmitImage = (data) => {
+    return axios({
+        url: "/api/dajia/submitImage",
+        method: "post",
+        data
+    })
+}
+
 //永安核保
 export const yonganaudit = (data) => {
     return axios({
@@ -283,6 +299,14 @@ export const anshengaudit = (data) => {
         data
     })
 }
+//大家核保
+export const dajiaaudit = (data) => {
+    return axios({
+        url: '/api/dajia/audit',
+        method: 'post',
+        data
+    })
+}
 //永安电子保单
 export const getPolicyPrint = (data) => {
     return axios({
@@ -646,6 +670,22 @@ export const updateOrderInfoGuoren = (data) => {
         data
     })
 }
+//大家缴费状态查询
+export const updateOrderInfoDajia = (data) => {
+    return axios({
+        url: "api/dajia/verifyPayment" ,
+        method:"post",
+        data
+    })
+}
+//大家查询保单接口
+export const obtainWarranty = (data) => {
+    return axios({
+        url: "api/dajia/obtainWarranty" ,
+        method:"post",
+        data
+    })
+}
 /***
     爬虫统一调用模块
  */

+ 189 - 1
src/views/Letter/Letter.vue

@@ -1019,7 +1019,7 @@
                     </el-select>
                   </el-form-item>
                   <el-form-item label="份数:" style="margin-right:30px;">
-                    <el-input-number  v-model="guoRenaccidentForm.quantity" @change="numberCopieschange" :min="1" :max="guoRenaccidentForm.policyNum"></el-input-number>
+                    <el-input-number  v-model="guoRenaccidentForm.quantity" @change="numberCopieschangeGr" :min="1" :max="guoRenaccidentForm.policyNum"></el-input-number>
                     <span style="margin-left: 5px;">份</span>
                   </el-form-item>
                   <el-form-item label="保费:">
@@ -2248,6 +2248,7 @@ export default {
         premium:0
       }, //国任意外险内容
       accidentPremium: "",
+      accidentPremiumGr:'',
       pickerOptions: {
         disabledDate(time) {
           //若选择的日期小于当前日期(包含今天)
@@ -3852,6 +3853,11 @@ export default {
           agreementId:this.guoRenaccidentForm.agreementId
         });
         if (data.code == 200) {
+          let num = 0;
+            data.data.forEach(item => {
+              num += Number(item.premium);
+            });
+        this.accidentPremiumGr = num
           this.accidentLoading=false
           this.guoRenaccidentDataListChild = data.data;
         }
@@ -3908,6 +3914,9 @@ export default {
     numberCopieschange(index) {
       this.accidentForm.premium = Number(this.accidentPremium) * index;
     },
+    numberCopieschangeGr(index) {
+      this.guoRenaccidentForm.premium = Number(this.accidentPremiumGr) * index;
+    },
     continuousChange(id) {
       this.continuousCompanyList.map(ele => {
         if (ele.id == id) {
@@ -4143,6 +4152,9 @@ export default {
             if (res.code == 200) {
               this.accidentDataList = res.data;
             }
+            else{
+              this.accidentDataList = []
+            }
           });
           break;
         case '国任财险':
@@ -4151,6 +4163,9 @@ export default {
             if (res.code == 200) {
               this.guoRenaccidentDataList = res.data;
             }
+            else{
+              this.guoRenaccidentDataList = []
+            }
           });
           break;
         case '紫金财险':
@@ -4706,6 +4721,7 @@ export default {
         }
       }
     },
+    
     //中煤报价
     zhongmei(num, id) {
       let accidentalDrivingVo={};
@@ -4775,6 +4791,75 @@ export default {
         }
       });
     },
+    // 大家报价
+    dajia(num, id) {
+      let accidentalDrivingVo={};
+      // if(this.zhongmeiaccidentalDrivingVo){
+      //   accidentalDrivingVo.rideRiskCode=this.zhongmeiaccidentalDrivingVo.schemeNo;
+      //   accidentalDrivingVo.rideRiskName=this.zhongmeiaccidentalDrivingVo.schemeName;
+      //   accidentalDrivingVo.quantity=this.zhongmeiaccidentalDrivingVo.quantity;
+      // }
+
+      let params = {
+        accidentalDrivingVo: accidentalDrivingVo,
+        orderNo: this.orderno,
+        companyId: id,
+        agreementId: this.totalCompanyList[num].agreementId,
+      };
+      this.$api.letter.dajiaquote(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) {
+          this.totalCompanyList[num].lastYearMsg = "<b>交强险</b><br>" + res.msg.slice(res.msg.indexOf("起保日期 "), res.msg.indexOf("地区 山西。") + 6);
+          let time =
+            res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
+          this.jqstartDate = time;
+          this.jqendDate = 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);
+              }
+            }
+          }
+          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.dajia(num, id);
+          });
+        } else if (!!res.data) {
+          if (res.data.warnMessageList && 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();
+        } else {
+          this.totalCompanyList[num].quoteCode = "3";
+          this.totalCompanyList[num].msg = res.msg;
+          return;
+        }
+      });
+    },
     //华泰报价
     huatai(num,id){
       let params = {
@@ -5531,6 +5616,57 @@ export default {
                   }
                 });
               break;
+              case "中煤财险":
+              await this.$api.letter
+                .insZhongmeisubmitImage({
+                  companyId: this.companyId
+                })
+                .then(res => {
+                  if (res.code == "200") {
+                    var _this = this;
+                    _this.$api.letter
+                      .Zhongmeiaudit({
+                        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
                 .insHuataisubmitImage({
@@ -5787,10 +5923,62 @@ export default {
                   }
                 });
               break;
+            case "大家财险":
+              await this.$api.letter
+                .dajiasubmitImage({
+                  companyId: this.companyId
+                })
+                .then(res => {
+                  if (res.code == "200") {
+                    var _this = this;
+                    _this.$api.letter
+                      .dajiaaudit({
+                        companyId: this.companyId
+                      })
+                      .then(res => {
+                        if (res.code == "200") {
+                          loading.close();
+                          _this.cqryCdeJq = "";
+                          _this.cqryCdeSy = "";
+                          _this.renewalCodeJq = "";
+                          _this.renewalCodeSy = "";
+                          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,
+                            customClass: "customNotifyClass",
+                            type: "error",
+                            duration: 0
+                          });
+                        }
+                      });
+                  } else {
+                    loading.close();
+                    this.$message({
+                      message: this.queryOrders.inscompany + "影像--:" + res.msg,
+                      type: "error",
+                      duration: 7000
+                    });
+                  }
+                });
+              break;
           }
         }
       });
     },
+   
     //当前日期的次日
     transformTime1() {
       var date = new Date();

+ 115 - 0
src/views/Letter/Orderlist.vue

@@ -113,6 +113,12 @@
                 <el-button size="mini" type="text"
                 v-if="item.orderstatus == '1' && item.inscompany=='国任财险'"
                 @click="refreshStatusGuoren(item)" style="color:#f56c6c">更新订单</el-button>
+                <el-button size="mini" type="text"
+                v-if="item.orderstatus == '1' && item.inscompany=='大家财险'"
+                @click="refreshStatusDajia(item)" style="color:#f56c6c">更新订单</el-button>
+                <el-button size="mini" type="text"
+                v-if="item.orderstatus == '2' && item.inscompany=='大家财险'"
+                @click="refreshStatusDajia(item)" style="color:#f56c6c">状态更新</el-button>
 
               <el-button size="mini" type="text" v-if="item.orderstatus == '2' && ['紫金财险'].includes(item.inscompany)"
                 @click="cancelorder(item)" style="color:#f56c6c">撤单</el-button>
@@ -1146,6 +1152,32 @@ export default {
         }
       })
     },
+    // 大家刷新核保状态
+    refreshStatusDajia(item){
+      this.$api.letter.updateOrderInfoDajia( {companyId:item.id} ).then(res => {
+        if(res.code==200){
+          this.$message({ message:res.msg?res.msg:'已刷新状态', type: "success" })
+          this.loading = true;
+            this.$api.letter.queryOrders(this.pageRequest).then((res) => {
+              if (res.code == "200") {
+                this.loading = false;
+                this.pageResult = res.data.content;
+                this.pageNum = res.data.pageNum;
+                this.totalSize = res.data.totalSize;
+                this.pageResult.forEach(val => {
+                  this.$set(val, "expanded", false);
+                });
+              } else {
+                this.loading = false;
+              }
+            })
+        }
+        else{
+          this.$message({ message:res.msg, type: "error" })
+        }
+      })
+    },
+    
     //华泰刷新核保状态
     updateStatusHuatai(item){
       this.$api.letter.orderStatushuatai( {companyId:item.id} ).then(res => {
@@ -1660,6 +1692,24 @@ export default {
                   }
                 })
               }
+              if (this.orderInfo.crossInsurance.length > 0) {
+                this.orderInfo.crossInsurance.map(ele => {
+                  this.$api.letter.yongchenggetPolicyPrint({
+                    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.jyUrl,
+                      });
+                    }
+                  })
+                })
+              }
               break;
             case "国任财险":
               if (this.orderInfo.jqpolicyno) {
@@ -1710,6 +1760,7 @@ export default {
                   this.$api.letter.guoRengetPolicyPrint({
                     companyId: item.id,
                     policyNumber: ele.policyNumber,
+
                     riskCode: "0513",
                     type: '2',//2:保单
                   }).then(res => {
@@ -1831,12 +1882,76 @@ export default {
                 })
               }
               break;
+            case "大家财险":
+            if (this.orderInfo.jqpolicyno) {
+                this.$api.letter.obtainWarranty({
+                  companyId: item.id,
+                  riskCode: "0507",
+                  type: '2',//2:保单
+                }).then(res => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子保单",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  }
+                })
+                this.$api.letter.obtainWarranty({
+                  companyId: item.id,
+                  riskCode: "0507",
+                  type: '1',//1:标志
+                }).then(res => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "交强电子标志",
+                      filename: this.orderInfo.jqpolicyno,
+                      fileurl: res.data,
+                    });
+                  }
+                })
+              }
+              if (this.orderInfo.sypolicyno) {
+                this.$api.letter.obtainWarranty({
+                  companyId: item.id,
+                  riskCode: "0510",
+                  type: '2',//2:保单
+                }).then(res => {
+                  if (res.data) {
+                    this.oldfileList.push({
+                      fileTitle: "商业电子保单",
+                      filename: this.orderInfo.sypolicyno,
+                      fileurl: res.data,
+                    });
+                  }
+                })
+              }
+              if (this.orderInfo.crossInsurance.length > 0) {
+                this.orderInfo.crossInsurance.map(ele => {
+                  this.$api.letter.zijingetPolicyPrint({
+                    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;
             default:
           }
           this.showInsureList = false;
           this.quotedetailsdialogVisible = true; //在页面上显示订单
         } else {
           this.$message.error("订单获取失败");
+
         }
       });
     },