Commit 93944ff6 authored by 郭志伟's avatar 郭志伟 Committed by 郝聪敏

feat: 保单详情完善

parent adae88d6
......@@ -48,7 +48,7 @@ export default {
value: {
immediate: true,
handler(val) {
this.current = this.option.findIndex(item => item.value === val);
this.current = val ? this.option.findIndex(item => item.value === val) : 0;
}
},
current(val) {
......
......@@ -321,6 +321,7 @@
v-model="goInsureState"
:title="headerInfo.title"
:pay-data="goodBuyModalInfo"
@confirm="nextStep"
>
<div class="pay-protocol">
<div class="pay-protocol-tip"><span>投保前请阅读</span><span>*不犹豫期免费退保</span></div>
......@@ -389,6 +390,7 @@ export default {
insuredAmount: "500000"
}
},
subFromData: {},
familyList: [],
formMaskData: {},
idCardInvaildOptions: [
......@@ -502,12 +504,13 @@ export default {
this.$notify({ type: "warning", message: errors[0].message });
},
nextStep() {
this.subFromData = JSON.parse(JSON.stringify(this.formData));
this.generateOrder();
},
relationChange(relation = this.formData.insuredUserInfo.relation) {
this.familyList.forEach(item => {
const { relation, nameMask: name, idNoMask: idNo, userInfoSecId, socialSecurity } = item;
if (relation === 0) {
if (+relation === 0) {
this.formData.holderUserInfo = {
...this.formData.holderUserInfo,
...{ name, idNo, userInfoSecId, socialSecurity: socialSecurity ? "1" : "0" }
......@@ -534,8 +537,8 @@ export default {
productNo
} = this.policyFormData;
this.formData.productNo = productNo;
this.formData.insuredUserInfo = {
...this.formData.insuredUserInfo,
this.formData.productItem = {
...this.formData.productItem,
...{ insuredAmount, policyPeriod, paymentPeriod, payType }
};
this.$forceUpdate();
......@@ -554,23 +557,31 @@ export default {
const res = await getFamilyList();
if (res) {
this.familyList = res;
this.showAuthXyqb && this.relationChange();
this.showAuthXyqb === -1 && this.relationChange();
}
},
async calFee() {
let { price } = this.headerInfo;
const { birth, gender, insuredAmount, policyPeriod, paymentPeriod, payType } = this.formData;
const {
insuredAmount: amountInsured,
policyPeriod,
paymentPeriod: payPeriod,
payType
} = this.formData.productItem;
const { idNo, socialSecurity } = this.formData.insuredUserInfo;
if (!amountInsured || !policyPeriod || !payPeriod || !payType || !idNo || !socialSecurity)
return;
const _param = {
productNo: this.goodId,
productUserInfo: {
userInfo: {
birth,
gender
idNo,
socialSecurity
},
productItem: {
amountInsured: insuredAmount,
amountInsured,
policyPeriod,
payPeriod: paymentPeriod,
payPeriod,
payType
}
}
......@@ -581,7 +592,7 @@ export default {
this.goodActionInfo = {
title: price
};
this.goodBuyModalInfo = [{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` }];
this.goodBuyModalInfo = [{ title: `保费`, value: `${price[0]}${price[1]}` }];
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment