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

Merge branch 'fix/policy_fix' into 'master'

fix: 华贵基础数据更新

See merge request !63
parents 5c218b0a dc1df410
......@@ -4,7 +4,7 @@
* @Description: 华贵大麦2020定期寿险
* @Date: 2020-07-27 15:46:37
* @LastEditors: gzw
* @LastEditTime: 2020-08-20 18:03:46
* @LastEditTime: 2020-08-20 20:28:30
*/
import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
......@@ -97,8 +97,8 @@ export default {
{ label: "年缴", value: "1" }
],
sexOptions: [
{ label: "", value: "0" },
{ label: "", value: "1" }
{ label: "", value: "1" },
{ label: "", value: "0" }
],
idCardInvaildOptions: [
{ label: "非长期", value: "1" },
......
......@@ -14,6 +14,9 @@ const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err);
};
VueRouter.prototype.replace = function push(location) {
return originalPush.call(this, location).catch(err => err);
};
const router = new VueRouter({
mode: "history",
......
......@@ -43,6 +43,7 @@ export default {
},
computed: {
orderState() {
this.changePageTitle();
return this.orderInfo[0] ? this.orderInfo[0].state : -1;
},
...mapState(["isShowLogin"])
......@@ -71,6 +72,30 @@ export default {
},
changeQuestion() {
this.showQuestion = true;
},
changePageTitle() {
const state = "" + (this.orderInfo[0] ? this.orderInfo[0].state : -1);
let pageTitle = "";
switch (state) {
case "-1":
case "2":
case "1-1":
case "1-2":
case "1-3":
pageTitle = "1对1保险顾问";
break;
case "3":
pageTitle = "调查问卷";
break;
case "4":
case "5":
pageTitle = "保险顾问";
break;
default:
pageTitle = "1对1保险顾问";
break;
}
document.title = pageTitle;
}
}
};
......
......@@ -212,7 +212,6 @@ export default {
},
autoRenewPolicy: autoRenewPolicy
};
console.log(subFormData);
if (relation === "1") {
subFormDataCache.holderUserInfo.socialSecurity = !!Number(selfSocialSecurity);
subFormDataCache.holderUserInfo.relation = relation;
......@@ -338,7 +337,7 @@ export default {
userInfoSecId
} = this.formData;
let idNoWho = !relation || relation === "1" ? selfIdNo : idNo;
if (!idNoWho || !socialSecurity || !payType) return;
if (!idNoWho || !payType) return;
const _param = {
productNo: this.goodId,
productUserInfo: {
......
......@@ -77,7 +77,7 @@ export default {
countOptions: insuredAmountOptions,
termOptions,
paywayOptions,
benefitOptions: benefitOptions.filter((item, index) => index > 0)
benefitOptions: benefitOptions
};
},
watch: {
......
......@@ -265,8 +265,38 @@ export default {
this.selfInfoReadonly = true;
}
});
const userArray = this.familyList.filter(item => item.relation === +relation);
let userArray = this.familyList.filter(item => {
if (item.userInfoSecId === sessionStorage.getItem(this.detailType + "userInfoSecId")) {
this.formData.relation = "" + item.relation;
return item;
}
});
if (!userArray.length) {
userArray = this.familyList.filter(item => item.relation === +relation);
} else {
this.formData.relation = sessionStorage.getItem(this.detailType + "relation");
sessionStorage.removeItem(this.detailType + "userInfoSecId");
sessionStorage.removeItem(this.detailType + "relation");
}
let [name, idNo, userInfoSecId, socialSecurity] = ["", "", "", ""];
if (
relation ===
(localStorage.get(this.autoSaveKey) && localStorage.get(this.autoSaveKey).relation)
) {
const {
name: cachename,
idNo: cacheidNo,
userInfoSecId: cacheuserInfoSecId,
socialSecurity: cachesocialSecurity
} = localStorage.get(this.autoSaveKey);
[name, idNo, userInfoSecId, socialSecurity] = [
cachename,
cacheidNo,
cacheuserInfoSecId,
cachesocialSecurity
];
}
if (userArray.length) {
let { nameMask, idNoMask, userInfoSecId: id, socialSecurity: ss } = userArray[0];
[name, idNo, userInfoSecId, socialSecurity] = [nameMask, idNoMask, id, ss];
......@@ -310,11 +340,7 @@ export default {
if (this.hasAutoSaveData(this.autoSaveKey)) {
this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET);
} else {
const queryId = this.$route.query.userInfoSecId;
let relation = this.formData.relation;
if (queryId) {
relation = this.familyList.filter(item => item.userInfoSecId === queryId)[0].relation;
}
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation);
}
}
......
......@@ -111,14 +111,18 @@ export default {
methods: {
go(path, params) {
if (path === "/goods/detail" && params) {
let userInfoSecId = "";
let [userInfoSecId, relation] = ["", ""];
if (this.familyList && this.familyList.length) {
userInfoSecId = this.familyList[this.activeIndex].userInfoSecId;
relation = this.familyList[this.activeIndex].relation;
}
path = {
path,
query: { id: params.id, type: params.itype, userInfoSecId }
query: { id: params.id, type: params.itype }
};
sessionStorage.setItem(params.itype + "relation", relation);
sessionStorage.setItem(params.itype + "userInfoSecId", userInfoSecId);
localStorage.remove(params.itype + "DetailFormData");
} else if (path === "/policy/detail" && params.orderNo) {
path = `${path}/${params.orderNo}`;
}
......
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