lihongxiao 2 vuotta sitten
vanhempi
commit
8aceb80f4e

+ 2 - 2
config/dev.env.js

@@ -6,8 +6,8 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
   // BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
-  BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
-  // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
+  // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
+  BASE_URL: '"http://192.168.0.115:8080/"' //凯森
   // BASE_URL: '"http:///192.168.0.253:8082/"',//田智
   // BASE_URL: '"http:///192.168.0.253:8082/"',//田智
   // BASE_URL: '"http:///192.168.0.36:8080/"',//靖燕龙

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

@@ -800,4 +800,69 @@ export const auditStatusQueryZijin = (data) => {
         method: "post",
         data
     })
-}
+}
+// 渤海非车1接口
+export const productQueryboHai = (data) => {
+    return axios({
+        url: "/order/boHaiApi/productQuery",
+        method: "post",
+        data
+    })
+}
+// 渤海非车2接口
+export const productDetailsQueryboHai = (data) => {
+    return axios({
+        url: "/order/boHaiApi/productDetailsQuery",
+        method: "post",
+        data
+    })
+}
+// 渤海报价
+export const bohaiquote = (data) => {
+    return axios({
+        url: '/order/boHaiApi/quote',
+        method: 'post',
+        data
+    })
+}
+// 渤海影像
+export const insbohaisubmitImage = (data) => {
+    return axios({
+        url: "/order/boHaiApi/submitImage",
+        method: "post",
+        data
+    })
+}
+//渤海核保
+export const bohaiaudit = (data) => {
+    return axios({
+        url: '/order/boHaiApi/audit',
+        method: 'post',
+        data
+    })
+}
+//渤海缴费状态查询
+export const orderStatusbohai = (data) => {
+    return axios({
+        url: "/order/boHaiApi/auditStatusQuery",
+        method: "post",
+        data
+    })
+}
+
+//渤海状态查询
+export const getOrderDetailboHai = (data) => {
+    return axios({
+        url: "/order/boHaiApi/getOrderDetail",
+        method: "post",
+        data
+    })
+  }
+  //渤海电子保单
+export const getPolicyPrintboHai = (data) => {
+    return axios({
+        url: "/order/boHaiApi/getPolicyPrint",
+        method: "post",
+        data
+    })
+  }

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

@@ -1966,6 +1966,77 @@
                 </el-table>
               </div>
             </template>
+            <template
+              v-if="reslistitem.namesimple == '渤海财险' && reslistitem.checked && reslistitem.agreementId"
+            >
+              <div class="flex f-c Driving-risk" style="margin-top:15px">
+                <el-form
+                  :inline="true"
+                  :model="boHaiaccidentForm"
+                  class="demo-form-inline"
+                  size="small"
+                >
+                  <el-form-item label="意外险类型" style="margin-right:30px;">
+                    <el-select
+                      clearable
+                      placeholder="未选择"
+                      @clear="clearAccidentFormGr"
+                      @change="bhcxchange"
+                      v-model="boHaiaccidentForm.packageCode"
+                    >
+                      <el-option
+                        v-for="(item, index) in boHaiaccidentDataList"
+                        :key="index"
+                        :label="item.packageName"
+                        :value="item.packageCode"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                  <el-form-item label=" ">
+                    <el-select
+                      clearable
+                      v-model="boHaiaccidentForm.productCode"
+                      v-loading="accidentLoadingbh"
+                      @change="bhcxchangeChild"
+                    >
+                      <el-option
+                        v-for="(item, index) in boHaiaccidentDataListChild"
+                        :key="index"
+                        :label="item.coverageName"
+                        :value="item.productCode"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                  <el-form-item label="选择份数" style="margin-right:30px;">
+                    <el-input-number
+                      v-model="boHaiaccidentForm.copies"
+                      :min="1"
+                      controls-position="right"
+                    ></el-input-number>
+                  </el-form-item>
+                  <el-form-item label="保费:">
+                    <span>{{boHaiaccidentForm.premium*boHaiaccidentForm.policyNum}}&ensp;元</span>
+                  </el-form-item>
+                </el-form>
+                <el-table
+                  v-if="boHaiaccidentForm.prodCode"
+                  size="small"
+                  :data="boHaiaccidenttableData"
+                  border
+                  ref="expandTable"
+                  highlight-current-row
+                  :header-cell-style="{ background: '#F7F7F9 ', fontWeight: '700', color: '#333333' }"
+                >
+                  <el-table-column prop="liabName" label="保险责任" align="center"></el-table-column>
+                  <el-table-column prop="liabAmount" label="保额 (元)" align="center"></el-table-column>
+                  <el-table-column prop="liabPremium" label="保费 (元)" align="center">
+                    <template slot-scope="scope" >
+                      ¥{{scope.row.liabPremium }}
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </div>
+            </template>
           </div>
         </div>
       </div>
