【国富惠桂保团体医疗保险产品上线金掌桂投保开发需求】编辑被保人信息时投被不同人时,留一个模板

This commit is contained in:
li.yuetong
2022-04-21 18:00:41 +08:00
parent 796a5eb45d
commit 0d82f9d737

View File

@@ -1,7 +1,7 @@
<template>
<div class='insured-info-container pb50'>
<!-- 被保险人信息 (投保人与被保险人非同一人的情况)-->
<van-cell-group class='mt10' v-if='userInfo.relationToAppnt != 1'>
<van-cell-group class='mt10'>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>被保人信息</p>
<customer-picker
@on-choose='chooseCustomer(arguments)'
@@ -13,6 +13,7 @@
v-model='insuredInfo.name'
@nameChange='nameChanges'
@on-click="selectClick('1', '1')"
:readonly="isAppnt"
></customer-picker>
<van-field
:value="insuredInfo.idType | idToText('insuredIdType')"
@@ -34,6 +35,7 @@
name='证件号码'
placeholder='请输入'
clearable
:readonly="isAppnt"
@blur="getRelatedData(insuredInfo.idNo, '2')"
>
<van-button v-if='insuredInfo.idType == 1' slot='button' size='small' type='danger' round
@@ -52,16 +54,16 @@
@confirm="onDateConfirm($event, '7')"
ref='certiexpiredate'
:flag='true'
:readonly='idLimitInsured'
:readonly='isAppnt || idLimitInsured'
></FieldDatePicter>
<div class='border-bt relative fs14 p10 flex justify-content-fe'>
<van-checkbox v-model='insuredInfo.effectiveDateType' :disabled='effectiveDateTypeAbleInsured'
<van-checkbox v-model='insuredInfo.effectiveDateType' :disabled='isAppnt || effectiveDateTypeAbleInsured'
@change='effectiveDataTypeChangeInsured'
>长期
</van-checkbox
>
</div>
<select-radio required :radios='sexRadio' label='性别' name='性别' v-validate="'required'"
<select-radio required :radios='sexRadio' label='性别' name='性别' :disabled="isAppnt" v-validate="'required'"
:value.sync='insuredInfo.sex'></select-radio>
<FieldDatePicter
label='出生日期'
@@ -73,6 +75,7 @@
@confirm="onDateConfirm($event, '5')"
ref='insuredBirthday'
:maxDate='insuredMaxDate'
:readonly="isAppnt"
></FieldDatePicter>
<van-field
v-if='isLessEighteen'
@@ -83,10 +86,12 @@
placeholder='请输入'
v-validate="'mobile'"
maxlength='11'
:readonly="isAppnt"
/>
<van-field v-if='isLessEighteen' v-model='insuredInfo.email' label='电子邮箱' name='电子邮箱' placeholder='请输入'
<van-field v-if='isLessEighteen' v-model='insuredInfo.email' :readonly="isAppnt" label='电子邮箱' name='电子邮箱' placeholder='请输入'
v-validate="'email'" clearable />
<van-field
readonly
required
@click="openOccupation('2')"
label='职业类别'
@@ -109,7 +114,7 @@
name='班级名称'
placeholder='请输入班级名称'
/>
<select-radio required :radios='medicalRadio' label='有无社保' name='有无社保'
<select-radio required :radios='medicalRadio' :disabled="isAppnt" label='有无社保' name='有无社保'
:value.sync='insuredInfo.medical'></select-radio>
<van-field
v-if='averageAnnualIncomeFlag'
@@ -121,6 +126,7 @@
v-validate="'required|onlyNumber'"
clearable
maxlength='5'
:readonly="isAppnt"
/>
<van-field
:value="insuredInfo.nativeplace | idToText('nativeplace')"
@@ -152,142 +158,13 @@
placeholder='请选择'
@click="areaSelect('2')"
/>
<van-field v-model='insuredInfo.homeAddress' label name='详细地址'
<van-field v-model='insuredInfo.homeAddress' :readonly="isAppnt" label name='详细地址'
placeholder='请输入详细地址' clearable maxlength='30' />
<div class='pl10 pt10 pb10 pr10 address fs14 redRadioCheckbox'>
<van-checkbox v-model='withRootUser.value'>同投保人</van-checkbox>
<van-checkbox v-model='withRootUser.value' :disabled="isAppnt">同投保人</van-checkbox>
</div>
</van-cell-group>
<!-- 被保险人信息 (投保人与被保险人是同一人的情况)-->
<van-cell-group class='mt10' v-else>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>被保人信息</p>
<customer-picker v-validate="'required|name'" name='被保险人姓名' label='被保险人姓名' required readonly
:value.sync='userInfo.name'></customer-picker>
<van-field
:value="userInfo.idType | idToText('insuredIdType')"
v-validate="'required'"
readonly
required
label='证件类型'
name='证件类型'
right-icon='arrow'
placeholder='请选择'
/>
<van-field
v-model='userInfo.idNo'
maxlength='18'
required
readonly
label='证件号码'
v-validate="'required'"
name='证件号码'
placeholder='请输入'
clearable
/>
<FieldDatePicter
required
label='证件截止日期'
name='证件截止日期'
:value.sync='userInfo.certiexpiredate'
type='date'
ref='certiexpiredate'
:flag='true'
readonly
></FieldDatePicter>
<div class='border-bt relative fs14 p10 flex justify-content-fe'>
<van-checkbox v-model='userInfo.effectiveDateType' :disabled='false'>长期</van-checkbox>
</div>
<select-radio required :disabled='true' :radios='sexRadio' label='性别' name='性别' v-validate="'required'"
:value.sync='userInfo.sex'></select-radio>
<FieldDatePicter
v-validate="'required'"
label='出生日期'
name='出生日期'
readonly
required
:value.sync='userInfo.birthday'
type='date'
:flag='true'
ref='insuredBirthday'
:maxDate='maxDate'
></FieldDatePicter>
<van-field
v-if='isLessEighteen'
v-model='userInfo.mobile'
clearable
label='手机号码'
name='手机号码'
placeholder='请输入'
v-validate="'mobile'"
maxlength='11'
readonly
/>
<van-field v-model='userInfo.email' readonly label='电子邮箱' name='电子邮箱' placeholder='请输入'
v-validate="'email'" clearable />
<!-- <van-field readonly required label='职业类别' name='职业类别' :value='userInfo.occupationName' right-icon='arrow' /> -->
<van-field
v-model='userInfo.schoolName'
v-show='showField'
label='学校名称'
name='学校名称'
placeholder='请输入学校名称'
/>
<van-field
v-model='userInfo.className'
v-show='showField'
label='班级名称'
name='班级名称'
placeholder='请输入班级名称'
/>
<select-radio :radios='medicalRadio' label='有无社保' name='有无社保'
:value.sync='userInfo.medical'></select-radio>
<van-field
v-if='averageAnnualIncomeFlag'
v-model='userInfo.averageAnnualIncome'
label='平均年收入(万元)'
name='平均年收入'
required
readonly
placeholder='请输入,单位万元'
v-validate="'required|onlyNumber'"
clearable
maxlength='5'
/>
<van-field
:value="userInfo.nativeplace | idToText('nativeplace')"
readonly
required
label='国籍'
name='国籍'
v-validate="'required'"
right-icon='arrow'
placeholder='请选择'
/>
<van-field
:value="userInfo.marriage | idToText('marriage')"
readonly
required
label='婚姻状况'
name='婚姻状况'
v-validate="'required'"
right-icon='arrow'
placeholder='请选择'
/>
<van-field
v-model='userInfo.homeName'
readonly
label='联系地址'
name='联系地址'
required
right-icon='arrow'
placeholder='请选择'
v-validate="'required'"
/>
<van-field readonly v-model='userInfo.homeAddress' label name='详细地址' placeholder='请输入详细地址' v-validate="'required'"
clearable maxlength='30' />
</van-cell-group>
<!-- 受益人信息 -->
<van-cell-group class='mt10'>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>受益人信息</p>
@@ -541,7 +418,7 @@ export default {
medical:'0',//有无社保
schoolName: '',
className: '',
relationToAppnt:''
relationToAppnt:'1'
},
selectUser: '',
areaList: areaList,
@@ -569,6 +446,7 @@ export default {
},
occupationalType: DataDictionary.queryOccupationalByType[0].id,
isInsuredCertiexpiredate:true, //被保人有效止期是否显示
isAppnt: false // 是否投被同人
}
},
created() {
@@ -597,7 +475,7 @@ export default {
// if (this.itemProductDTOS.productCode === 'GFRS_M0048' || this.itemProductDTOS.productCode === 'GFRS_M0049' || this.itemProductDTOS.productCode === 'GFRS_M0050') {
// //金掌桂学平险产品指定生效日规则调整的申请,学平险+60
// this.filterMaxDate = afterDate.getAfterDays(60)
// this.userInfo.relationToAppnt = ''
// this.insuredInfo.relationToAppnt = ''
// this.showField = true
// let currentTime = dateUtils.formatDate(new Date(), 'yyyy-MM-dd')
// let currentDataArr = currentTime.split('-')
@@ -639,7 +517,7 @@ export default {
// }
// //GFRS-2641 少儿安康
// if (this.itemProductDTOS.productCode === 'GFRS_M0052') {
// this.userInfo.relationToAppnt = '3'
// this.insuredInfo.relationToAppnt = '3'
// //GFRS-2641 保留首次投保、保险期间届满重新投保,默认首次投保
// this.showFirstOr = true
// //GFRS-2641 被保险人去掉电子邮箱、手机号码字段
@@ -682,9 +560,10 @@ export default {
// if (this.itemProductDTOS.productCode != 'GFRS_M0032') {
// this.userInfo.averageAnnualIncome = '0'
// }
this.userInfo.relationToAppnt = this.$route.query.relationToAppnt
this.insuredInfo.relationToAppnt = this.$route.query.relationToAppnt
if(this.insuredInfo.relationToAppnt == '1'){
this.isAppnt = true
}
if (this.$route.query.cardOrderNo) {
this.cardOrderNo = this.$route.query.cardOrderNo
}
@@ -694,58 +573,41 @@ export default {
}
cardOrderDetail(cardInfoDTO).then(res => {
if (res.result == '0') {
Object.assign(this.userInfo,res.orderDTO.appntDTO)
if(that.$route.query.insuredId){ //编辑
res.orderDTO.insuredDTOs.forEach(item => {
if(that.$route.query.insuredId == item.insuredId){
// that.insuredInfo = item
if(that.$route.query.relationToAppnt == '1'){
Object.assign(this.userInfo,item)
that.userInfo.certiexpiredate = that.userInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate
that.userInfo.homeName = getAreaName([
{ code: that.userInfo.homeProvince },
{ code: that.userInfo.homeCity },
{ code: that.userInfo.homeArea }
])
that.insuredInfo.birthday = that.userInfo.birthday
}else{
Object.assign(that.insuredInfo,item)
that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.insuredInfo.certiexpiredate
that.insuredInfo.homeName = getAreaName([
{ code: that.insuredInfo.homeProvince },
{ code: that.insuredInfo.homeCity },
{ code: that.insuredInfo.homeArea }
])
}
Object.assign(that.insuredInfo,item)
that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false
that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.insuredInfo.certiexpiredate
that.insuredInfo.homeName = getAreaName([
{ code: that.insuredInfo.homeProvince },
{ code: that.insuredInfo.homeCity },
{ code: that.insuredInfo.homeArea }
])
that.proScheme = that.insuredInfo.riskDTOLst[0].proScheme
that.proSchemeCode = that.insuredInfo.riskDTOLst[0].proSchemeCode
that.allPrice = that.insuredInfo.riskDTOLst[0].prem
that.trialList = that.insuredInfo.riskDTOLst
}
})
console.log(that.insuredInfo,'that.insuredInfo')
} else {
if(that.$route.query.relationToAppnt == '1'){ //新增关系为本人
Object.assign(this.userInfo,res.orderDTO.appntDTO)
that.userInfo.certiexpiredate = that.userInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate
this.userInfo.homeName = getAreaName([
{ code: this.userInfo.homeProvince },
{ code: this.userInfo.homeCity },
{ code: this.userInfo.homeArea }
Object.assign(this.insuredInfo,res.orderDTO.appntDTO)
that.insuredInfo.effectiveDateType = that.insuredInfo.effectiveDateType == 'true'?true:false
that.insuredInfo.certiexpiredate = that.insuredInfo.effectiveDateType == 'true'?'':that.userInfo.certiexpiredate
this.insuredInfo.homeName = getAreaName([
{ code: this.insuredInfo.homeProvince },
{ code: this.insuredInfo.homeCity },
{ code: this.insuredInfo.homeArea }
])
that.insuredInfo.birthday = that.userInfo.birthday
that.userInfo.medical = '0'
that.insuredInfo.medical = '0'
}
}
}
})
},
methods: {
//长期状态改变时
effectiveDataTypeChange(val) {
//勾选长期状态时,证件截止日期置空
if (val) {
this.userInfo.certiexpiredate = ''
this.certiexpiredateRequired = false
} else {
this.certiexpiredateRequired = true
}
},
//长期状态改变时--被保人
effectiveDataTypeChangeInsured(val) {
if (val) {
@@ -770,10 +632,7 @@ export default {
}
})
this.occupationShowPicker = false
if (this.insureType === '1') {
this.userInfo.occupationName = name
this.userInfo.occupationCode = code
} else if (this.insureType === '2') {
if (this.insureType === '2') {
this.insuredInfo.occupationName = name
this.insuredInfo.occupationCode = code
}
@@ -784,6 +643,10 @@ export default {
* @return {*}
*/
openOccupation(insureType) {
// 投被保险人不允许编辑
if (this.isAppnt) {
return
}
this.$jump({
flag: 'navigation',
extra: {
@@ -793,28 +656,22 @@ export default {
})
this.occupationShowPicker = !this.occupationShowPicker
this.insureType = insureType
if (this.insureType === '1') {
this.occupationName = this.userInfo.occupationName
this.occupationCode = this.userInfo.occupationCode
} else if (this.insureType === '2') {
if (this.insureType === '2') {
this.occupationName = this.insuredInfo.occupationName
this.occupationCode = this.insuredInfo.occupationCode
}
},
areaSelect(insureType) {
// 投被同人不允许编辑
if (this.isAppnt) {
return
}
;[this.homeShow, this.insureType] = [true, insureType]
if (insureType === '1') {
this.areaCode = this.userInfo.homeArea
} else if (insureType === '2') {
if (insureType === '2') {
this.areaCode = this.insuredInfo.homeArea
}
},
//监听名字变化
nameChange(name) {
// console.log('name',name)
this.userInfo.name = name
},
//监听名字变化
nameChanges(name) {
// console.log('name',name)
this.insuredInfo.name = name
@@ -827,6 +684,10 @@ export default {
* @return {*}
*/
selectClick(index, value, insureType) {
// 投被同人不允许编辑
if (this.isAppnt) {
return
}
if (value !== undefined) {
this.selectUser = value
}
@@ -873,6 +734,10 @@ export default {
},
//弹框选择
toSelect(pickerType, valueKey) {
// 投被同人不允许编辑
if (this.isAppnt && pickerType != '10') {
return
}
//pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保(弃用) 5、税收居民身份 6、婚姻状况 7、在职情况 8、收入来源, 9 关系
;[this.popupShow, this.pickerType] = [true, pickerType]
if (valueKey) this.valueKey = valueKey
@@ -965,7 +830,7 @@ export default {
} else if (this.pickerType == '8') {
this.userInfo.salarySource = value.id
} else if (this.pickerType == '9') {
this.userInfo.relationToAppnt = value.id
this.insuredInfo.relationToAppnt = value.id
} else if (this.pickerType == '66') {
this.insuredInfo.marriage = value.id
this.insuredInfo.marriageStatus = value.text
@@ -1021,9 +886,10 @@ export default {
//试算逻辑
insureTrial() {
let that = this
if(this.insuredInfo.birthday || that.$route.query.relationToAppnt == '1'){
// if(this.insuredInfo.birthday || that.$route.query.relationToAppnt == '1'){
if(this.insuredInfo.birthday){
// 获取卡单列表
let birthday = that.$route.query.relationToAppnt == '1'?this.userInfo.birthday:this.insuredInfo.birthday
let birthday = this.insuredInfo.birthday
let data = {
trialInfos: [{ productCode: that.itemProductDTOS.productCode,birthday:birthday}],
}
@@ -1312,9 +1178,7 @@ export default {
// console.log(this.userInfo.salarySource)
// console.log(this.userInfo.otherSalarySource)
//表单校验, 成功跳转
if (this.userInfo.relationToAppnt == 1) {
Object.assign(this.insuredInfo, this.userInfo)
}
console.log(this.insuredInfo,'this.insuredInfo')
this.$validator.validate().then(valid => {
if (true === valid) {
// localStorage.chooseProductCodesNew = localStorage.chooseProductCodes
@@ -1352,7 +1216,7 @@ export default {
if (!this.insuredInfo.homeAddress) {
return this.$toast('被保人详细地址不能为空')
}
if (this.userInfo.relationToAppnt == 2 && this.userInfo.sex == this.insuredInfo.sex) {
if (this.insuredInfo.relationToAppnt == 2 && this.userInfo.sex == this.insuredInfo.sex) {
return this.$toast('~配偶性别不能相同的哟~')
}
@@ -1437,7 +1301,7 @@ export default {
if (this.itemProductDTOS.productCode === 'GFRS_M0022') {
// return
// 如果是未成年人
if (insuredAge < 7 && this.userInfo.relationToAppnt != '3') {
if (insuredAge < 7 && this.insuredInfo.relationToAppnt != '3') {
return this.$toast('0-7岁未成年人须由其父母投保请确定')
}
@@ -1490,20 +1354,20 @@ export default {
}
}
// 投被保人年龄与投被保人年龄之间校验逻辑
// if (this.userInfo.relationToAppnt == '4') {
// if (this.insuredInfo.relationToAppnt == '4') {
// //投被保人关系是子女
// // 被保险人的出生日期大于投保人的出生日期(即被保险人年龄小于投保人年龄)点击【下一步】提示“当前被保险人是投保人的子女,被保险人年龄需小于投保人年龄。
// if (age > insuredAge) {
// return this.$toast('当前投保人是被保险人的子女投保人年龄需小于被保险人年龄')
// }
// } else if (this.userInfo.relationToAppnt == '3') {
// } else if (this.insuredInfo.relationToAppnt == '3') {
// //投被保人关系是父母
// // 被保险人的出生日期小于投保人的出生日期(即被保险人年龄大于投保人年龄)点击【下一步】提示“当前被保险人是投保人的父母,被保险人年龄需大于投保人年龄。
// if (age < insuredAge) {
// return this.$toast('当前投保人是被保险人的父母投保人年龄需大于被保险人年龄')
// }
// }
if (this.userInfo.relationToAppnt != '1') {
if (this.insuredInfo.relationToAppnt != '1') {
//投被保人关系不是本人
//投保人和被保险人的证件信息(证件号码、证件类型)相同时,关系只能是本人,当“是投保人的”枚举为非本人(配偶、父母、子女、其他),但证件号码和本人相同,点击【下一步】提示“投保人和被保人关系不是本人,证件号码不可一致,请修改。”
if (this.userInfo.idNo == this.insuredInfo.idNo && this.userInfo.idType == this.insuredInfo.idType) {
@@ -1511,9 +1375,6 @@ export default {
}
}
// 是否长期选项 赋值
if (this.userInfo.effectiveDateType){
this.userInfo.certiexpiredate = '9999-01-01'
}
if (this.insuredInfo.effectiveDateType) {
this.insuredInfo.certiexpiredate = '9999-01-01'
}
@@ -1801,106 +1662,106 @@ export default {
// this.codeDisabled = false
// },
watch: {
'userInfo.relationToAppnt': {
handler(newV) {
// 如果关系为本人,将投保人信息带入到被保人信息上
if (newV === 1) {
Object.assign(this.insuredInfo, this.userInfo)
} else {
this.insuredInfo = {
name: '', // 被保人姓名
idType: '1', //被保人证件类型
idNo: '', //被保人证件号码
sex: '0', //被保人性别
birthday: '', //被保人出生日期
occupationCode: '', //职业代码
occupationName: '', //职业名称
lifeGrade: '', //寿险等级
healthGrade: '', //健康等级
nativeplace: '1', //国家地区
marriageStatus: '', //婚姻状况
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '450101', //家庭区
homeName: '', //联系地址
homeAddress: '', //详细地址
mobile: '', //移动电话
email: '', //电子邮箱
effectiveDateType: false, //是否长期
medical:'0',//有无社保
relationToAppnt: this.$route.query.relationToAppnt
}
// 设置选中‘同投保人’的勾选项
this.withRootUser.value = true
this.insuredInfo.homeName = getAreaName([
{ code: this.userInfo.homeProvince },
{ code: this.userInfo.homeCity },
{ code: this.userInfo.homeArea }
])
this.insuredInfo.homeProvince = this.userInfo.homeProvince
this.insuredInfo.homeCity = this.userInfo.homeCity
this.insuredInfo.homeArea = this.userInfo.homeArea
this.insuredInfo.homeAddress = this.userInfo.homeAddress
// 针对 3款学平险 和 少儿安康产品 被保人证件类型默认为户口本 --2021-08-26
// 'insuredInfo.relationToAppnt': {
// handler(newV) {
// // 如果关系为本人,将投保人信息带入到被保人信息上
// if (newV === 1) {
// Object.assign(this.insuredInfo, this.userInfo)
// } else {
// this.insuredInfo = {
// name: '', // 被保人姓名
// idType: '1', //被保人证件类型
// idNo: '', //被保人证件号码
// sex: '0', //被保人性别
// birthday: '', //被保人出生日期
// occupationCode: '', //职业代码
// occupationName: '', //职业名称
// lifeGrade: '', //寿险等级
// healthGrade: '', //健康等级
// nativeplace: '1', //国家地区
// marriageStatus: '', //婚姻状况
// homeProvince: '', //家庭省
// homeCity: '', //家庭市
// homeArea: '450101', //家庭区
// homeName: '', //联系地址
// homeAddress: '', //详细地址
// mobile: '', //移动电话
// email: '', //电子邮箱
// effectiveDateType: false, //是否长期
// medical:'0',//有无社保
// relationToAppnt: this.$route.query.relationToAppnt
// }
// // 设置选中‘同投保人’的勾选项
// this.withRootUser.value = true
// this.insuredInfo.homeName = getAreaName([
// { code: this.userInfo.homeProvince },
// { code: this.userInfo.homeCity },
// { code: this.userInfo.homeArea }
// ])
// this.insuredInfo.homeProvince = this.userInfo.homeProvince
// this.insuredInfo.homeCity = this.userInfo.homeCity
// this.insuredInfo.homeArea = this.userInfo.homeArea
// this.insuredInfo.homeAddress = this.userInfo.homeAddress
// // 针对 3款学平险 和 少儿安康产品 被保人证件类型默认为户口本 --2021-08-26
// 2516--三款学平险-- 0048义务教育 0049 幼儿园 0050 高中
// GFRS-2641--被保险人职业:幼儿园版默认学龄前儿童,义务教育、高中/高等教育默认一般学生
// 被保险人婚姻默认未婚,允许修改
// 被保险人手机及邮箱默认投保人,允许修改
if (this.itemProductDTOS.productCode == 'GFRS_M0048' || 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
this.insuredInfo.idType = '2'
// this.insuredInfo.effectiveDateType = true
// this.insuredInfo.certiexpiredate = '9999-01-01'
// 去掉--选择户口本时是否长期默认为是不可点击有效止期隐藏证件类型为户口本时被保人年龄小于16周岁时户口本有效止期长期变更为第16周岁日期
// this.effectiveDateTypeAbleInsured = true
// this.isInsuredCertiexpiredate = false
this.isInsuredCertiexpiredate = true
} else if (this.itemProductDTOS.productCode == 'GFRS_M0049') {
this.insuredInfo.occupationCode = '2099908'
this.insuredInfo.occupationName = '学龄前儿童'
this.insuredInfo.marriage = '2'
this.insuredInfo.idType = '2'
// this.insuredInfo.effectiveDateType = true
// this.insuredInfo.certiexpiredate = '9999-01-01'
// 去掉--选择户口本时是否长期默认为是不可点击有效止期隐藏证件类型为户口本时被保人年龄小于16周岁时户口本有效止期长期变更为第16周岁日期
// this.effectiveDateTypeAbleInsured = true
// this.isInsuredCertiexpiredate = false
this.isInsuredCertiexpiredate = true
}
// GFRS-2641--少儿安康,默认户口本,且户口本证件截止日期默认长期
if (this.itemProductDTOS.productCode == 'GFRS_M0052') {
this.insuredInfo.idType = '2'
// this.insuredInfo.certiexpiredate = '9999-01-01'
// this.insuredInfo.effectiveDateType = true
this.insuredInfo.occupationCode = '2099907'
this.insuredInfo.occupationName = '一般学生'
this.insuredInfo.marriage = '2'
// 去掉--选择户口本时是否长期默认为是不可点击有效止期隐藏证件类型为户口本时被保人年龄小于16周岁时户口本有效止期长期变更为第16周岁日期
this.effectiveDateTypeAbleInsured = true
// this.isInsuredCertiexpiredate = false
this.isInsuredCertiexpiredate = true
}
// // 2516--三款学平险-- 0048义务教育 0049 幼儿园 0050 高中
// // GFRS-2641--被保险人职业:幼儿园版默认学龄前儿童,义务教育、高中/高等教育默认一般学生
// // 被保险人婚姻默认未婚,允许修改
// // 被保险人手机及邮箱默认投保人,允许修改
// if (this.itemProductDTOS.productCode == 'GFRS_M0048' || 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
// this.insuredInfo.idType = '2'
// // this.insuredInfo.effectiveDateType = true
// // this.insuredInfo.certiexpiredate = '9999-01-01'
// // 去掉--选择户口本时是否长期默认为是不可点击有效止期隐藏证件类型为户口本时被保人年龄小于16周岁时户口本有效止期长期变更为第16周岁日期
// // this.effectiveDateTypeAbleInsured = true
// // this.isInsuredCertiexpiredate = false
// this.isInsuredCertiexpiredate = true
// } else if (this.itemProductDTOS.productCode == 'GFRS_M0049') {
// this.insuredInfo.occupationCode = '2099908'
// this.insuredInfo.occupationName = '学龄前儿童'
// this.insuredInfo.marriage = '2'
// this.insuredInfo.idType = '2'
// // this.insuredInfo.effectiveDateType = true
// // this.insuredInfo.certiexpiredate = '9999-01-01'
// // 去掉--选择户口本时是否长期默认为是不可点击有效止期隐藏证件类型为户口本时被保人年龄小于16周岁时户口本有效止期长期变更为第16周岁日期
// // this.effectiveDateTypeAbleInsured = true
// // this.isInsuredCertiexpiredate = false
// this.isInsuredCertiexpiredate = true
// }
// // GFRS-2641--少儿安康,默认户口本,且户口本证件截止日期默认长期
// if (this.itemProductDTOS.productCode == 'GFRS_M0052') {
// this.insuredInfo.idType = '2'
// // this.insuredInfo.certiexpiredate = '9999-01-01'
// // this.insuredInfo.effectiveDateType = true
// this.insuredInfo.occupationCode = '2099907'
// this.insuredInfo.occupationName = '一般学生'
// this.insuredInfo.marriage = '2'
// // 去掉--选择户口本时是否长期默认为是不可点击有效止期隐藏证件类型为户口本时被保人年龄小于16周岁时户口本有效止期长期变更为第16周岁日期
// this.effectiveDateTypeAbleInsured = true
// // this.isInsuredCertiexpiredate = false
// this.isInsuredCertiexpiredate = true
// }
// 2516--除万福卡投保人、被保险人年收入默认为0允许修改
if (this.itemProductDTOS.productCode != 'GFRS_M0032') {
this.insuredInfo.averageAnnualIncome = '0'
}
if (newV === 2) {
this.userInfo.sex === '0' ? (this.insuredInfo.sex = '1') : (this.insuredInfo.sex = '0')
}
}
},
immediate: true,
deep: true
},
// // 2516--除万福卡投保人、被保险人年收入默认为0允许修改
// if (this.itemProductDTOS.productCode != 'GFRS_M0032') {
// this.insuredInfo.averageAnnualIncome = '0'
// }
// if (newV === 2) {
// this.userInfo.sex === '0' ? (this.insuredInfo.sex = '1') : (this.insuredInfo.sex = '0')
// }
// }
// },
// immediate: true,
// deep: true
// },
'userInfo.sex': {
handler(newV) {
if (this.userInfo.relationToAppnt === 2) {
if (this.insuredInfo.relationToAppnt === 2) {
this.insuredInfo.sex = this.userInfo.sex === '0' ? '1' : '0'
}
},
@@ -1908,12 +1769,13 @@ export default {
deep: true
},
//监听'insuredInfo.birthday'被保人年龄有变化,清空保障方案和总保费
'insuredInfo.birthday': {
handler(newV) {
if (newV) {
'insuredInfo.idNo': {
handler(oldV,newV) {
if (newV && oldV != '') {
this.proScheme = ''
this.proSchemeCode = ''
this.allPrice = 0
this.trialList = []
}
},
immediate: true,