修改生产问题--输入完身份证,默认就带出来 16周岁日的截止日期

This commit is contained in:
liyuetong
2022-01-16 14:40:12 +08:00
parent 3f8f002e37
commit 4d8ab50064
3 changed files with 28 additions and 21 deletions

View File

@@ -622,7 +622,7 @@ export default {
}
})
})
//受益人证件类型如果是身份证证件截止日期证件截止日期应为第16周岁的生日日期。
//受益人证件类型如果是户口本证件截止日期证件截止日期应为第16周岁的生日日期。
if(item.idType == '2' && idToData(item.idNo).age <16){
// 获取出生日期年份16
let year = Number(item.birthday.substr(0,4)) + 16

View File

@@ -667,7 +667,8 @@ export default {
this.effectiveDateTypeAble = false
this.userInfo.effectiveDateType = false
}
if(this.userInfo.idType == '1' ||this.userInfo.idType == '2'){
//受益人证件类型如果是户口本时证件截止日期证件截止日期应为第16周岁的生日日期。
if(this.userInfo.idType == '2' && idToData(this.userInfo.idNo).age <16){
// 获取出生日期年份16
let year = Number(this.userInfo.birthday.substr(0,4)) + 16
if(this.userInfo.birthday.substr(5,5) == '02-29'){
@@ -1143,15 +1144,18 @@ export default {
this.userInfo.effectiveDateType = false
this.effectiveDateTypeAble = idToData(val).age <= 45
this.userInfo.birthday = idToData(val).birthday
// 获取出生日期年份16
let year = Number(this.userInfo.birthday.substr(0,4)) + 16
if(this.userInfo.birthday.substr(5,5) == '02-29'){
// 获取某年某月一共多少天
let date = new Date(year, 2, 1)
let dayEnd = new Date(date.getTime() - 864e5).getDate()
this.userInfo.certiexpiredate = year +'-02-'+ dayEnd
}else{
this.userInfo.certiexpiredate = year +'-'+ this.userInfo.birthday.substr(5,5)
//受益人证件类型如果是户口本时证件截止日期证件截止日期应为第16周岁的生日日期。
if(this.userInfo.idType == '2' && idToData(this.userInfo.idNo).age <16){
// 获取出生日期年份16
let year = Number(this.userInfo.birthday.substr(0,4)) + 16
if(this.userInfo.birthday.substr(5,5) == '02-29'){
// 获取某年某月一共多少天
let date = new Date(year, 2, 1)
let dayEnd = new Date(date.getTime() - 864e5).getDate()
this.userInfo.certiexpiredate = year +'-02-'+ dayEnd
}else{
this.userInfo.certiexpiredate = year +'-'+ this.userInfo.birthday.substr(5,5)
}
}
this.userInfo.sex = idToData(val).sex
if (idToData(val).age > 45) {

View File

@@ -711,7 +711,8 @@ export default {
this.effectiveDateTypeAble = false
this.userInfo.effectiveDateType = false
}
if(this.userInfo.idType == '1' ||this.userInfo.idType == '2'){
//被保人证件类型如果是户口本时证件截止日期证件截止日期应为第16周岁的生日日期。
if(this.userInfo.idType == '2' && idToData(this.userInfo.idNo).age <16){
// 获取出生日期年份16
let year = Number(this.userInfo.birthday.substr(0,4)) + 16
if(this.userInfo.birthday.substr(5,5) == '02-29'){
@@ -1206,7 +1207,7 @@ export default {
this.effectiveDateTypeAble = false
this.userInfo.effectiveDateType = false
}
if(this.userInfo.idType == '1' ||this.userInfo.idType == '2'){
if(this.userInfo.idType == '2' && idToData(this.userInfo.idNo).age <16){
// 获取出生日期年份16
let year = Number(this.userInfo.birthday.substr(0,4)) + 16
if(this.userInfo.birthday.substr(5,5) == '02-29'){
@@ -1850,14 +1851,16 @@ export default {
this.effectiveDateTypeAble = idToData(val).age <= 45
this.userInfo.birthday = idToData(val).birthday
// 获取出生日期年份16
let year = Number(this.userInfo.birthday.substr(0,4)) + 16
if(this.userInfo.birthday.substr(5,5) == '02-29'){
// 获取某年某月一共多少天
let date = new Date(year, 2, 1)
let dayEnd = new Date(date.getTime() - 864e5).getDate()
this.userInfo.certiexpiredate = year+'-02-'+ dayEnd
}else{
this.userInfo.certiexpiredate = year+'-'+ this.userInfo.birthday.substr(5,5)
if(this.userInfo.idType == '2' && idToData(this.userInfo.idNo).age <16){
let year = Number(this.userInfo.birthday.substr(0,4)) + 16
if(this.userInfo.birthday.substr(5,5) == '02-29'){
// 获取某年某月一共多少天
let date = new Date(year, 2, 1)
let dayEnd = new Date(date.getTime() - 864e5).getDate()
this.userInfo.certiexpiredate = year+'-02-'+ dayEnd
}else{
this.userInfo.certiexpiredate = year+'-'+ this.userInfo.birthday.substr(5,5)
}
}
this.userInfo.sex = idToData(val).sex
//年龄小于18周岁工作单位默认值为