Commit 9d363074 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/goods' into 'master'

fix: 问题修复

See merge request !82
parents 726b88e4 33d9e842
......@@ -4,7 +4,7 @@
* @Description:众安50万意外险
* @Date: 2020-07-27 15:46:37
* @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";
......@@ -124,7 +124,7 @@ export default {
},
protocolData: [
{ title: "保险条款", id: 0 },
{ title: "投保须知与声明", id: 2 },
{ title: "投保须知与声明", id: 1 },
{ title: "服务协议", id: 3 }
],
popupArray: [
......
......@@ -256,9 +256,33 @@ export default {
{ 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: [
{ label: "之前从没买过保险,打算配置保险", value: "之前从没买过保险,打算配置保险" },
{ label: "已配置部分保险,打算再补充一些", value: "已配置部分保险,打算再补充一些" },
......
<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)" />
<detail-header :det="headerInfo" />
<div class="det-body">
......@@ -168,8 +168,9 @@ export default {
let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo;
if (
!relation ||
(idNoWho &&
idNoWho.indexOf("************") === -1 &&
!idNoWho ||
!amountInsured ||
(idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) &&
idNoWho === oldidNoWho &&
amountInsured === oldamountInsured)
......@@ -310,6 +311,7 @@ export default {
},
async calFee() {
let { price } = this.headerInfo;
const { noticeCellInfo } = this;
const { idNo, selfIdNo, relation, amountInsured, userInfoSecId, selfSecId } = this.formData;
let idNoWho = !relation || relation === "1" ? selfIdNo : idNo;
let idWho = !relation || relation === "1" ? selfSecId : userInfoSecId;
......@@ -335,6 +337,7 @@ export default {
title: price
};
this.goodBuyModalInfo = [{ title: `每年保费`, value: `${price[0]}元` }];
noticeCellInfo[amountInsured][2].value = `${price[0] + price[1]}`;
}
}
}
......
<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)" />
<detail-header :det="headerInfo" />
<div class="det-body">
......@@ -228,8 +228,8 @@ export default {
}
if (
!relation ||
(idNoWho &&
idNoWho.indexOf("************") === -1 &&
!idNoWho ||
(idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) &&
idNoWho === oldidNoWho &&
payType === oldpayType &&
......@@ -328,6 +328,7 @@ export default {
},
async calFee() {
let { price, subPrice } = this.headerInfo;
const { noticeCellInfo } = this;
const {
idNo,
socialSecurity,
......@@ -371,6 +372,9 @@ export default {
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>
<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)" />
<detail-header :det="headerInfo" />
<div class="det-body">
......@@ -177,10 +177,8 @@ export default {
let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo;
if (
!relation ||
(idNoWho &&
idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) &&
idNoWho === oldidNoWho)
!idNoWho ||
(idNoWho.indexOf("************") === -1 && !isIdNo(idNoWho) && idNoWho === oldidNoWho)
)
return;
this.calTimer = setTimeout(() => {
......@@ -357,6 +355,9 @@ export default {
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 @@
text-align: left;
.plan-tip {
justify-content: space-between;
font-size: @font-size-14;
font-size: @font-size-14 - 1;
padding-bottom: 4px;
}
.svg-icon {
......
......@@ -36,6 +36,7 @@
<cr-field
name="selfPhone"
v-model="formData.selfPhone"
type="tel"
placeholder="请输入您的手机号码"
label="手机号码"
:readonly="selfInfoReadonly"
......@@ -51,6 +52,7 @@
<cr-field
name="selfCode"
v-model="formData.selfCode"
type="digit"
v-if="(!!xyqbAuthState && xyqbAuthState !== 4) || !mongoToken"
placeholder="请输入短信验证码"
label="验证码"
......@@ -427,6 +429,29 @@ export default {
);
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 {
let relation = this.formData.relation;
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation);
......
......@@ -837,9 +837,6 @@ export default {
longTerm: "1"
};
}
if (this.hasAutoSaveData(AUTO_SAVE_KEY)) {
this.getSaveInfoHandler(AUTO_SAVE_KEY, AUTO_SAVE_TARGET);
}
this.familyList.forEach(item => {
const { relation, nameMask: name, idNoMask: idNo, userInfoSecId } = item;
if (+relation === 1) {
......@@ -988,12 +985,35 @@ export default {
const res = await getFamilyList();
if (res) {
this.familyList = res;
const queryId = this.$route.query.userInfoSecId;
let relation = this.formData.insuredUserInfo.relation;
if (queryId) {
relation = this.familyList.filter(item => item.userInfoSecId === queryId)[0].relation;
if (this.hasAutoSaveData(AUTO_SAVE_KEY)) {
this.getSaveInfoHandler(AUTO_SAVE_KEY, AUTO_SAVE_TARGET);
if (this.formData.insuredUserInfo.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() {
......
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