[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

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

View File

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