diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index b4b978a9a..d42bfcf15 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -919,7 +919,7 @@ export default { } //年龄在46-65周岁之间 } else if (age >= 46 && age <= 65) { - if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 || this.effectiveDateType == false) { + if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) { this.userInfo.certiexpiredate = '' this.$refs.certiexpiredate.date = '' return this.$toast('46周岁~65周岁的证件有效期为20年或长期') @@ -1108,7 +1108,7 @@ export default { //身份证证件类型的判断 //证件止期 - let val = this.userInfo.certiexpiredate + let val = this.userInfo.certiexpiredate //年龄在16周岁以下 if (age < 16) { if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) { @@ -1146,7 +1146,7 @@ export default { } //年龄在46-65周岁之间 } else if (age >= 46 && age <= 65) { - if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 || this.effectiveDateType == false) { + if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) { this.userInfo.certiexpiredate = '' this.$refs.certiexpiredate.date = '' return this.$toast('46周岁~65周岁的证件有效期为20年或长期') diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 121419b02..16c8fbc74 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -1123,7 +1123,7 @@ export default { } //年龄在46-65周岁之间 } else if (age >= 46 && age <= 65) { - if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 || this.effectiveDateType == false) { + if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) { this.userInfo.certiexpiredate = '' this.$refs.certiexpiredate.date = '' return this.$toast('46周岁~65周岁的证件有效期为20年或长期') @@ -1503,7 +1503,7 @@ export default { } //年龄在46-65周岁之间 } else if (age >= 46 && age <= 65) { - if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 || this.effectiveDateType == false) { + if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 || this.userInfo.effectiveDateType == false) { this.userInfo.certiexpiredate = '' this.$refs.certiexpiredate.date = '' return this.$toast('46周岁~65周岁的证件有效期为20年或长期')