Commit 2ef2c1cf authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/policy_fix' into 'master'

Fix/policy fix

See merge request !45
parents 55650228 48c89560
...@@ -214,7 +214,8 @@ export default { ...@@ -214,7 +214,8 @@ export default {
"policyFormData", "policyFormData",
JSON.stringify(Object.assign(this.formData, { productNo: this.goodId })) JSON.stringify(Object.assign(this.formData, { productNo: this.goodId }))
); );
this.$router.push("/policy/add"); const { queryId } = this.$route;
this.$router.push({ path: "/policy/add", query: { queryId } });
}, },
async getDetail() { async getDetail() {
this.goodId = this.$route.query.id; this.goodId = this.$route.query.id;
......
...@@ -261,13 +261,13 @@ ...@@ -261,13 +261,13 @@
</cr-cell-group> </cr-cell-group>
<cr-cell-group title="保障方案"> <cr-cell-group title="保障方案">
<cr-field <cr-field
v-model="formData.productItem.insuredAmount" v-model="formData.productItem.amountInsured"
name="productItem_insuredAmount" name="productItem_insuredAmount"
label="投保限额" label="投保限额"
:rules="[{ required: true, message: '请选择投保限额' }]" :rules="[{ required: true, message: '请选择投保限额' }]"
> >
<template #input> <template #input>
<stepper v-model="formData.productItem.insuredAmount" :option="insuredAmountOptions" /> <stepper v-model="formData.productItem.amountInsured" :option="insuredAmountOptions" />
</template> </template>
</cr-field> </cr-field>
<cr-field <cr-field
...@@ -291,16 +291,13 @@ ...@@ -291,16 +291,13 @@
</template> </template>
</cr-field> </cr-field>
<cr-field <cr-field
v-model="formData.productItem.paymentPeriod" v-model="formData.productItem.payPeriod"
name="productItem_paymentPeriod" name="productItem_paymentPeriod"
label="交费期间" label="交费期间"
:rules="[{ required: true, message: '请选择交费期间' }]" :rules="[{ required: true, message: '请选择交费期间' }]"
> >
<template #input> <template #input>
<cr-radio-btn <cr-radio-btn v-model="formData.productItem.payPeriod" :radio-data="benefitOptions" />
v-model="formData.productItem.paymentPeriod"
:radio-data="benefitOptions"
/>
</template> </template>
</cr-field> </cr-field>
<cr-field :value="formData.effectiveDate" name="effectiveDate" readonly label="生效日期" /> <cr-field :value="formData.effectiveDate" name="effectiveDate" readonly label="生效日期" />
...@@ -408,7 +405,7 @@ export default { ...@@ -408,7 +405,7 @@ export default {
longTerm: "1" longTerm: "1"
}, },
productItem: { productItem: {
insuredAmount: "500000" amountInsured: "500000"
}, },
payPeriod: "1" payPeriod: "1"
}, },
...@@ -524,7 +521,8 @@ export default { ...@@ -524,7 +521,8 @@ export default {
}, },
relationChange(relation = this.formData.insuredUserInfo.relation) { relationChange(relation = this.formData.insuredUserInfo.relation) {
this.formData.insuredUserInfo = { this.formData.insuredUserInfo = {
relation relation,
longTerm: "1"
}; };
this.familyList.forEach(item => { this.familyList.forEach(item => {
const { relation, nameMask: name, idNoMask: idNo, userInfoSecId } = item; const { relation, nameMask: name, idNoMask: idNo, userInfoSecId } = item;
...@@ -552,7 +550,17 @@ export default { ...@@ -552,7 +550,17 @@ export default {
} }
this.formData.insuredUserInfo = { this.formData.insuredUserInfo = {
...this.formData.insuredUserInfo, ...this.formData.insuredUserInfo,
...{ name, idNo, userInfoSecId, socialSecurity: socialSecurity ? "1" : "0" } ...{
name,
idNo,
userInfoSecId,
socialSecurity:
typeof socialSecurity === undefined || socialSecurity === ""
? ""
: socialSecurity
? "1"
: "0"
}
}; };
this.$forceUpdate(); this.$forceUpdate();
}, },
...@@ -561,17 +569,11 @@ export default { ...@@ -561,17 +569,11 @@ export default {
this.popupShow = true; this.popupShow = true;
}, },
getParamFromSession() { getParamFromSession() {
const { const { amountInsured, policyPeriod, payPeriod, payType, productNo } = this.policyFormData;
amountInsured: insuredAmount,
policyPeriod,
payPeriod: paymentPeriod,
payType,
productNo
} = this.policyFormData;
this.formData.productNo = productNo; this.formData.productNo = productNo;
this.formData.productItem = { this.formData.productItem = {
...this.formData.productItem, ...this.formData.productItem,
...{ insuredAmount, policyPeriod, paymentPeriod, payType } ...{ amountInsured, policyPeriod, payPeriod, payType }
}; };
const nextDate = Date.parse(new Date()) + 86400000; const nextDate = Date.parse(new Date()) + 86400000;
this.formData.effectiveDate = parseTime(nextDate, "{y}-{m}-{d} 00:00:00"); this.formData.effectiveDate = parseTime(nextDate, "{y}-{m}-{d} 00:00:00");
...@@ -607,12 +609,7 @@ export default { ...@@ -607,12 +609,7 @@ export default {
}, },
async calFee() { async calFee() {
let { price } = this.headerInfo; let { price } = this.headerInfo;
const { const { amountInsured, policyPeriod, payPeriod, payType } = this.formData.productItem;
insuredAmount: amountInsured,
policyPeriod,
paymentPeriod: payPeriod,
payType
} = this.formData.productItem;
let idNo = ""; let idNo = "";
let userInfoSecId = undefined; let userInfoSecId = undefined;
const { socialSecurity } = this.formData.insuredUserInfo; const { socialSecurity } = this.formData.insuredUserInfo;
......
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