From 4f46bb2d2dc127253d1b413d0447aa9e09bf80f9 Mon Sep 17 00:00:00 2001
From: liyuetong
Date: Mon, 26 Jul 2021 18:01:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E4=BF=9D=E9=A6=96=E9=A1=B5=E5=90=84?=
=?UTF-8?q?=E6=95=99=E8=82=B2=E9=98=B6=E6=AE=B5=E5=B9=B4=E9=BE=84=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E9=9C=80=E4=BF=AE=E8=AE=A2=E5=8F=8A=E7=B3=BB=E7=BB=9F?=
=?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=A2=AB=E4=BF=9D=E9=99=A9=E4=BA=BA=E5=B9=B4?=
=?UTF-8?q?=E9=BE=84=E8=AF=86=E5=88=AB=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/js/utils/data-dictionary.js | 11 ++
src/views/ebiz/cardList/information.vue | 205 +++++++++++++++---------
2 files changed, 139 insertions(+), 77 deletions(-)
diff --git a/src/assets/js/utils/data-dictionary.js b/src/assets/js/utils/data-dictionary.js
index 05b4d6373..004390326 100644
--- a/src/assets/js/utils/data-dictionary.js
+++ b/src/assets/js/utils/data-dictionary.js
@@ -1037,6 +1037,17 @@ export default {
text: '港澳台居民居住证'
}
],
+ //投保人证件类型
+ insuredIdTypeSpecial: [
+ {
+ id: 1,
+ text: '居民身份证'
+ },
+ {
+ id: 2,
+ text: '户口本'
+ }
+ ],
// 卡单投保人证件类型
cardListInsuredIdType: [
{
diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue
index bfcf67f93..58fc70a01 100644
--- a/src/views/ebiz/cardList/information.vue
+++ b/src/views/ebiz/cardList/information.vue
@@ -93,6 +93,7 @@
right-icon="arrow"
/>
总保费:{{ allPrice }}元
-
+
-
+
-
+
@@ -695,7 +698,7 @@ export default {
occupationCode: '',
occupationName: '',
itemProductDTOS: JSON.parse(CacheUtils.getLocItem('itemProductDTOS')), //
- showDialog:false,
+ // showDialog:false,
showField:false,
medical:'1',
firstOr:'0',
@@ -1000,7 +1003,13 @@ export default {
}
})
} else if (pickerType == '22') {
- this.columns = DataDictionary.idType
+ //2516--三个学平险--被保险人身份信息选择仅保留“身份证、户口本”,目前选择户口本仍要填写身份证到期
+ //时间,如果选择户口本项,默认为长期。
+ if(this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049'|| this.itemProductDTOS.productCode == 'GFRS_M0050'){
+ this.columns = DataDictionary.insuredIdTypeSpecial
+ }else{
+ this.columns = DataDictionary.insuredIdType
+ }
}
},
//确认选择字段
@@ -1056,10 +1065,18 @@ export default {
//value.id 1 居民身份证 todo
if (value.id != '1') {
this.effectiveDateTypeAbleInsured = false
+ //2516--三个学平险--被保险人身份信息选择仅保留“身份证、户口本”,目前选择户口本仍要填写身份证到期
+ //时间,如果选择户口本项,默认为长期。
+ if(this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049'|| this.itemProductDTOS.productCode == 'GFRS_M0050'){
+ this.insuredInfo.effectiveDateType = true
+ }
} else {
- if (this.userInfo.birthday) {
- let age = utilsAge.getAge(this.userInfo.birthday, new Date())
+ //身份证
+ if (this.insuredInfo.birthday) {
+ let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
this.effectiveDateTypeAbleInsured = !(age >= 45)
+ //身份证,年龄小于等于45,不可选长期
+ this.insuredInfo.effectiveDateType = false
}
}
this.insuredInfo.idType = value.id
@@ -1252,9 +1269,10 @@ export default {
this.userInfo.homeAddress = data.homeAddress //家庭详细地址
this.userInfo.occupationCode = data.occupationCode
this.userInfo.occupationName = data.occupationName
+
this.userInfo.lifeGrade = data.lifeGrade
this.userInfo.healthGrade = data.healthGrade
- this.userInfo.averageAnnualIncome = data.averageYearlyIncome //平均年收入
+ this.userInfo.averageAnnualIncome = this.itemProductDTOS.productCode== 'GFRS_M0032'?data.averageYearlyIncome:'' //平均年收入
this.userInfo.nativeplace = data.country
this.userInfo.marriage = data.marryStatus
// 计算年龄
@@ -1286,13 +1304,25 @@ export default {
this.insuredInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
}
this.insuredInfo.homeAddress = data.homeAddress //家庭详细地址
- this.insuredInfo.occupationCode = data.occupationCode
- this.insuredInfo.occupationName = data.occupationName
+ //2516--三个学平险--被保险人职业类别默认学生,允许修改。
+ if(this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049'|| this.itemProductDTOS.productCode == 'GFRS_M0050'){
+ this.insuredInfo.occupationCode = '2099907'
+ this.insuredInfo.occupationName = '一般学生'
+ }else{
+ this.insuredInfo.occupationCode = data.occupationCode
+ this.insuredInfo.occupationName = data.occupationName
+ }
this.insuredInfo.lifeGrade = data.lifeGrade
this.insuredInfo.healthGrade = data.healthGrade
- this.insuredInfo.averageAnnualIncome = data.averageYearlyIncome //平均年收入
+ //除万福卡,投保人、被保险人年收入填写项去掉,默认为0,卡产品不满足反洗钱识别线
+ this.insuredInfo.averageAnnualIncome = this.itemProductDTOS.productCode== 'GFRS_M0032'?data.averageYearlyIncome:'' //平均年收入
this.insuredInfo.nativeplace = data.country
- this.insuredInfo.marriage = data.marryStatus
+ //2516--三个学平险--被保险人婚姻默认未婚,允许修改
+ if(this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049'|| this.itemProductDTOS.productCode == 'GFRS_M0050'){
+ this.insuredInfo.marriage = '2'
+ }else{
+ this.insuredInfo.marriage = data.marryStatus
+ }
// 计算年龄
let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
// 长期按钮是否禁用
@@ -1351,7 +1381,7 @@ export default {
}
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
- console.log('计算年龄', age)
+ console.log('计算年龄', age)
// return
// 如果是未成年人
if (age < 18) {
@@ -1544,27 +1574,23 @@ export default {
// return this.$toast('投保人必须是具有民事行为能力且有固定职业和收入的自然人,请确定')
// }
- if (this.userInfo.relationToInsured == '4') {
- //投被保人关系是子女
- // 被保险人的出生日期大于投保人的出生日期(即被保险人年龄小于投保人年龄)点击【下一步】提示“当前被保险人是投保人的子女,被保险人年龄需小于投保人年龄。
- if (age > insuredAge) {
- return this.$toast('当前投保人是被保险人的子女,投保人年龄需小于被保险人年龄')
+ let insuredInfoAge = utilsAge.getAge(this.insuredInfo.birthday, new Date())
+ if (this.itemProductDTOS.productCode === 'GFRS_M0048') {
+ //幼儿园:3岁≤被保险人≤7岁
+ if(insuredInfoAge<3||insuredInfoAge>7){
+ return this.$toast('被保险人年龄应为3岁-7岁,请重新选择。')
}
- } else if (this.userInfo.relationToInsured == '3') {
- //投被保人关系是父母
- // 被保险人的出生日期小于投保人的出生日期(即被保险人年龄大于投保人年龄)点击【下一步】提示“当前被保险人是投保人的父母,被保险人年龄需大于投保人年龄。
- if (age < insuredAge) {
- return this.$toast('当前投保人是被保险人的父母,投保人年龄需大于被保险人年龄')
+ }else if (this.itemProductDTOS.productCode === 'GFRS_M0049') {
+ //义务教育:5岁≤被保险人≤18岁
+ if(insuredInfoAge<5||insuredInfoAge>18){
+ return this.$toast('被保险人年龄应为5岁-18岁,请重新选择。')
+ }
+ }else if (this.itemProductDTOS.productCode === 'GFRS_M0050') {
+ //高中及高等教育:15岁≤被保险人≤40岁
+ if(insuredInfoAge<15||insuredInfoAge>40){
+ return this.$toast('被保险人年龄应为15岁-40岁,请重新选择。')
}
}
- if (this.userInfo.relationToInsured != '1') {
- //投被保人关系不是本人
- //投保人和被保险人的证件信息(证件号码、证件类型)相同时,关系只能是本人,当“是投保人的”枚举为非本人(配偶、父母、子女、其他),但证件号码和本人相同,点击【下一步】提示“投保人和被保人关系不是本人,证件号码不可一致,请修改。”
- if(this.userInfo.idNo == this.insuredInfo.idNo && this.userInfo.idType == this.insuredInfo.idType){
- return this.$toast('投保人和被保人关系不是本人,证件号码不可一致,请修改。')
- }
- }
-
this.infoUpdate()
// console.log('success')
} else {
@@ -1572,33 +1598,33 @@ export default {
}
})
},
- showDialogMethond(){
- let insuredInfoAge = utilsAge.getAge(this.insuredInfo.birthday, new Date())
- if (this.itemProductDTOS.productCode === 'GFRS_M0048') {
- //义务教育 含6岁以下 20岁以上 弹窗
- if(insuredInfoAge<=6||insuredInfoAge>=20){
- this.showDialog=true;
- }else{
- this.nextStep();
- }
- }else if (this.itemProductDTOS.productCode === 'GFRS_M0049') {
- //幼儿园 含7岁以上
- if(insuredInfoAge>=7){
- this.showDialog=true;
- }else{
- this.nextStep();
- }
- }else if (this.itemProductDTOS.productCode === 'GFRS_M0050') {
- //高等教育 含6岁以下
- if(insuredInfoAge<=6){
- this.showDialog=true;
- }else{
- this.nextStep();
- }
- }else{
- this.nextStep();
- }
- },
+ // showDialogMethond(){
+ // let insuredInfoAge = utilsAge.getAge(this.insuredInfo.birthday, new Date())
+ // if (this.itemProductDTOS.productCode === 'GFRS_M0048') {
+ // //义务教育 含6岁以下 20岁以上 弹窗
+ // if(insuredInfoAge<=6||insuredInfoAge>=20){
+ // this.showDialog=true;
+ // }else{
+ // this.nextStep();
+ // }
+ // }else if (this.itemProductDTOS.productCode === 'GFRS_M0049') {
+ // //幼儿园 含7岁以上
+ // if(insuredInfoAge>=7){
+ // this.showDialog=true;
+ // }else{
+ // this.nextStep();
+ // }
+ // }else if (this.itemProductDTOS.productCode === 'GFRS_M0050') {
+ // //高等教育 含6岁以下
+ // if(insuredInfoAge<=6){
+ // this.showDialog=true;
+ // }else{
+ // this.nextStep();
+ // }
+ // }else{
+ // this.nextStep();
+ // }
+ // },
//信息变更
infoUpdate() {
//local 里面是否存有险种信息
@@ -1826,24 +1852,34 @@ export default {
Object.assign(this.insuredInfo, this.userInfo)
} else {
this.insuredInfo = {
- name: '', // 被保人姓名
- idType: '1', //被保人证件类型
- idNo: '', //被保人证件号码
- sex: '0', //被保人性别
- birthday: '', //被保人出生日期
- occupationCode: '', //职业代码
- occupationName: '', //职业名称
- lifeGrade: '', //寿险等级
- healthGrade: '', //健康等级
- nativeplace: '', //国家地区
- marriageStatus: '', //婚姻状况
- homeProvince: '', //家庭省
- homeCity: '', //家庭市
- homeArea: '450101', //家庭区
- homeName: '', //联系地址
- homeAddress: '', //详细地址
- mobile: '', //移动电话
- email: '' //电子邮箱
+ name: '', // 被保人姓名
+ idType: '1', //被保人证件类型
+ idNo: '', //被保人证件号码
+ sex: '0', //被保人性别
+ birthday: '', //被保人出生日期
+ occupationCode: '', //职业代码
+ occupationName: '', //职业名称
+ lifeGrade: '', //寿险等级
+ healthGrade: '', //健康等级
+ nativeplace: '1', //国家地区
+ marriageStatus: '', //婚姻状况
+ homeProvince: '', //家庭省
+ homeCity: '', //家庭市
+ homeArea: '450101', //家庭区
+ homeName: '', //联系地址
+ homeAddress: '', //详细地址
+ mobile: '', //移动电话
+ email: '' //电子邮箱
+ }
+ // 2516--三款学平险--被保险人职业类别默认学生,允许修改;
+ // 被保险人婚姻默认未婚,允许修改
+ // 被保险人手机及邮箱默认投保人,允许修改
+ if(this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049'|| this.itemProductDTOS.productCode == 'GFRS_M0050'){
+ this.insuredInfo.occupationCode = '2099907'
+ this.insuredInfo.occupationName = '一般学生'
+ this.insuredInfo.marriage = '2'
+ this.insuredInfo.mobile = this.userInfo.mobile
+ this.insuredInfo.email = this.userInfo.email
}
if (newV === 2) {
this.userInfo.sex === '0' ? (this.insuredInfo.sex = '1') : (this.insuredInfo.sex = '0')
@@ -1861,11 +1897,26 @@ export default {
},
immediate: true,
deep: true
- }
+ },
+ 'userInfo.mobile': {
+ handler(newV) {
+ this.insuredInfo.mobile = this.userInfo.mobile
+ },
+ immediate: true,
+ deep: true
+ },
+ 'userInfo.email': {
+ handler(newV) {
+ this.insuredInfo.email = this.userInfo.email
+ },
+ immediate: true,
+ deep: true
+ },
}
}