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

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

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