diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue
index d567da1d4..1c40c61cb 100644
--- a/src/views/ebiz/sale/InsuredInfo.vue
+++ b/src/views/ebiz/sale/InsuredInfo.vue
@@ -40,7 +40,7 @@
>
证件扫描
-
+ >
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':
{
console.log('证件截止日期')
@@ -928,7 +928,7 @@ export default {
this.userInfo.birthday = data.birthday //出生日期
this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件类别
- // this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期
+ this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期
if (data.idEffectEndDate == '9999-01-01') {
this.userInfo.effectiveDateType = true //是否长期
} else {
diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue
index 9d60b3222..cb04f08cc 100644
--- a/src/views/ebiz/sale/InsuredPerson.vue
+++ b/src/views/ebiz/sale/InsuredPerson.vue
@@ -68,7 +68,7 @@
:readonly="isAppnt"
:maxDate="currentTime"
>
-
+ >
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':
{
//证件截止日期
@@ -1220,7 +1220,7 @@ export default {
}
}
this.userInfo.idNo = data.customerIdNumber //证件号码
- // this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期
+ this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期
// this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期
// this.userInfo.effectiveDateType = data.idEffectEndDate == '9999-01-01' //是否长期
if (data.idEffectEndDate == '9999-01-01') {