@@ -3252,6 +3323,14 @@ export default {
         quantity: "1",
         unitPremium:0
       }, //中煤意外险内容
+      boHaiaccidentDataList:[], //渤海意外险
+      boHaiaccidentDataListChild:[],
+      boHaiaccidentForm:{
+        copies:'1',
+        policyNum:0
+      },
+      accidentLoadingbh:false,
+      boHaiaccidenttableData:[],
       accidentPremium: "",
       accidentPremiumGr:'',
       accidentPremiumZM:'',
@@ -5073,6 +5152,43 @@ else{
       if(index){
         this.ZADrivingChange(this.ZRInsuranceData[0])
       }
+    },
+     // 渤海选择意外险类型
+     async bhcxchange(index) {
+      if(index){
+        this.accidentLoadingbh=true
+        this.boHaiaccidentForm.copies = "1";
+        // this.guoRenaccidentForm.productCode=""
+        let data = await this.$api.letter.productDetailsQueryboHai({
+          packageCode: index,
+          agreementId:this.guoRenaccidentForm.agreementId
+        });
+        if (data.code == 200) {
+          let num = 0;
+            data.data.forEach(item => {
+              num += Number(item.premium);
+            });
+          this.accidentLoadingbh=false
+          this.boHaiaccidentDataListChild = data.data;
+        }
+        else{
+          this.accidentLoadingbh=false
+          this.$message.error(data.msg)
+          this.boHaiaccidentDataListChild=[]
+        }
+      }
+    },
+     // 渤海选择意外险子级类型
+     async bhcxchangeChild(index) {
+      let list=this.boHaiaccidentDataListChild.find(val => val.prodCode == index)
+      this.boHaiaccidentForm={
+        ... this.boHaiaccidentForm,
+        copies:list.copies,
+        riskCode:list.riskCode,
+        amount:list.amount,
+        policyNum:Number(list.policyNum)
+      }
+      this.boHaiaccidenttableData=list.prodCvgLiabList
     },
      // 国任选择意外险类型
      async grcxchange(index) {
@@ -5100,8 +5216,6 @@ else{
           this.guoRenaccidentDataListChild=[]
         }
       }
-
-
     },
      // 国任选择意外险子级类型
      async grcxchangeChild(index) {
@@ -5318,6 +5432,30 @@ else{
             }
           });
           break;
