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