|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view class="page">
|
|
|
+ <public-module></public-module>
|
|
|
<!-- 头部 -->
|
|
|
<view class="car-header dis a-c">
|
|
|
<image src="/static/image/car-insure/Group.png" mode="" style="width: 40px;height: 40px;"></image>
|
|
@@ -24,7 +25,7 @@
|
|
|
<u-switch v-model="jqchecked" active-color="#0052FF" inactive-color="#eee" size='30'
|
|
|
@change="jqImmediate"></u-switch>
|
|
|
</view>
|
|
|
- <view class=" qunimade dis a-c j-start" @click="jqstartShow = true" v-if="jqstartDate">
|
|
|
+ <view class=" qunimade dis a-c j-start" @click="jqstartShow = true" v-if="jqchecked">
|
|
|
<text>{{jqstartDate}}</text>
|
|
|
<text class="mx-2">-</text>
|
|
|
<text>{{jqendDate}}</text>
|
|
@@ -139,7 +140,7 @@
|
|
|
:custom-style="{textAlign:'right'}" v-model="totalitem.agreementName"
|
|
|
placeholder="请选择协议" @click="totalitem.selectShow = true"></u-input>
|
|
|
<u-select mode="single-column" :list="totalitem.agreement" value-name="id"
|
|
|
- label-name="agreementName" v-model="totalitem.selectShow"
|
|
|
+ label-name="businessDescription" v-model="totalitem.selectShow"
|
|
|
@confirm="val=>selectConfirm(val,totalindex)"></u-select>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="商业险折扣" v-if="totalitem.namesimple == '中国人寿'" placeholder="请输入数字"
|
|
@@ -543,16 +544,22 @@
|
|
|
inactive-color="#eee" size='30'
|
|
|
@change="accidentChange($event,totalitem.id,totalitem.cnName,totalindex)"></u-switch>
|
|
|
</view>
|
|
|
- <view class="" v-if="dajiaaccidentalDrivingVo.rideRiskCode">
|
|
|
- <view class=" accident-ins dis a-c j-s" @click="dajiaPopupshow=true">
|
|
|
- <text>{{dajiaaccidentalDrivingVo.rideRiskName}}</text>
|
|
|
+ <view class=""
|
|
|
+ v-if="dajiaaccidentalDrivingVo.projectCode && totalitem.jychecked">
|
|
|
+ <view class=" accident-ins dis a-c j-s" @click="dajiaPopupshow=true"
|
|
|
+ v-if="totalitem.apiType=='2'">
|
|
|
+ <text>{{dajiaaccidentalDrivingVo.parentName}}</text>
|
|
|
+ <u-icon name="arrow-right" style="color: #999;" size="24"></u-icon>
|
|
|
+ </view>
|
|
|
+ <view class=" accident-ins dis a-c j-s" @click="dajiaPopupshow1=true">
|
|
|
+ <text>{{dajiaaccidentalDrivingVo.projectName}}</text>
|
|
|
<u-icon name="arrow-right" style="color: #999;" size="24"></u-icon>
|
|
|
</view>
|
|
|
<view class=" dis j-s a-c">
|
|
|
<view class="">
|
|
|
<text>保费:</text>
|
|
|
<text
|
|
|
- style="color: #ee7000;">¥{{dajiaaccidentalDrivingVo.price*dajiaaccidentalDrivingVo.quantity}}.00</text>
|
|
|
+ style="color: #ee7000;">¥{{dajiaaccidentalDrivingVo.sumPremium*dajiaaccidentalDrivingVo.quantity}}.00</text>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
<text>份数:</text>
|
|
@@ -741,7 +748,7 @@
|
|
|
<u-radio style="margin: 4px 0;flex: auto;align-items: flex-start;" label-size="30"
|
|
|
@change="HNradioChange" shape="square" v-for="(item, index) in huanongInsuranceData"
|
|
|
:key="index" :name="item.projectCode">
|
|
|
- {{item.projectName}}s
|
|
|
+ {{item.projectName}}
|
|
|
</u-radio>
|
|
|
</u-radio-group>
|
|
|
</view>
|
|
@@ -868,13 +875,26 @@
|
|
|
</u-modal>
|
|
|
<!-- 大家驾意险弹框 -->
|
|
|
<u-modal v-model="dajiaPopupshow" title="驾意险"
|
|
|
+ :title-style="{fontWeight: 'bold',borderBottom:'1px solid #f2f2f2',padding:'10px'}"
|
|
|
+ :scroll-height="{height: '300px'}" :show-confirm-button="false" mask-close-able>
|
|
|
+ <view class="slot-content">
|
|
|
+ <u-radio-group size="30" wrap>
|
|
|
+ <u-radio style="margin: 4px 0;flex: auto;" label-size="30" @change="DJprogrammeradioChange"
|
|
|
+ shape="square" v-for="(item, index) in dajiaprogrammeData" :key="index"
|
|
|
+ :name="item.projectCode">
|
|
|
+ {{item.projectName}}
|
|
|
+ </u-radio>
|
|
|
+ </u-radio-group>
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+ <u-modal v-model="dajiaPopupshow1" title="驾意险"
|
|
|
:title-style="{fontWeight: 'bold',borderBottom:'1px solid #f2f2f2',padding:'10px'}"
|
|
|
:scroll-height="{height: '300px'}" :show-confirm-button="false" mask-close-able>
|
|
|
<view class="slot-content">
|
|
|
<u-radio-group size="30" wrap>
|
|
|
<u-radio style="margin: 4px 0;flex: auto;" label-size="30" @change="DJradioChange" shape="square"
|
|
|
- v-for="(item, index) in dajiaInsuranceData" :key="index" :name="item.id">
|
|
|
- {{item.productName}}
|
|
|
+ v-for="(item, index) in dajiaInsuranceData" :key="index" :name="item.projectCode">
|
|
|
+ {{item.projectName}}
|
|
|
</u-radio>
|
|
|
</u-radio-group>
|
|
|
</view>
|
|
@@ -928,7 +948,7 @@
|
|
|
:show-cancel-button="true"
|
|
|
:confirm-style="{background:'#0052FF',color:'#fff',height:'40px',lineHeight:'40px'}"
|
|
|
:cancel-style="{background:'#E6EEFF',color:'#0052FF',height:'40px',lineHeight:'40px'}"
|
|
|
- @confirm="Guidedconfirm">
|
|
|
+ @confirm="Guidedconfirm" @cancel="sychecked=false">
|
|
|
<view class="slot-content dis j-c a-c font-weight" style="color: #232832;">
|
|
|
<text>将跳转至保险配置页面添加或修改商业险</text>
|
|
|
</view>
|
|
@@ -1046,6 +1066,8 @@
|
|
|
guoRenaccidentalDrivingVo: {}, //国任意外险
|
|
|
guoRencontributingshow: false, //国任特约
|
|
|
dajiaPopupshow: false,
|
|
|
+ dajiaPopupshow1: false,
|
|
|
+ dajiaprogrammeData: [],
|
|
|
dajiaInsuranceData: [], //大家意外险list
|
|
|
dajiaaccidentalDrivingVo: {}, //大家意外险
|
|
|
guoRenSpecialAgreementData: [],
|
|
@@ -1735,7 +1757,6 @@
|
|
|
const eventChannel = this.getOpenerEventChannel()
|
|
|
// 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
|
|
|
eventChannel.on('acceptData', async (data) => {
|
|
|
- console.log(data);
|
|
|
this.carInfo = data.carInfo; //车辆信息
|
|
|
this.ownerInfo = data.ownerInfo; //车主信息
|
|
|
this.policyHolderInfo = data.policyHolderInfo; //投保人信息
|
|
@@ -1792,13 +1813,14 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ this.commpanyList();
|
|
|
const storage = uni.getStorageSync('historyInfo');
|
|
|
if (storage) {
|
|
|
Object.keys(storage).forEach(key => {
|
|
|
this[key] = storage[key]
|
|
|
})
|
|
|
} else {
|
|
|
- this.commpanyList();
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1807,7 +1829,21 @@
|
|
|
let historyInfo = {
|
|
|
quoteno: this.quoteno,
|
|
|
orderno: this.orderno,
|
|
|
- totalCompanyList: this.totalCompanyList,
|
|
|
+ zhongmeiInsuranceData: this.zhongmeiInsuranceData, //中煤意外险list
|
|
|
+ zhongmeiaccidentalDrivingVo: this.zhongmeiaccidentalDrivingVo, //中煤意外险
|
|
|
+ huanongInsuranceData: this.huanongInsuranceData, //华农意外险list
|
|
|
+ huanongaccidentalDrivingVo: this.huanongaccidentalDrivingVo, //华农意外险
|
|
|
+ taikangInsuranceData: this.taikangInsuranceData, //泰康意外险list
|
|
|
+ taikangaccidentalDrivingVo: this.taikangaccidentalDrivingVo, //泰康意外险
|
|
|
+ taipingInsuranceData: this.taipingInsuranceData, //太平意外险list
|
|
|
+ taipingaccidentalDrivingVo: this.taipingaccidentalDrivingVo, //太平意外险
|
|
|
+ guorenprogrammeData: this.guorenprogrammeData,
|
|
|
+ guoRenInsuranceData: this.guoRenInsuranceData, //国任意外险list
|
|
|
+ guoRenaccidentalDrivingVo: this.guoRenaccidentalDrivingVo, //国任意外险
|
|
|
+ dajiaInsuranceData: this.dajiaInsuranceData, //大家意外险list
|
|
|
+ dajiaaccidentalDrivingVo: this.dajiaaccidentalDrivingVo, //大家意外险
|
|
|
+ bohaiInsuranceData: this.bohaiInsuranceData, //渤海意外险list
|
|
|
+ bohaiaccidentalDrivingVo: this.bohaiaccidentalDrivingVo, //渤海意外险
|
|
|
zijinInsuranceData: this.zijinInsuranceData, //紫金意外险list
|
|
|
zijinaccidentalDrivingVo: this.zijinaccidentalDrivingVo, //紫金意外险
|
|
|
anshengprogrammeData: this.anshengprogrammeData,
|
|
@@ -1853,13 +1889,13 @@
|
|
|
|
|
|
},
|
|
|
async coordinateValue() {
|
|
|
- let location = uni.getStorageSync('location');
|
|
|
- let params = {
|
|
|
- subOrderNo: this.subOrderId,
|
|
|
- lng: location.longitude,
|
|
|
- lat: location.latitude,
|
|
|
- }
|
|
|
- let orders = await this.$http.post('/insurance/order/savePosition', params);
|
|
|
+ // let location = uni.getStorageSync('location');
|
|
|
+ // let params = {
|
|
|
+ // subOrderNo: this.subOrderId,
|
|
|
+ // lng: location.longitude,
|
|
|
+ // lat: location.latitude,
|
|
|
+ // }
|
|
|
+ // let orders = await this.$http.post('/insurance/order/savePosition', params);
|
|
|
},
|
|
|
async tempSave() {
|
|
|
let param = {
|
|
@@ -1902,6 +1938,8 @@
|
|
|
},
|
|
|
jqImmediate(value) {
|
|
|
if (value) {
|
|
|
+ this.jqstartDate = this.nextday();
|
|
|
+ this.jqendDate = this.oneYearPast(this.jqstartDate)
|
|
|
this.riskList.push({
|
|
|
amount: 0,
|
|
|
endDate: this.jqendDate,
|
|
@@ -1910,27 +1948,33 @@
|
|
|
riskCode: "0507",
|
|
|
startDate: this.jqstartDate,
|
|
|
})
|
|
|
+ this.commpanyList();
|
|
|
} else {
|
|
|
let list = this.riskList.filter(item => item.riskCode !== "0507");
|
|
|
this.riskList = list;
|
|
|
+ this.commpanyList();
|
|
|
}
|
|
|
},
|
|
|
syImmediate(value) {
|
|
|
if (value) {
|
|
|
this.GuidedPopShow = true;
|
|
|
-
|
|
|
} else {
|
|
|
let list = this.riskList.filter(item => item.riskCode !== "0510");
|
|
|
this.riskList = list;
|
|
|
+ this.kindList = [];
|
|
|
+ this.commpanyList();
|
|
|
}
|
|
|
},
|
|
|
immediatelyClick(name) {
|
|
|
this.carInfo[name] = !this.carInfo[name];
|
|
|
- if (this.carInfo[name]) {
|
|
|
- this.carInfo.transferDate = this.carInfo.issueDate;
|
|
|
- } else {
|
|
|
- this.carInfo.transferDate = "";
|
|
|
+ if (name == 'transferFlag') {
|
|
|
+ if (this.carInfo[name]) {
|
|
|
+ this.carInfo.transferDate = this.carInfo.issueDate;
|
|
|
+ } else {
|
|
|
+ this.carInfo.transferDate = "";
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
preUnderwriting(list) {
|
|
|
this.RSpreUnderwritingList = list;
|
|
@@ -2040,10 +2084,60 @@
|
|
|
|
|
|
},
|
|
|
//选择协议
|
|
|
- selectConfirm(e, index) {
|
|
|
+ async selectConfirm(e, index) {
|
|
|
this.totalCompanyList[index].agreementId = e[0].value;
|
|
|
this.totalCompanyList[index].agreementName = e[0].label;
|
|
|
this.totalCompanyList[index].apiType = e[0].extra;
|
|
|
+ let ruleThirdPartyInsurance = this.kindList.find(val => val.kindCode == 'B'); //获取三者保额
|
|
|
+ switch (this.totalCompanyList[index].namesimple) {
|
|
|
+ case "大家财险":
|
|
|
+ let djcallback = await this.$http.post('/api/drivingInsurance/getDrivingInsuranceRule', {
|
|
|
+ agreementId: this.totalCompanyList[index].agreementId,
|
|
|
+ companyCode: this.totalCompanyList[index].id,
|
|
|
+ ruleSeatNum: Number(this.carInfo.seatCount),
|
|
|
+ ruleThirdPartyInsurance: ruleThirdPartyInsurance ? ruleThirdPartyInsurance
|
|
|
+ .amount : '',
|
|
|
+ ruleUseNature: this.carInfo.carnature,
|
|
|
+ kind: this.kindList,
|
|
|
+ risk: this.riskList,
|
|
|
+ });
|
|
|
+ if (djcallback.code == '200') {
|
|
|
+ let data = djcallback.data;
|
|
|
+ data.map(ele => {
|
|
|
+ ele.quantity = 1;
|
|
|
+ return ele;
|
|
|
+ })
|
|
|
+ if (this.totalCompanyList[index].apiType == '2') {
|
|
|
+ this.dajiaprogrammeData = data;
|
|
|
+ const defaultProject = findDefaultProject(data);
|
|
|
+ if (JSON.stringify(defaultProject.result) !== "{}") {
|
|
|
+ this.totalCompanyList[index].jychecked = true;
|
|
|
+ this.dajiaInsuranceData = defaultProject.list;
|
|
|
+ this.dajiaaccidentalDrivingVo = defaultProject.result;
|
|
|
+ } else {
|
|
|
+ this.dajiaaccidentalDrivingVo = {
|
|
|
+ parentCode: data[0].projectCode, //驾意险商品号
|
|
|
+ parentName: data[0].projectName, //驾意险商品名称
|
|
|
+ ...data[0].children[0]
|
|
|
+ }
|
|
|
+ this.dajiaInsuranceData = data[0].children;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.dajiaInsuranceData = data;
|
|
|
+ const defaultProject = findDefaultProject(data);
|
|
|
+ if (JSON.stringify(defaultProject.result) !== "{}") {
|
|
|
+ this.totalCompanyList[index].jychecked = true;
|
|
|
+ this.dajiaInsuranceData = defaultProject.list;
|
|
|
+ this.dajiaaccidentalDrivingVo = defaultProject.result;
|
|
|
+ } else {
|
|
|
+ this.dajiaInsuranceData = data;
|
|
|
+ this.dajiaaccidentalDrivingVo = data[0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ }
|
|
|
},
|
|
|
//国任特约
|
|
|
async guoRencontributing(id) {
|
|
@@ -2069,8 +2163,6 @@
|
|
|
})
|
|
|
},
|
|
|
priceComparisonChange(index, item) {
|
|
|
- console.log(index, item);
|
|
|
- this.priceCtitle = "去比价";
|
|
|
if (!item.isComparableDisabled) {
|
|
|
item.isComparableShow = !item.isComparableShow;
|
|
|
if (item.isComparableShow) {
|
|
@@ -2095,6 +2187,7 @@
|
|
|
*/
|
|
|
async checkboxChange(code, name, index) {
|
|
|
this.totalCompanyList[index].checked = !this.totalCompanyList[index].checked;
|
|
|
+ // let apiType = this.totalCompanyList[index].apiType;
|
|
|
let value = this.totalCompanyList[index].checked;
|
|
|
if (value) {
|
|
|
let ins = this.totalCompanyList[index].namesimple;
|
|
@@ -2106,7 +2199,7 @@
|
|
|
this.totalCompanyList[index].agreement = list;
|
|
|
this.totalCompanyList[index].agreementId = this.totalCompanyList[index].agreement[0].id;
|
|
|
this.totalCompanyList[index].agreementName = this.totalCompanyList[index].agreement[0]
|
|
|
- .agreementName;
|
|
|
+ .businessDescription;
|
|
|
this.totalCompanyList[index].apiType = this.totalCompanyList[index].agreement[0].extra;
|
|
|
this.totalCompanyList[index].underwritingDescription = this.totalCompanyList[index].agreement[0]
|
|
|
.underwritingDescription;
|
|
@@ -2117,6 +2210,7 @@
|
|
|
agreementId: this.totalCompanyList[index].agreement[0].id,
|
|
|
companyCode: code,
|
|
|
ruleSeatNum: Number(this.carInfo.seatCount),
|
|
|
+ seatNum: Number(this.carInfo.seatCount),
|
|
|
ruleThirdPartyInsurance: ruleThirdPartyInsurance ? ruleThirdPartyInsurance
|
|
|
.amount : '',
|
|
|
ruleUseNature: this.carInfo.carnature,
|
|
@@ -2240,8 +2334,16 @@
|
|
|
}
|
|
|
break;
|
|
|
case '大家财险':
|
|
|
- let djcallback = await this.$http.post('/api/dajia/accidentalDrivingList', {
|
|
|
- agreementId: this.totalCompanyList[index].agreement[0].id
|
|
|
+ let apiType = this.totalCompanyList[index].apiType;
|
|
|
+ let djcallback = await this.$http.post('/api/drivingInsurance/getDrivingInsuranceRule', {
|
|
|
+ agreementId: this.totalCompanyList[index].agreement[0].id,
|
|
|
+ companyCode: code,
|
|
|
+ ruleSeatNum: Number(this.carInfo.seatCount),
|
|
|
+ ruleThirdPartyInsurance: ruleThirdPartyInsurance ? ruleThirdPartyInsurance
|
|
|
+ .amount : '',
|
|
|
+ ruleUseNature: this.carInfo.carnature,
|
|
|
+ kind: this.kindList,
|
|
|
+ risk: this.riskList,
|
|
|
});
|
|
|
if (djcallback.code == '200') {
|
|
|
let data = djcallback.data;
|
|
@@ -2249,13 +2351,33 @@
|
|
|
ele.quantity = 1;
|
|
|
return ele;
|
|
|
})
|
|
|
- this.dajiaInsuranceData = data;
|
|
|
- this.dajiaaccidentalDrivingVo = {
|
|
|
- rideRiskCode: data[0].id,
|
|
|
- rideRiskName: data[0].productName,
|
|
|
- quantity: data[0].quantity,
|
|
|
- price: data[0].price,
|
|
|
- };
|
|
|
+ if (apiType == '2') {
|
|
|
+ this.dajiaprogrammeData = data;
|
|
|
+ const defaultProject = findDefaultProject(data);
|
|
|
+ if (JSON.stringify(defaultProject.result) !== "{}") {
|
|
|
+ this.totalCompanyList[index].jychecked = true;
|
|
|
+ this.dajiaInsuranceData = defaultProject.list;
|
|
|
+ this.dajiaaccidentalDrivingVo = defaultProject.result;
|
|
|
+ } else {
|
|
|
+ this.dajiaaccidentalDrivingVo = {
|
|
|
+ parentCode: data[0].projectCode, //驾意险商品号
|
|
|
+ parentName: data[0].projectName, //驾意险商品名称
|
|
|
+ ...data[0].children[0]
|
|
|
+ }
|
|
|
+ this.dajiaInsuranceData = data[0].children;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.dajiaInsuranceData = data;
|
|
|
+ const defaultProject = findDefaultProject(data);
|
|
|
+ if (JSON.stringify(defaultProject.result) !== "{}") {
|
|
|
+ this.totalCompanyList[index].jychecked = true;
|
|
|
+ this.dajiaInsuranceData = defaultProject.list;
|
|
|
+ this.dajiaaccidentalDrivingVo = defaultProject.result;
|
|
|
+ } else {
|
|
|
+ this.dajiaInsuranceData = data;
|
|
|
+ this.dajiaaccidentalDrivingVo = data[0];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
case '中煤财险':
|
|
@@ -2342,7 +2464,7 @@
|
|
|
kind: this.kindList,
|
|
|
risk: this.riskList,
|
|
|
});
|
|
|
- if (Insurancecallback.code == 200) {
|
|
|
+ if (Insurancecallback.code == 200 && Insurancecallback.data.length !== 0) {
|
|
|
let data = Insurancecallback.data;
|
|
|
data.map(ele => {
|
|
|
ele.quantity = 1;
|
|
@@ -2430,16 +2552,26 @@
|
|
|
this.huanongaccidentalDrivingVo.accidentType = this.huanongaccidentalDrivingVo.planCode;
|
|
|
this.huanongPopupshow = false;
|
|
|
},
|
|
|
+ //大家一级选择
|
|
|
+ DJprogrammeradioChange(id) {
|
|
|
+ let info = this.dajiaprogrammeData.find((val => val.projectCode == id))
|
|
|
+ console.log(info);
|
|
|
+ this.dajiaPopupshow = false;
|
|
|
+ this.dajiaaccidentalDrivingVo.parentCode = info.projectCode;
|
|
|
+ this.dajiaaccidentalDrivingVo.parentName = info.projectName;
|
|
|
+ console.log(this.dajiaaccidentalDrivingVo);
|
|
|
+ if (info.children) {
|
|
|
+ this.dajiaInsuranceData = info.children;
|
|
|
+ Object.assign(this.dajiaaccidentalDrivingVo, info.children[0]);
|
|
|
+ } else {
|
|
|
+ this.dajiaInsuranceData = []
|
|
|
+ }
|
|
|
+ },
|
|
|
//大家意外险
|
|
|
DJradioChange(id) {
|
|
|
- let info = this.dajiaInsuranceData.find(val => val.id == id)
|
|
|
- this.dajiaaccidentalDrivingVo = {
|
|
|
- rideRiskCode: info.id,
|
|
|
- rideRiskName: info.productName,
|
|
|
- quantity: info.quantity,
|
|
|
- price: info.price,
|
|
|
- };
|
|
|
- this.dajiaPopupshow = false;
|
|
|
+ let info = this.dajiaInsuranceData.find((val => val.projectCode == id))
|
|
|
+ Object.assign(this.dajiaaccidentalDrivingVo, info);
|
|
|
+ this.dajiaPopupshow1 = false;
|
|
|
},
|
|
|
TPradioChange(id) {
|
|
|
this.taipingaccidentalDrivingVo = this.taipingInsuranceData.find(val => val.projectCode == id)
|
|
@@ -2491,8 +2623,10 @@
|
|
|
GRInsuranceradioChange(id) {
|
|
|
let info = this.guoRenInsuranceData.find((val => val.projectCode == id))
|
|
|
Object.assign(this.guoRenaccidentalDrivingVo, info);
|
|
|
+ console.log(this.guoRenaccidentalDrivingVo);
|
|
|
this.guorenPopupshow1 = false;
|
|
|
},
|
|
|
+ //
|
|
|
//紫金意外险
|
|
|
ZJcheckboxGroupChange(detail) {
|
|
|
this.zijinaccidentalDrivingVo = [];
|
|
@@ -2533,29 +2667,38 @@
|
|
|
})
|
|
|
}
|
|
|
// //险种合并集合
|
|
|
- // const combinedArray = [
|
|
|
- // ...this.riskList.map(item => item.riskCode),
|
|
|
- // ...this.kindList.map(item => item.kindCode),
|
|
|
- // ];
|
|
|
- // commpanykad.data = commpanykad.data.filter(obj => {
|
|
|
- // obj.agreement = obj.agreement.filter(agreementObj => {
|
|
|
- // // 险种配置为空,则过滤掉该协议
|
|
|
- // if (agreementObj.productsCodes == null) {
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // return agreementObj.productsCodes.some(item => combinedArray.includes(item));
|
|
|
- // });
|
|
|
-
|
|
|
- // return obj.agreement.length > 0; // 返回true保留,返回false移除该保险公司
|
|
|
- // });
|
|
|
+ const combinedArray = [
|
|
|
+ ...this.riskList.map(item => item.riskCode),
|
|
|
+ ...this.kindList.map(item => item.kindCode),
|
|
|
+ ];
|
|
|
+ commpanykad.data = commpanykad.data.filter(obj => {
|
|
|
+ obj.agreement = obj.agreement.filter(agreementObj => {
|
|
|
+ agreementObj.businessDescription = agreementObj.businessDescription + "(" +
|
|
|
+ agreementObj.jobDescription + ")";
|
|
|
+ // 险种配置为空,则过滤掉该协议
|
|
|
+ if (agreementObj.productsCodes == null) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ if (combinedArray.includes('A') && !agreementObj.productsCodes.includes(
|
|
|
+ 'A')) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return agreementObj.productsCodes.some(item => combinedArray.includes(
|
|
|
+ item));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return obj.agreement.length > 0; // 返回true保留,返回false移除该保险公司
|
|
|
+ });
|
|
|
this.totalCompanyList = commpanykad.data;
|
|
|
},
|
|
|
async toNext() {
|
|
|
+
|
|
|
var allAreFalse = this.totalCompanyList.every(function(element) {
|
|
|
return element.checked === false;
|
|
|
});
|
|
|
if (!allAreFalse) {
|
|
|
- this.priceCtitle = '比价'
|
|
|
+ this.comparableQuantity = 0; //报价成功总数
|
|
|
+ this.selectedCount = 0; //比价勾选数量
|
|
|
this.totalCompanyList.map((ele) => {
|
|
|
ele.isComparableShow = false;
|
|
|
ele.isComparableshowHide = false;
|
|
@@ -3058,6 +3201,8 @@
|
|
|
},
|
|
|
//大家报价
|
|
|
async dajia(num, id) {
|
|
|
+ let type = this.totalCompanyList[num].apiType;
|
|
|
+ let api = type == 2 ? "/insurance/crawler/quote" : "/api/dajia/quote";
|
|
|
let isTaxSource = this.totalCompanyList[num].isTaxSource;
|
|
|
let jychecked = this.totalCompanyList[num].jychecked
|
|
|
let params = {
|
|
@@ -3073,7 +3218,7 @@
|
|
|
agreementId: this.totalCompanyList[num]
|
|
|
.agreementId,
|
|
|
};
|
|
|
- let res = await this.$http.post('/api/dajia/quote',
|
|
|
+ let res = await this.$http.post(`${api}`,
|
|
|
params);
|
|
|
this.totalCompanyList[num].msg = res.msg;
|
|
|
if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
|
|
@@ -3283,7 +3428,7 @@
|
|
|
case '太平财险':
|
|
|
case '华农财险':
|
|
|
case '泰康财险':
|
|
|
- if (!!res.data) {
|
|
|
+ if (res.code == '200') {
|
|
|
if (res.data.warnMessageList !=
|
|
|
null && res.data
|
|
|
.warnMessageList[0] != null &&
|
|
@@ -3321,7 +3466,7 @@
|
|
|
}
|
|
|
break;
|
|
|
case '众安财险':
|
|
|
- if (!!res.data) {
|
|
|
+ if (res.code == '200') {
|
|
|
if (res.data.warnMessageList !=
|
|
|
null && res.data
|
|
|
.warnMessageList[0] != null &&
|