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

fix(投保为确认阅读协议弹框,已确认直接下一步;未算价不能提交): 未算价不能提交;投保确认后不用弹框

parent a21bf51d
let protocol = window.location.protocol; let protocol = window.location.protocol;
export default { export default {
basicHost: "http://yapi.quantgroups.com/mock/329/", // basicHost: "http://yapi.quantgroups.com/mock/329/",
// basicHost: "https://hathaway-mg.liangkebang.net/", basicHost: "https://hathaway-mg.liangkebang.net/",
// basicHost: "http://192.168.29.211:8964/", // basicHost: "http://192.168.29.211:8964/",
wxAppId: "wx514de17b23d53a20", wxAppId: "wx514de17b23d53a20",
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, // 神策数据请求地址 shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, // 神策数据请求地址
......
...@@ -141,9 +141,10 @@ export default { ...@@ -141,9 +141,10 @@ export default {
payType: "1", payType: "1",
amountInsured: "1000000", amountInsured: "1000000",
autoRenewPolicy: false, autoRenewPolicy: false,
read: true read: false
}, },
goInsureState: false goInsureState: false,
isCalPrice: false
}; };
}, },
watch: { watch: {
...@@ -222,6 +223,10 @@ export default { ...@@ -222,6 +223,10 @@ export default {
this.popupShow = true; this.popupShow = true;
}, },
onSubmit() { onSubmit() {
if (!this.isCalPrice) {
this.$notify({ type: "warn", message: "被保人年龄不在可投保范围,请仔细核对" });
return;
}
if (localStorage.get("mongoToken")) { if (localStorage.get("mongoToken")) {
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead(); this.getIsRead();
...@@ -338,6 +343,7 @@ export default { ...@@ -338,6 +343,7 @@ export default {
} }
} }
}; };
try {
const res = await trail(_param); const res = await trail(_param);
if (res) { if (res) {
price[0] = res.downPayPrice; price[0] = res.downPayPrice;
...@@ -348,6 +354,10 @@ export default { ...@@ -348,6 +354,10 @@ export default {
this.goodBuyModalInfo = [{ title: `每年保费`, value: `${price[0]}元` }]; this.goodBuyModalInfo = [{ title: `每年保费`, value: `${price[0]}元` }];
noticeCellInfo[amountInsured][2].value = `${price[0] + price[1]}`; noticeCellInfo[amountInsured][2].value = `${price[0] + price[1]}`;
} }
this.isCalPrice = true;
} catch (error) {
this.isCalPrice = false;
}
} }
} }
}; };
......
...@@ -138,9 +138,10 @@ export default { ...@@ -138,9 +138,10 @@ export default {
payType: "1", payType: "1",
amountInsured: "300000", amountInsured: "300000",
autoRenewPolicy: false, autoRenewPolicy: false,
read: true read: false
}, },
goInsureState: false goInsureState: false,
isCalPrice: false
}; };
}, },
watch: { watch: {
...@@ -281,6 +282,10 @@ export default { ...@@ -281,6 +282,10 @@ export default {
this.popupShow = true; this.popupShow = true;
}, },
onSubmit() { onSubmit() {
if (!this.isCalPrice) {
this.$notify({ type: "warn", message: "被保人年龄不在可投保范围,请仔细核对" });
return;
}
if (localStorage.get("mongoToken")) { if (localStorage.get("mongoToken")) {
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead(); this.getIsRead();
...@@ -363,7 +368,7 @@ export default { ...@@ -363,7 +368,7 @@ export default {
} }
} }
}; };
try {
const res = await trail(_param); const res = await trail(_param);
if (res) { if (res) {
price[2] = payType === "2" ? "" : "首月"; price[2] = payType === "2" ? "" : "首月";
...@@ -385,6 +390,10 @@ export default { ...@@ -385,6 +390,10 @@ export default {
price[0] + price[0] +
price[1]}${subPrice[0] ? subPrice[2] + subPrice[0] + subPrice[1] : ""}`; price[1]}${subPrice[0] ? subPrice[2] + subPrice[0] + subPrice[1] : ""}`;
} }
this.isCalPrice = true;
} catch (error) {
this.isCalPrice = false;
}
} }
} }
}; };
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
:options="[]" :options="[]"
:text-bold="true" :text-bold="true"
v-model="read" v-model="read"
:show-radio="false"
:cell-data="noticeCellInfo" :cell-data="noticeCellInfo"
@cell-click="openIframePupop" @cell-click="openIframePupop"
> >
......
...@@ -140,10 +140,11 @@ export default { ...@@ -140,10 +140,11 @@ export default {
payType: "1", payType: "1",
planValue: "3", planValue: "3",
autoRenewPolicy: false, autoRenewPolicy: false,
read: true read: false
}, },
goodActionShow: false, goodActionShow: false,
goInsureState: false goInsureState: false,
isCalPrice: false
}; };
}, },
watch: { watch: {
...@@ -217,6 +218,10 @@ export default { ...@@ -217,6 +218,10 @@ export default {
this.popupShow = true; this.popupShow = true;
}, },
onSubmit() { onSubmit() {
if (!this.isCalPrice) {
this.$notify({ type: "warn", message: "被保人年龄不在可投保范围,请仔细核对" });
return;
}
if (localStorage.get("mongoToken")) { if (localStorage.get("mongoToken")) {
socialSecurityCache = this.formData.socialSecurity; socialSecurityCache = this.formData.socialSecurity;
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList_I().then(() => {
...@@ -347,6 +352,7 @@ export default { ...@@ -347,6 +352,7 @@ export default {
} }
} }
}; };
try {
const res = await trail(_param); const res = await trail(_param);
if (res) { if (res) {
price[2] = payType === "2" ? "" : "首月"; price[2] = payType === "2" ? "" : "首月";
...@@ -368,6 +374,10 @@ export default { ...@@ -368,6 +374,10 @@ export default {
price[0] + price[0] +
price[1]}${subPrice[0] ? subPrice[2] + subPrice[0] + subPrice[1] : ""}`; price[1]}${subPrice[0] ? subPrice[2] + subPrice[0] + subPrice[1] : ""}`;
} }
this.isCalPrice = true;
} catch (error) {
this.isCalPrice = false;
}
} }
} }
}; };
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
<slot></slot> <slot></slot>
<template v-slot:footer> <template v-slot:footer>
<div class="insure-form-pact" slot="footer"> <div class="insure-form-pact" slot="footer">
<cr-field name="pact"> <cr-field name="pact" v-show="showRadio">
<template #input> <template #input>
<cr-checkbox shape="round" icon-size="13px" v-model="pact" checked-color="#FFC842"> <cr-checkbox shape="round" icon-size="13px" v-model="pact" checked-color="#FFC842">
投保前请阅读 投保前请阅读
</cr-checkbox> </cr-checkbox>
</template> </template>
</cr-field> </cr-field>
<div v-show="!showRadio"></div>
<div class="insure-form-pact-link"> <div class="insure-form-pact-link">
<a <a
href="javascript:;" href="javascript:;"
...@@ -50,6 +51,10 @@ export default { ...@@ -50,6 +51,10 @@ export default {
return ["查看完整费率表"]; return ["查看完整费率表"];
} }
}, },
showRadio: {
type: Boolean,
default: true
},
protocolData: { protocolData: {
type: Array, type: Array,
default() { default() {
......
...@@ -586,7 +586,7 @@ export default { ...@@ -586,7 +586,7 @@ export default {
goodBuyModalInfo: [], goodBuyModalInfo: [],
mongoToken: localStorage.get("mongoToken"), mongoToken: localStorage.get("mongoToken"),
policyFormData: JSON.parse(sessionStorage.getItem("policyFormData") || "{}"), policyFormData: JSON.parse(sessionStorage.getItem("policyFormData") || "{}"),
pact: true, pact: false,
formData: { formData: {
insuredUserInfo: { insuredUserInfo: {
relation: "", relation: "",
...@@ -794,13 +794,20 @@ export default { ...@@ -794,13 +794,20 @@ export default {
this.onRelationCancel(); this.onRelationCancel();
}, },
onFormSubmit() { onFormSubmit() {
this.goInsureState = true; this.getIsRead();
}, },
onFormFailed(errorInfo) { onFormFailed(errorInfo) {
console.log(errorInfo); console.log(errorInfo);
const { errors } = errorInfo; const { errors } = errorInfo;
this.$notify({ type: "warning", message: errors[0].message }); this.$notify({ type: "warning", message: errors[0].message });
}, },
getIsRead() {
if (this.pact) {
this.nextStep();
} else {
this.goInsureState = true;
}
},
nextStep() { nextStep() {
this.subFormData = JSON.parse(JSON.stringify(this.formData)); this.subFormData = JSON.parse(JSON.stringify(this.formData));
const { socialSecurity, longTerm, relation } = this.subFormData.insuredUserInfo; const { socialSecurity, longTerm, relation } = this.subFormData.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