[IMP]【电投】投被保人年龄小于等于16周岁时,工作单位增加默认值“无”

This commit is contained in:
yuweiqi
2020-04-29 10:43:32 +08:00
parent eb5235b2b9
commit 307f05c0c1
2 changed files with 449 additions and 432 deletions

View File

@@ -386,7 +386,7 @@ export default {
[Radio.name]: Radio,
[IdentityCardScan.name]: IdentityCardScan,
[IndexBar.name]: IndexBar,
[Dialog.name] : Dialog
[Dialog.name]: Dialog
},
data() {
return {
@@ -747,10 +747,14 @@ export default {
return this.$toast('出生日期不晚于当日')
}
//长判断
if (this.userInfo.idType == '1') {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
if (this.userInfo.idType == '1') {
this.effectiveDateTypeAble = !(age > 45)
}
//如果年龄小于等于16岁工作单位默认值为
if (age <= 16) {
this.userInfo.workcompany = this.userInfo.workcompany || '无'
}
}
break
}
@@ -947,7 +951,7 @@ export default {
// return this.$toast('证件类型为台湾居民通行证的证件号码须为8位数字')
// }
// 投保人年龄必须大于等于16周岁哦
if(age < 16) {
if (age < 16) {
return this.$toast('亲投保人年龄必须大于等于16周岁哦~')
}
//投保人需大于等于 18 周岁
@@ -969,7 +973,6 @@ export default {
this.userInfo.occupationCode == '4071203' ||
this.userInfo.occupationCode == '8000001'
) {
;
} else if (this.userInfo.workcompany.length < 6 && this.userInfo.workcompany.trim() != '无') {
// await this.asyncToast('亲,您填写的工作单位过于简短哦~')
await this.$dialog.confirm({
@@ -1017,7 +1020,9 @@ export default {
obj['2'] = true
obj['3'] = true
if (obj[idType] === undefined) {
return this.$toast('亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
return this.$toast(
'亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”'
)
}
} else if (age < 16) {
// 小于16岁
@@ -1064,10 +1069,7 @@ export default {
//取出local中的投保人信息
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
//如果 姓名, 性别, 出生日期, 有无社保, 职业 ,婚姻情况,发生变化
if (
this.userInfo.sex != saleInsuredInfo.sex ||
this.userInfo.birthday != saleInsuredInfo.birthday
) {
if (this.userInfo.sex != saleInsuredInfo.sex || this.userInfo.birthday != saleInsuredInfo.birthday) {
console.log('hehe')
//提示用户
if (chooseProductCodes && chooseProductCodes.length)
@@ -1284,6 +1286,11 @@ export default {
this.effectiveDateTypeAble = idToData(val).age <= 45
this.userInfo.birthday = idToData(val).birthday
this.userInfo.sex = idToData(val).sex
console.log('111 = ', idToData(val).age <= 16)
if (idToData(val).age <= 16) {
//年龄小于等于16岁默认工作单位为无
this.userInfo.workcompany = this.userInfo.workcompany || '无'
}
if (idToData(val).age > 45) {
if (source) {
this.userInfo.effectiveDateType = true

View File

@@ -462,7 +462,7 @@ export default {
[Area.name]: Area,
[IdentityCardScan.name]: IdentityCardScan,
[IndexBar.name]: IndexBar,
[Dialog.name] : Dialog
[Dialog.name]: Dialog
},
data() {
return {
@@ -774,7 +774,10 @@ export default {
} else if (pickerType == '3') {
this.columns = DataDictionary.degree
} else if (pickerType == '4') {
this.columns = [{ id: 0, text: '有' }, { id: 1, text: '无' }]
this.columns = [
{ id: 0, text: '有' },
{ id: 1, text: '无' }
]
} else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity
} else if (pickerType == '6') {
@@ -1008,7 +1011,10 @@ export default {
// this.userInfo.marriage = ''
}
}
//如果年龄小于等于16岁工作单位默认值为
if (age <= 16) {
this.userInfo.workcompany = this.userInfo.workcompany || '无'
}
//出生证有效期
// if (this.userInfo.idType == '3') {
// if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(val) > Date.parse('1973-01-01')) {
@@ -1160,7 +1166,6 @@ export default {
this.userInfo.occupationCode == '4071203' ||
this.userInfo.occupationCode == '8000001'
) {
;
} else if (this.userInfo.workcompany.length < 6 && this.userInfo.workcompany.trim() != '无') {
await this.$dialog.confirm({
title: '提示',
@@ -1168,7 +1173,6 @@ export default {
confirmButtonText: '继续填写',
cancelButtonText: '返回修改'
})
}
// 计算年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
@@ -1367,7 +1371,9 @@ export default {
obj['2'] = true
obj['3'] = true
if (obj[idType] === undefined) {
return this.$toast('亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”')
return this.$toast(
'亲国籍为中国且未满2周岁儿童证件类型必须“身份证”或“户口本”或“出生证”或“台湾居民来往大陆通行证”或“港澳居民来往内地通行证”'
)
}
} else if (age < 16) {
// 小于16岁
@@ -1653,6 +1659,10 @@ export default {
this.userInfo.marriage = ''
}
}
if (idToData(val).age <= 16) {
//年龄小于等于16岁默认工作单位为无
this.userInfo.workcompany = this.userInfo.workcompany || '无'
}
if (idToData(val).age > 45) {
// this.idLimit = true
// this.isRequired = false