修改投保人被保人证件有效期

This commit is contained in:
dong.ai
2024-10-10 14:12:27 +08:00
parent e5fc51effa
commit 0ee6ff4bd1
2 changed files with 12 additions and 9 deletions

View File

@@ -993,6 +993,7 @@
}, },
//证件起始截止日期 //证件起始截止日期
onDateConfirm(val, type) { onDateConfirm(val, type) {
console.log(val,type,);
switch (type) { switch (type) {
case '0': case '0':
{ {
@@ -1009,9 +1010,10 @@
let age = utilsAge.getAge(this.userInfo.birthday, new Date()) let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// 长期按钮是否禁用 // 长期按钮是否禁用
this.effectiveDateTypeAble = age <= 45 this.effectiveDateTypeAble = age <= 45
if(this.userInfo.birthday){ if(this.userInfo.birthday && !this.userInfo.certiexpiredate){
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,val) this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,val)
if(this.userInfo.certiexpiredate) { if(this.userInfo.certiexpiredate) {
this.userInfo.certiexpiredate= this.userInfo.certiexpiredate
this.effectiveDateTypeAble = true this.effectiveDateTypeAble = true
this.userInfo.effectiveDateType = false this.userInfo.effectiveDateType = false
} }
@@ -1030,9 +1032,9 @@
} }
//身份证证件类型的判断 //身份证证件类型的判断
if (this.userInfo.idType == '1') { if (this.userInfo.idType == '1') {
if(this.userInfo.birthday){ // if(this.userInfo.birthday){
this.userInfo.certificateValidate = countCredentialValidity.getStartDate(this.userInfo.birthday,val) // this.userInfo.certificateValidate = countCredentialValidity.getStartDate(this.userInfo.birthday,val)
} // }
} }
} }
break break
@@ -1057,7 +1059,7 @@
if (this.userInfo.certificateValidate && !this.userInfo.certiexpiredate) { if (this.userInfo.certificateValidate && !this.userInfo.certiexpiredate) {
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,this.userInfo.certificateValidate) this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,this.userInfo.certificateValidate)
} }
if (this.userInfo.certiexpiredate && !this.userInfo.certificateValidate) { if (this.userInfo.certiexpiredate && !this.userInfo.certificateValidate) {
this.userInfo.certificateValidate = countCredentialValidity.getEndDate(this.userInfo.birthday,this.userInfo.certiexpiredate) this.userInfo.certificateValidate = countCredentialValidity.getEndDate(this.userInfo.birthday,this.userInfo.certiexpiredate)
} }
} }

View File

@@ -1109,9 +1109,10 @@
let age = utilsAge.getAge(this.userInfo.birthday, new Date()) let age = utilsAge.getAge(this.userInfo.birthday, new Date())
// 长期按钮是否禁用 // 长期按钮是否禁用
this.effectiveDateTypeAble = age <= 45 this.effectiveDateTypeAble = age <= 45
if(this.userInfo.birthday){ if(this.userInfo.birthday && !this.userInfo.certiexpiredate){
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,val) this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(this.userInfo.birthday,val)
if(this.userInfo.certiexpiredate) { if(this.userInfo.certiexpiredate) {
this.userInfo.certiexpiredate= this.userInfo.certiexpiredate
this.effectiveDateTypeAble = true this.effectiveDateTypeAble = true
this.userInfo.effectiveDateType = false this.userInfo.effectiveDateType = false
} }
@@ -1142,9 +1143,9 @@
//获取年龄 //获取年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date()) let age = utilsAge.getAge(this.userInfo.birthday, new Date())
console.log(age) console.log(age)
if(this.userInfo.birthday){ // if(this.userInfo.birthday){
this.userInfo.certificateValidate = countCredentialValidity.getStartDate(this.userInfo.birthday,val) // this.userInfo.certificateValidate = countCredentialValidity.getStartDate(this.userInfo.birthday,val)
} // }
} }
} }
break break