diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue index 5645b0360..ad7b84d8a 100644 --- a/src/views/ebiz/sale/AddBeneficiaryInfo.vue +++ b/src/views/ebiz/sale/AddBeneficiaryInfo.vue @@ -64,7 +64,7 @@ ref="birthday" :readonly="isInsured && birthdayLimit" > - + > Date.parse(new Date()) || Date.parse(val) < Date.parse(this.userInfo.birthday)) { - // this.userInfo.certificateValidate = '' - // this.$refs.certificateValidate.date = '' - // return this.$toast('证件起始日期填写错误') - // } + case '0': + { + //证件起始日期 + //如果录入日期早于出生日期或晚于当前日期 + if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(this.userInfo.birthday)) { + this.userInfo.certificateValidate = '' + this.$refs.certificateValidate.date = '' + return this.$toast('证件起始日期填写错误') + } - // // 计算年龄 - // // 长期按钮是否禁用 - // if (this.userInfo.idType == '1') { - // let age = utilsAge.getAge(this.userInfo.birthday, new Date()) - // this.effectiveDateTypeAble = age <= 45 - // } - // } - // break + // 计算年龄 + // 长期按钮是否禁用 + if (this.userInfo.idType == '1') { + let age = utilsAge.getAge(this.userInfo.birthday, new Date()) + this.effectiveDateTypeAble = age <= 45 + } + } + break case '1': { //证件截止日期 @@ -613,6 +613,32 @@ export default { this.$refs.certiexpiredate.date = '' return this.$toast('亲,请您核实受益人身份证件有效期~') } + //不同证件类型的判断 + if (this.userInfo.idType) { + //获取年龄 + let age = utilsAge.getAge(this.userInfo.birthday, new Date()) + console.log(age) + //年龄在16-25周岁之间 + if (age >= 16 && age <= 25) { + if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) { + this.userInfo.certiexpiredate = '' + this.$refs.certiexpiredate.date = '' + return this.$toast('16周岁~25周岁的证件有效期为10年') + } + //年龄在26-45周岁之间 + } else if (age >= 26 && age <= 45) { + if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) { + this.userInfo.certiexpiredate = '' + this.$refs.certiexpiredate.date = '' + return this.$toast('26周岁~45周岁的证件有效期为20年') + } + //此外的年龄段不支持 + } else { + this.userInfo.certiexpiredate = '' + this.$refs.certiexpiredate.date = '' + return this.$toast('身份证不支持此年龄段') + } + } } break case '2': diff --git a/src/views/ebiz/sale/AttachmentManagement.vue b/src/views/ebiz/sale/AttachmentManagement.vue index bc1a84216..f7f1b9c38 100644 --- a/src/views/ebiz/sale/AttachmentManagement.vue +++ b/src/views/ebiz/sale/AttachmentManagement.vue @@ -271,6 +271,65 @@ --> +
+
+ 请点击+上传受益人身份证件 +
+
+
+
+
+
+ + + +
+ +
+ + + +
+ +
+
+
+ + + +
+ +
+
+
+
+
+
+