+          case '渤海财险':
+          this.boHaiaccidentForm.agreementId = item.agreementId
+          let productQueryVo={
+            agreementId:item.agreementId,
+            carnature:this.carInfo.carnature,
+            cimodelclass: this.carInfo.cimodelclass,
+            exhaustScale: this.carInfo.enginedesc,
+            limitLoad:this.carInfo.limitLoad,
+            powerScale:this.carInfo.powerScale,
+            seatCount:this.carInfo.seatCount,
+            vehicleUse:this.carInfo.vehicleUse,
+            insuredPersonInfo:this.insuredPersonInfo,
+            policyHolderInfo:this.policyHolderInfo,
+
+          }
+          this.$api.letter.productQueryboHai(productQueryVo).then(res => {
+            if (res.code == 200) {
+              this.boHaiaccidentDataList = res.data;
+            }
+            else{
+              this.boHaiaccidentDataList = [];
+            }
+          });
+          break;
         case '紫金财险':
           this.$api.letter.zijinqueryVehicleProducts({ agreementId: val, seatCount: Number(this.carInfo.seatCount) }).then(res => {
             if (res.code == 200) {
@@ -6550,7 +6688,6 @@ else{
             kindList: this.kindList,
             riskList: this.riskList,
         vehicleAndVesselTax:this.vehicleAndVesselTaxForm
-
           };
           return this.$api.letter.generateOrder(param).then(res => {
             this.guoRen(num, id);
@@ -6587,6 +6724,99 @@ else{
         }
       });
     },
+    //渤海报价
+    bohai(num, id) {
+      let accidentalDrivingVo = [];
+      // if ( this.boHaiaccidentForm.goodsCode) {
+      //   accidentalDrivingVo = {
+      //     ...this.boHaiaccidentForm,
+      //   };
+      // }
+      let params = {
+        accidentalDrivingVo,
+        orderNo: this.orderno,
+        companyId: id,
+        cqryCdeJq: this.cqryCdeJq,
+        cqryCdeSy: this.cqryCdeSy,
+        renewalCodeJq: this.renewalCodeJq,
+        renewalCodeSy: this.renewalCodeSy,
+        agreementId: this.totalCompanyList[num].agreementId,
+      };
+      this.$api.letter.bohaiquote(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.bohai(num, id);
+          });
+        } else if (res.code == "200") {
+          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 if (res.code == "101") {
+          this.totalCompanyList[num].quoteCode = "101";
+          this.totalCompanyList[num].msg = res.msg;
+          this.cqryCdeJq = res.data.cqryCdeJq;
+          this.cqryCdeSy = res.data.cqryCdeSy;
+          let jq = res.data.renewalCodeJq.replace(/[\r\n]/g, "");
+          let jqBase64 = `data:image/png;base64,${jq}`;
+          this.renewalCodeJqImg = jqBase64;
+          if (res.data.renewalCodeSy) {
+            let sy = res.data.renewalCodeSy.replace(/[\r\n]/g, "");
+            let syBase64 = `data:image/png;base64,${sy}`;
+            this.renewalCodeSyImg = syBase64;
+          }
+          this.renewalCodedialogVisible = true;
+        } else {
+          this.totalCompanyList[num].quoteCode = "3";
+          this.totalCompanyList[num].msg = res.msg;
+          return;
+        }
+      });
+    },
 
     // 爬虫对接
     quoteInsurance(num, id, namesimple, apiType) {
@@ -7176,6 +7406,56 @@ else{
                   }
                 });
               break;
+            case "渤海财险":
+              await this.$api.letter
+                .insbohaisubmitImage({
+                  companyId: this.companyId
+                })
+                .then(res => {
+                  if (res.code == "200") {
+                    var _this = this;
+                    _this.$api.letter
+                      .bohaiaudit({
+                        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: res.msg,
+                            type: "error",
+                            duration: 0
+                          });
+                        }
+                      });
+                  } else {
+                    loading.close();
+                    this.$message({
+                      message: res.msg,
+                      type: "error",
+                      duration: 7000
+                    });
+                  }
+                });
+              break;
             case "恒邦财险":
             case "华农财险":
             case "太平财险":

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

@@ -193,6 +193,7 @@
                     '中国人寿',
                     '安盛天平',
                     '紫金财险',
+                    '渤海财险',
                   ].includes(item.inscompany) "
                 @click="refreshStatus(item)"
                 class="red_color"
@@ -251,6 +252,7 @@
                     '华泰财险',
                     '国任财险',
                     '中煤财险',
+                    '渤海财险',
                   ].includes(item.inscompany)
                 "
                 class="blue_color"
@@ -651,6 +653,7 @@
                       '华泰财险',
                       '国任财险',
                       '中煤财险',
