【国富惠桂保团体医疗保险产品上线金掌桂投保开发需求】isLessEighteen: true, //是否小于18周岁(不含),是否显示邮箱和手机号

This commit is contained in:
li.yuetong
2022-07-15 17:34:22 +08:00
parent bfc1148d03
commit 8b3f4a903b

View File

@@ -78,7 +78,6 @@
:readonly="isAppnt"
></FieldDatePicter>
<van-field
v-if='isLessEighteen'
v-model='insuredInfo.mobile'
clearable
label='手机号码'
@@ -88,7 +87,7 @@
maxlength='11'
:readonly="isAppnt"
/>
<van-field v-if='isLessEighteen' v-model='insuredInfo.email' :readonly="isAppnt" label='电子邮箱' name='电子邮箱' placeholder='请输入'
<van-field v-model='insuredInfo.email' :readonly="isAppnt" label='电子邮箱' name='电子邮箱' placeholder='请输入'
v-validate="'email'" clearable />
<van-field
readonly
@@ -307,7 +306,6 @@ export default {
return {
expireDate:'', //截止时间
cardOrderNo: '',
isLessEighteen: true, //是否小于18周岁不含
averageAnnualIncomeFlag: false, // 20210730 年收入不展示且默认为0 核心对年收入有非空校验
idLimit: false, //截止日期是否可编辑
idLimitInsured: false, //截止日期是否可编辑--被保人
@@ -452,80 +450,6 @@ export default {
},
created() {
// document.body.style.backgroundColor = '#F5F5F5'
//如果是编辑进来
// if (this.$route.query.edit) {
// getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
// if (res.result == 0) {
// //投保人信息返显
// this.userInfo = res.orderDTO.appntDTO
// //是否长期
// this.userInfo.effectiveDateType = res.orderDTO.appntDTO.effectiveDateType == 'false' ? false : true
// //有无社保
// this.userInfo.medical = '1'
// //设为联系地址
// this.userInfo.addressStatus = '0'
// //证件类型
// this.userInfo.idType = '1'
// //国家/地区
// this.userInfo.nativeplace = '1'
// this.$utils.intLocalStorage(res)
// }
// })
// }
// if (this.itemProductDTOS.productCode === 'GFRS_M0048' || this.itemProductDTOS.productCode === 'GFRS_M0049' || this.itemProductDTOS.productCode === 'GFRS_M0050') {
// //金掌桂学平险产品指定生效日规则调整的申请,学平险+60
// this.filterMaxDate = afterDate.getAfterDays(60)
// this.insuredInfo.relationToAppnt = ''
// this.showField = true
// let currentTime = dateUtils.formatDate(new Date(), 'yyyy-MM-dd')
// let currentDataArr = currentTime.split('-')
// if (currentDataArr[1] >= 6 && currentDataArr[1] <= 8) {
// this.cvaliDate = currentDataArr[0] + '-09-01'
// this.onDateConfirm(this.cvaliDate, '6')
// } else {
// this.cvaliDate = dateUtils.formatDate(afterDate.getAfterDays(1), 'yyyy-MM-dd')
// this.onDateConfirm(this.cvaliDate, '6')
// }
// }
//金掌桂无忧卡,少儿安康卡两款卡单产品关闭指定生效日功能,默认自承保之日起第四日零时生效
//GFRS_M0052 国富人寿少儿安康保险产品组合、GFRS_M0041 国富无忧卡-国富人寿综合意外伤害保险计划
// if (this.itemProductDTOS.productCode === 'GFRS_M0052' || this.itemProductDTOS.productCode === 'GFRS_M0041') {
// this.cvaliDate = dateUtils.formatDate(afterDate.getAfterDays(Number(this.trialList[0].timeliness)), 'yyyy-MM-dd')
// //保险期间计算逻辑
// let val = this.cvaliDate
// if (Date.parse(val) < Date.parse(new Date())) {
// return this.$toast('当前日期早于当日')
// }
// let currentDataArr = val.split('-')
// let currentData = currentDataArr[0] + '' + currentDataArr[1] + '' + currentDataArr[2] + ''
// let insuYear = JSON.parse(localStorage.insuYear)
// let insuYearM, productDate, productDateTime
// let insuYearD, hoDate
// switch (insuYear.insuYearFlag) {
// case 'D':
// hoDate = Date.parse(val) / 1000 + (insuYear['insuYear'] - 1) * 24 * 3600
// break
// case 'Y':
// hoDate = Date.parse(val) / 1000 + insuYear['insuYear'] * 24 * 3600 * (afterDate.isLeapYear(new Date(val).getFullYear()) - 1)
// break
// }
// productDate = new Date(parseInt(hoDate) * 1000)
// insuYearM = productDate.getMonth() + 1 < 10 ? '0' + (productDate.getMonth() + 1) : productDate.getMonth() + 1
// insuYearD = productDate.getDate() < 10 ? '0' + productDate.getDate() : productDate.getDate()
// productDateTime = productDate.getFullYear() + '' + insuYearM + '' + insuYearD + ''
// this.productDate = currentData + '0时至' + productDateTime + '24时止'
// }
// //GFRS-2641 少儿安康
// if (this.itemProductDTOS.productCode === 'GFRS_M0052') {
// this.insuredInfo.relationToAppnt = '3'
// //GFRS-2641 保留首次投保、保险期间届满重新投保,默认首次投保
// this.showFirstOr = true
// //GFRS-2641 被保险人去掉电子邮箱、手机号码字段
// this.isLessEighteen = false
// }
// this.userInfo.homeName = getAreaName([{ code: 450000 }, { code: 450100 }, { code: 450101 }]) //家庭地址
//GFRS_M0058 团体医疗保险 统一生效时间为投保次月1日0时
if (this.itemProductDTOS.productCode === 'GFRS_M0058') {
let currentTime = dateUtils.formatDate(new Date(), 'yyyy-MM-dd')
@@ -1012,16 +936,7 @@ export default {
this.$refs.insuredBirthday.date = ''
return this.$toast('出生日期不晚于当日')
}
//GFRS-2641-- 被保险人年龄小于18周岁不含前端需隐藏手机号码、电子邮箱
//GFRS-2641--被保险人大于等于18周岁前端需展示手机号码、电子邮箱且非必填
let age = utilsAge.getAge(val, new Date())
if (this.itemProductDTOS.productCode != 'GFRS_M0052') {
if (age <= 17) {
this.isLessEighteen = false //是否小于18周岁不含
} else {
this.isLessEighteen = true //是否小于18周岁不含
}
}
//GFRS-2641--被保险人年龄小于20周岁不含婚姻状况默认为未婚
if (age < 20) {
this.insuredInfo.marriage = '2'
@@ -1157,13 +1072,6 @@ export default {
this.insuredInfo.nativeplace = data.country
// 计算年龄
let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
if (this.itemProductDTOS.productCode != 'GFRS_M0052') {
if (age <= 17) {
this.isLessEighteen = false //是否小于18周岁不含
} else {
this.isLessEighteen = true //是否小于18周岁不含
}
}
// 长期按钮是否禁用
this.effectiveDateTypeAbleInsured = age <= 45
console.log(this.insuredInfo,'this.insuredInfo')
@@ -1650,13 +1558,6 @@ export default {
//GFRS-2641--被保险人大于等于18周岁前端需展示手机号码、电子邮箱且非必填
if (this.insuredInfo.birthday) {
let age = utilsAge.getAge(this.insuredInfo.birthday, new Date())
if (this.itemProductDTOS.productCode != 'GFRS_M0052') {
if (age <= 17) {
this.isLessEighteen = false //是否小于18周岁不含
} else {
this.isLessEighteen = true //是否小于18周岁不含
}
}
//GFRS-2641--被保险人年龄小于20周岁不含婚姻状况默认为未婚
if (age < 20) {
this.insuredInfo.marriage = '2'