Commit 33d9e842 authored by 郭志伟's avatar 郭志伟

fix: 问题修复

parent 726b88e4
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description:众安50万意外险 * @Description:众安50万意外险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-24 19:23:28 * @LastEditTime: 2020-08-25 18:25:51
*/ */
import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png";
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
}, },
protocolData: [ protocolData: [
{ title: "保险条款", id: 0 }, { title: "保险条款", id: 0 },
{ title: "投保须知与声明", id: 2 }, { title: "投保须知与声明", id: 1 },
{ title: "服务协议", id: 3 } { title: "服务协议", id: 3 }
], ],
popupArray: [ popupArray: [
......
...@@ -256,9 +256,33 @@ export default { ...@@ -256,9 +256,33 @@ export default {
{ label: "", value: "1" } { label: "", value: "1" }
], ],
// 收入 // 收入
incomeOptions: ["10万", "20万", "25万", "30万"], incomeOptions: [
"5万以下",
"5万",
"10万",
"20万",
"25万",
"30万",
"35万",
"40万",
"45万",
"50万以上"
],
// 贷款 // 贷款
loanOptions: ["无房贷", "1000元", "2000元", "3000元", "4000元"], loanOptions: [
"无房贷",
"1000元",
"2000元",
"3000元",
"4000元",
"5000元",
"6000元",
"7000元",
"8000元",
"9000元",
"1万元以上",
"1万元以上"
],
solveOptions: [ solveOptions: [
{ label: "之前从没买过保险,打算配置保险", value: "之前从没买过保险,打算配置保险" }, { label: "之前从没买过保险,打算配置保险", value: "之前从没买过保险,打算配置保险" },
{ label: "已配置部分保险,打算再补充一些", value: "已配置部分保险,打算再补充一些" }, { label: "已配置部分保险,打算再补充一些", value: "已配置部分保险,打算再补充一些" },
......
<template> <template>
<cr-form scroll-to-error @submit="onSubmit" @failed="onFailed" class="container"> <cr-form scroll-to-error @submit="onSubmit" @failed="onFailed" class="container" ref="subForm">
<nav-tab :nav-list="navBarOptions" ref="navTab" @show="e => (goodActionShow = e)" /> <nav-tab :nav-list="navBarOptions" ref="navTab" @show="e => (goodActionShow = e)" />
<detail-header :det="headerInfo" /> <detail-header :det="headerInfo" />
<div class="det-body"> <div class="det-body">
...@@ -168,8 +168,9 @@ export default { ...@@ -168,8 +168,9 @@ export default {
let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo; let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo;
if ( if (
!relation || !relation ||
(idNoWho && !idNoWho ||
idNoWho.indexOf("************") === -1 && !amountInsured ||
(idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) && !isIdNo(idNoWho) &&
idNoWho === oldidNoWho && idNoWho === oldidNoWho &&
amountInsured === oldamountInsured) amountInsured === oldamountInsured)
...@@ -310,6 +311,7 @@ export default { ...@@ -310,6 +311,7 @@ export default {
}, },
async calFee() { async calFee() {
let { price } = this.headerInfo; let { price } = this.headerInfo;
const { noticeCellInfo } = this;
const { idNo, selfIdNo, relation, amountInsured, userInfoSecId, selfSecId } = this.formData; const { idNo, selfIdNo, relation, amountInsured, userInfoSecId, selfSecId } = this.formData;
let idNoWho = !relation || relation === "1" ? selfIdNo : idNo; let idNoWho = !relation || relation === "1" ? selfIdNo : idNo;
let idWho = !relation || relation === "1" ? selfSecId : userInfoSecId; let idWho = !relation || relation === "1" ? selfSecId : userInfoSecId;
...@@ -335,6 +337,7 @@ export default { ...@@ -335,6 +337,7 @@ export default {
title: price title: price
}; };
this.goodBuyModalInfo = [{ title: `每年保费`, value: `${price[0]}元` }]; this.goodBuyModalInfo = [{ title: `每年保费`, value: `${price[0]}元` }];
noticeCellInfo[amountInsured][2].value = `${price[0] + price[1]}`;
} }
} }
} }
......
<template> <template>
<cr-form scroll-to-error @submit="onSubmit" @failed="onFailed" class="container"> <cr-form scroll-to-error @submit="onSubmit" @failed="onFailed" class="container" ref="subForm">
<nav-tab :nav-list="navBarOptions" ref="navTab" @show="e => (goodActionShow = e)" /> <nav-tab :nav-list="navBarOptions" ref="navTab" @show="e => (goodActionShow = e)" />
<detail-header :det="headerInfo" /> <detail-header :det="headerInfo" />
<div class="det-body"> <div class="det-body">
...@@ -228,8 +228,8 @@ export default { ...@@ -228,8 +228,8 @@ export default {
} }
if ( if (
!relation || !relation ||
(idNoWho && !idNoWho ||
idNoWho.indexOf("************") === -1 && (idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) && !isIdNo(idNoWho) &&
idNoWho === oldidNoWho && idNoWho === oldidNoWho &&
payType === oldpayType && payType === oldpayType &&
...@@ -328,6 +328,7 @@ export default { ...@@ -328,6 +328,7 @@ export default {
}, },
async calFee() { async calFee() {
let { price, subPrice } = this.headerInfo; let { price, subPrice } = this.headerInfo;
const { noticeCellInfo } = this;
const { const {
idNo, idNo,
socialSecurity, socialSecurity,
...@@ -371,6 +372,9 @@ export default { ...@@ -371,6 +372,9 @@ export default {
value: subPrice[0] ? `${subPrice[0]}${subPrice[1]}${subPrice[3]}` : "" value: subPrice[0] ? `${subPrice[0]}${subPrice[1]}${subPrice[3]}` : ""
} }
]; ];
noticeCellInfo[amountInsured][3].value.tpl = `保费与保额、被保人年龄有关<br />${price[2] +
price[0] +
price[1]}${subPrice[0] ? subPrice[2] + subPrice[0] + subPrice[1] : ""}`;
} }
} }
} }
......
<template> <template>
<cr-form scroll-to-error @submit="onSubmit" @failed="onFailed" class="container"> <cr-form scroll-to-error @submit="onSubmit" @failed="onFailed" class="container" ref="subForm">
<nav-tab :nav-list="navBarOptions" ref="navTab" @show="e => (goodActionShow = e)" /> <nav-tab :nav-list="navBarOptions" ref="navTab" @show="e => (goodActionShow = e)" />
<detail-header :det="headerInfo" /> <detail-header :det="headerInfo" />
<div class="det-body"> <div class="det-body">
...@@ -177,10 +177,8 @@ export default { ...@@ -177,10 +177,8 @@ export default {
let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo; let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo;
if ( if (
!relation || !relation ||
(idNoWho && !idNoWho ||
idNoWho.indexOf("************") === -1 && (idNoWho.indexOf("************") === -1 && !isIdNo(idNoWho) && idNoWho === oldidNoWho)
!isIdNo(idNoWho) &&
idNoWho === oldidNoWho)
) )
return; return;
this.calTimer = setTimeout(() => { this.calTimer = setTimeout(() => {
...@@ -357,6 +355,9 @@ export default { ...@@ -357,6 +355,9 @@ export default {
value: subPrice[0] ? `${subPrice[0]}${subPrice[1]}${subPrice[3]}` : "" value: subPrice[0] ? `${subPrice[0]}${subPrice[1]}${subPrice[3]}` : ""
} }
]; ];
this.noticeCellInfo[3].value.tpl = `保费于被保人年龄、有无社保有关<br />${price[2] +
price[0] +
price[1]}${subPrice[0] ? subPrice[2] + subPrice[0] + subPrice[1] : ""}`;
} }
} }
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
text-align: left; text-align: left;
.plan-tip { .plan-tip {
justify-content: space-between; justify-content: space-between;
font-size: @font-size-14; font-size: @font-size-14 - 1;
padding-bottom: 4px; padding-bottom: 4px;
} }
.svg-icon { .svg-icon {
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<cr-field <cr-field
name="selfPhone" name="selfPhone"
v-model="formData.selfPhone" v-model="formData.selfPhone"
type="tel"
placeholder="请输入您的手机号码" placeholder="请输入您的手机号码"
label="手机号码" label="手机号码"
:readonly="selfInfoReadonly" :readonly="selfInfoReadonly"
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
<cr-field <cr-field
name="selfCode" name="selfCode"
v-model="formData.selfCode" v-model="formData.selfCode"
type="digit"
v-if="(!!xyqbAuthState && xyqbAuthState !== 4) || !mongoToken" v-if="(!!xyqbAuthState && xyqbAuthState !== 4) || !mongoToken"
placeholder="请输入短信验证码" placeholder="请输入短信验证码"
label="验证码" label="验证码"
...@@ -427,6 +429,29 @@ export default { ...@@ -427,6 +429,29 @@ export default {
); );
this.relationList = userArray.length > 1 ? userArray : []; this.relationList = userArray.length > 1 ? userArray : [];
} }
if (!this.formData.selfName) {
const selfInfo = this.familyList.find(item => item.relation === 1);
this.selfInfoReadonly = !!selfInfo;
if (selfInfo) {
const {
idNoMask: selfIdNo,
nameMask: selfName,
socialSecurity,
userInfoSecId: selfSecId
} = selfInfo;
this.formData = {
...this.formData,
...{
selfName,
selfIdNo,
selfSecId,
selfSocialSecurity: socialSecurity ? "1" : "0"
}
};
}
} else {
this.selfInfoReadonly = true;
}
} else { } else {
let relation = this.formData.relation; let relation = this.formData.relation;
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation); (this.showAuthXyqb || this.mongoToken) && this.relationChange(relation);
......
...@@ -837,9 +837,6 @@ export default { ...@@ -837,9 +837,6 @@ export default {
longTerm: "1" longTerm: "1"
}; };
} }
if (this.hasAutoSaveData(AUTO_SAVE_KEY)) {
this.getSaveInfoHandler(AUTO_SAVE_KEY, AUTO_SAVE_TARGET);
}
this.familyList.forEach(item => { this.familyList.forEach(item => {
const { relation, nameMask: name, idNoMask: idNo, userInfoSecId } = item; const { relation, nameMask: name, idNoMask: idNo, userInfoSecId } = item;
if (+relation === 1) { if (+relation === 1) {
...@@ -988,13 +985,36 @@ export default { ...@@ -988,13 +985,36 @@ export default {
const res = await getFamilyList(); const res = await getFamilyList();
if (res) { if (res) {
this.familyList = res; this.familyList = res;
const queryId = this.$route.query.userInfoSecId; if (this.hasAutoSaveData(AUTO_SAVE_KEY)) {
let relation = this.formData.insuredUserInfo.relation; this.getSaveInfoHandler(AUTO_SAVE_KEY, AUTO_SAVE_TARGET);
if (queryId) { if (this.formData.insuredUserInfo.relation) {
relation = this.familyList.filter(item => item.userInfoSecId === queryId)[0].relation; const userArray = this.familyList.filter(
item => item.relation === +this.formData.insuredUserInfo.relation
);
this.relationList = userArray.length > 1 ? userArray : [];
} }
if (!this.formData.holderUserInfo.name) {
const selfInfo = this.familyList.find(item => item.relation === 1);
this.selfInfoReadonly = !!selfInfo;
if (selfInfo) {
const { idNoMask: idNo, nameMask: name, userInfoSecId } = selfInfo;
this.formData.holderUserInfo = {
...this.formData.holderUserInfo,
...{
idNo,
name,
userInfoSecId
}
};
}
} else {
this.selfInfoReadonly = true;
}
} else {
let relation = this.formData.insuredUserInfo.relation;
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation, false); (this.showAuthXyqb || this.mongoToken) && this.relationChange(relation, false);
} }
}
}, },
async calFee() { async calFee() {
let { price } = this.headerInfo; let { price } = this.headerInfo;
......
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