Commit ac4a0cbc authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/policy_fix' into 'master'

fix: 80万额度;其他险种数据回显处理;泰康协议条款补充

See merge request !61
parents d34bd1ec f75022f7
......@@ -4,7 +4,7 @@
* @Description: 华贵大麦2020定期寿险
* @Date: 2020-07-27 15:46:37
* @LastEditors: gzw
* @LastEditTime: 2020-08-20 14:51:17
* @LastEditTime: 2020-08-20 18:03:46
*/
import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
......@@ -107,6 +107,7 @@ export default {
insuredAmountOptions: [
{ label: "30万", value: "300000" },
{ label: "50万", value: "500000" },
{ label: "80万", value: "800000" },
{ label: "100万", value: "1000000" },
{ label: "150万", value: "1500000" },
{ label: "200万", value: "2000000" },
......
......@@ -4,7 +4,7 @@
* @Description: 泰康600万医疗保障
* @Date: 2020-07-27 15:46:37
* @LastEditors: gzw
* @LastEditTime: 2020-08-20 10:33:55
* @LastEditTime: 2020-08-20 18:27:48
*/
import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png";
......@@ -99,15 +99,15 @@ export default {
popupArray: [
{
title: "保险条款",
url: "http://mangguo-contract.qthbx.com/huatai-bao-xian-tiao-kuan-v1/"
url: "http://mangguo-contract.qthbx.com/tai-kang-bai-mo-yi-liao-bao-xian-tiao-kuan-v1/"
},
{
title: "健康告知",
url: "http://mangguo-contract.qthbx.com/huatai-jian-kang-gao-zhi-v1/"
url: "http://mangguo-contract.qthbx.com/taikang-jian-kang-gao-zhi-v1/"
},
{
title: "投保须知及声明",
url: "http://mangguo-contract.qthbx.com/huatai-toubaoxuzhi-v1/"
url: "http://mangguo-contract.qthbx.com/tai-kang-bai-mo-yi-liao-tou-bao-xu-zhi-ji-sheng-ming-v1/"
},
{
title: "平台服务协议",
......
......@@ -267,7 +267,7 @@ export default {
selfIdNo,
selfPhone,
selfSecId,
payType,
amountInsured,
autoRenewPolicy
} = this.formData;
this.subFormData = {
......@@ -285,10 +285,14 @@ export default {
idNo: selfIdNo
},
productItem: {
payType
amountInsured
},
autoRenewPolicy: autoRenewPolicy
};
if (relation === "1") {
this.subFormData.holderUserInfo.relation = relation;
delete this.subFormData.insuredUserInfo;
}
},
async getDetail() {
this.goodId = this.$route.query.id;
......
......@@ -212,8 +212,10 @@ export default {
},
autoRenewPolicy: autoRenewPolicy
};
console.log(subFormData);
if (relation === "1") {
subFormDataCache.holderUserInfo.socialSecurity = !!Number(selfSocialSecurity);
subFormDataCache.holderUserInfo.relation = relation;
} else {
subFormDataCache.insuredUserInfo = {
userInfoSecId: userInfoSecId ? userInfoSecId : undefined,
......
......@@ -95,6 +95,7 @@ import localStorage from "@/service/localStorage";
import Detail from "@/api/detail.taikang.yiliaobaozhang";
import { isIdNo } from "@/service/validation";
let socialSecurityCache = "";
export default {
name: "GoodsDetail-MI",
mixins: [detailPayMixin, detailLoginMixin],
......@@ -218,9 +219,11 @@ export default {
},
onSubmit() {
if (localStorage.get("mongoToken")) {
socialSecurityCache = this.formData.socialSecurity;
this.goInsureState = true;
this.$refs.insureForm.getFamilyList();
} else {
socialSecurityCache = this.formData.socialSecurity;
const { selfPhone, selfCode } = this.formData;
this.login(selfPhone, selfCode).then(() => {
this.goInsureState = true;
......@@ -251,6 +254,9 @@ export default {
this.generateOrder();
},
generateFormData() {
if (!this.formData.socialSecurity) {
this.formData.socialSecurity = socialSecurityCache;
}
const subFormData = JSON.parse(JSON.stringify(this.formData));
const {
userInfoSecId,
......@@ -280,8 +286,12 @@ export default {
autoRenewPolicy: autoRenewPolicy
};
if (relation === "1") {
this.subFormData.holderUserInfo.socialSecurity = !!Number(selfSocialSecurity);
this.subFormData.productItem.socialSecurity = !!Number(selfSocialSecurity);
this.subFormData.holderUserInfo.socialSecurity = !Number(
selfSocialSecurity || socialSecurityCache
);
this.subFormData.productItem.socialSecurity = !Number(
selfSocialSecurity || socialSecurityCache
);
} else {
this.subFormData.insuredUserInfo = {
userInfoSecId: userInfoSecId ? userInfoSecId : undefined,
......@@ -292,6 +302,9 @@ export default {
};
this.subFormData.productItem.socialSecurity = !!Number(socialSecurity);
}
if (relation === "1") {
delete this.subFormData.insuredUserInfo;
}
},
async getDetail() {
this.goodId = this.$route.query.id;
......
......@@ -74,7 +74,7 @@ export default {
return {
formData: {},
sexOptions,
countOptions: insuredAmountOptions.filter((item, index) => index > 1),
countOptions: insuredAmountOptions,
termOptions,
paywayOptions,
benefitOptions: benefitOptions.filter((item, index) => index > 0)
......@@ -108,6 +108,7 @@ export default {
.policy-form {
padding: 0;
@{deep} .cr-cell {
padding: 8px 0 !important;
&__title {
width: 75px !important;
}
......
......@@ -292,13 +292,11 @@ export default {
: "0"
}
};
if (!this.formData.socialSecurity) {
if (!this.formData.socialSecurity && this.radioOptions.medicalOptions) {
try {
this.formData.insuredUserInfo.socialSecurity = this[
this.autoSaveKey + "Cache"
].socialSecurity;
this.formData.socialSecurity = localStorage.get(this.autoSaveKey).socialSecurity;
} catch (e) {
console.log("缓存中不存在");
//
}
}
},
......
......@@ -778,11 +778,11 @@ export default {
AUTO_SAVE_TARGET + "Cache"
].insuredUserInfo.socialSecurity;
} catch (e) {
console.log("缓存中不存在");
//
}
}
if (relation) {
this.formData.insuredUserInfo.relation = relation;
this.formData.insuredUserInfo.relation = "" + relation;
}
this.calFee();
this.$forceUpdate();
......@@ -810,6 +810,12 @@ export default {
res.forEach(item => {
if (item.productNo === this.formData.productNo) {
this.headerInfo.price[0] = item.downPayPrice;
const price = this.headerInfo.price;
price[1] = "元/起";
this.goodActionInfo = {
title: price
};
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