+                      '渤海财险',
                     ].includes(scope.row.inscompany)
                   "
                   @click="querystatus(scope.row, 'history')"
@@ -1019,6 +1022,7 @@ export default {
         中国人寿: "auditStatusQuery",
         安盛天平: "auditStatusQuery",
         紫金财险: "auditStatusQueryZijin",
+        渤海财险:'orderStatusbohai'
       };
       Object.keys(inscompany).forEach((val) => {
         if (val == item.inscompany) {
@@ -1093,6 +1097,7 @@ export default {
         大家财险: "updateOrderInfoDajia",
         紫金财险: "getOrderDetail",
         中煤财险: "paymentEnquiry",
+        渤海财险: "getOrderDetailboHai",
       };
       Object.keys(inscompany).forEach((val) => {
         if (val == item.inscompany) {
@@ -1767,6 +1772,85 @@ export default {
                   });
                 }
                 break;
+                case "渤海财险":
+                if (this.orderInfo.jqpolicyno) {
+                  this.$api.letter
+                    .getPolicyPrintboHai({
+                      companyId: item.id,
+                      riskCode: "0507",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子保单",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                  this.$api.letter
+                    .getPolicyPrintboHai({
+                      companyId: item.id,
+                      riskCode: "0507",
+                      type: "1", //1:标志
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        this.oldfileList.push({
+                          fileTitle: "交强电子标志",
+                          filename: this.orderInfo.jqpolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.sypolicyno) {
+                  this.$api.letter
+                    .getPolicyPrintboHai({
+                      companyId: item.id,
+                      riskCode: "0510",
+                      type: "2", //2:保单
+                    })
+                    .then((res) => {
+                      if (res.data) {
+                        businessList.push({
+                          fileTitle: "商业电子保单",
+                          filename: this.orderInfo.sypolicyno,
+                          fileurl: res.data,
+                        });
+                      } else {
+                        this.$message.error(res.msg);
+                      }
+                    });
+                }
+                if (this.orderInfo.crossInsurance.length > 0) {
+                  this.orderInfo.crossInsurance.map((ele) => {
+                    this.$api.letter
+                      .guoRengetPolicyPrint({
+                        companyId: item.id,
+                        policyNumber: ele.policyNumber,
+                        riskCode: "0513",
+                        type: "2", //2:保单
+                      })
+                      .then((res) => {
+                        if (res.data) {
+                          accidentList.push({
+                            fileTitle: "驾意险保单",
+                            filename: ele.policyNumber,
+                            fileurl: res.data,
+                          });
+                        } else {
+                          this.$message.error(res.msg);
+                        }
+                      });
+                  });
+                }
+                break;
               case "紫金财险":
                 if (this.orderInfo.jqpolicyno) {
                   this.$api.letter

+ 3 - 3
src/views/Letter/components/quotationDialog.vue

@@ -50,13 +50,13 @@
                 </li>
             </div>
             <el-descriptions  :column="5" border direction="vertical">
-                <el-descriptions-item label="应缴金额" >
-                    <span style="color:#D42426">¥{{ queryOrders.sumpremium }}</span>
-                </el-descriptions-item>
                 <el-descriptions-item label="交强险" >{{ queryOrders.jqpremium?'¥'+queryOrders.jqpremium:'-' }}</el-descriptions-item>
                 <el-descriptions-item label="车船税" >{{ queryOrders.taxamount?'¥'+ queryOrders.taxamount:'-' }}</el-descriptions-item>
                 <el-descriptions-item label="车辆商业险" >{{ queryOrders.sypremium?'¥'+ queryOrders.sypremium:'-' }}</el-descriptions-item>
                 <el-descriptions-item label="驾意险" >{{ queryOrders.jypremium?'¥'+ queryOrders.jypremium:'-' }}</el-descriptions-item>
+                <el-descriptions-item label="应缴金额" >
+                    <span style="color:#D42426">¥{{ queryOrders.sumpremium }}</span>
+                </el-descriptions-item>
             </el-descriptions>
             <el-table
                 v-if="queryOrders.kindinfo"