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

feat: 保单详情完善

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