From fb2dac8181884e913579cdabd6403d4b52bbb763 Mon Sep 17 00:00:00 2001 From: zhouna Date: Mon, 30 Dec 2019 12:40:55 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=E9=95=BF=E6=9C=9F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ebiz/customer/formBlock.vue | 15 ++++---- src/views/ebiz/sale/InsuredInfo.vue | 39 ++++++++------------ src/views/ebiz/sale/InsuredPerson.vue | 42 +++++++++++----------- 3 files changed, 44 insertions(+), 52 deletions(-) diff --git a/src/components/ebiz/customer/formBlock.vue b/src/components/ebiz/customer/formBlock.vue index 15d941c11..a802a510a 100644 --- a/src/components/ebiz/customer/formBlock.vue +++ b/src/components/ebiz/customer/formBlock.vue @@ -581,12 +581,13 @@ export default { { //证件截止日期 //如果已经勾选了长期 - if (this.userInfo.effectiveDateType) { - //清空数据并返回 - this.userInfo.certiexpiredate = '' - this.$refs.certiexpiredate.date = '' - return - } + // if (this.userInfo.effectiveDateType) { + // //清空数据并返回 + // this.userInfo.certiexpiredate = '' + // this.$refs.certiexpiredate.date = '' + // return + // } + this.userInfo.effectiveDateType = false //如果录入日期早于当前日期 if (Date.parse(val) < Date.parse(new Date())) { this.userInfo.certiexpiredate = '' @@ -653,7 +654,7 @@ export default { return this.$toast(idToData(val).text) } this.userInfo.effectiveDateType = false - this.effectiveDateTypeAble = idToData(val).age < 45 + this.effectiveDateTypeAble = idToData(val).age <= 45 this.userInfo.birthday = idToData(val).birthday this.userInfo.customerSex = idToData(val).sex } diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index a3bd8d8fc..65128269b 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -52,9 +52,9 @@ > --> = 45) + this.effectiveDateTypeAble = !(age > 45) } this.userInfo.idType = value.id } else if (this.pickerType == '3') { @@ -614,12 +613,13 @@ export default { console.log('证件截止日期') //证件截止日期 //如果已经勾选了长期 - if (this.userInfo.effectiveDateType) { - //清空数据并返回 - this.userInfo.certiexpiredate = '' - this.$refs.certiexpiredate.date = '' - return - } + // if (this.userInfo.effectiveDateType) { + // //清空数据并返回 + // this.userInfo.certiexpiredate = '' + // this.$refs.certiexpiredate.date = '' + // return + // } + this.userInfo.effectiveDateType = false //如果录入日期早于当前日期 if (Date.parse(val) < Date.parse(new Date())) { this.userInfo.certiexpiredate = '' @@ -666,7 +666,7 @@ export default { //长判断 if (this.userInfo.idType == '1') { let age = utilsAge.getAge(this.userInfo.birthday, new Date()) - this.effectiveDateTypeAble = !(age >= 45) + this.effectiveDateTypeAble = !(age > 45) } } break @@ -1051,13 +1051,9 @@ export default { //勾选长期状态时,证件截止日期置空 if (val) { this.userInfo.certiexpiredate = '' - this.isRequired = false - this.idLimit = true this.certiexpiredateRequired = false } else { this.certiexpiredateRequired = true - this.isRequired = true - this.idLimit = false } }, //获取身份证扫描信息 @@ -1099,18 +1095,14 @@ export default { return this.$toast(idToData(val).text) } this.userInfo.effectiveDateType = false - this.effectiveDateTypeAble = idToData(val).age < 45 + this.effectiveDateTypeAble = idToData(val).age <= 45 this.userInfo.birthday = idToData(val).birthday this.userInfo.sex = idToData(val).sex - if (idToData(val).age >= 45) { - this.idLimit = true - this.isRequired = false - this.userInfo.effectiveDateType = true - this.effectiveDateTypeAble = true + if (idToData(val).age > 45) { + //this.userInfo.effectiveDateType = true + this.effectiveDateTypeAble = false } else { - this.idLimit = false - this.isRequired = true - this.userInfo.effectiveDateType = false + // this.userInfo.effectiveDateType = false } } }, @@ -1126,7 +1118,6 @@ export default { }, beforeDestroy() { //清理计时器 - console.log('123') window.clearInterval(this.timeId) this.timeId = null this.countDown = 60 diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 76e58aa23..0dd497eef 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -845,10 +845,9 @@ export default { //是否长期 if (insuredInfo.effectiveDateType == 'false') { this.userInfo.effectiveDateType = false - this.idLimit = false } else { this.userInfo.effectiveDateType = true - this.idLimit = true + this.effectiveDateTypeAble = false this.userInfo.certiexpiredate = '' this.$refs.certiexpiredate.date = '' } @@ -917,12 +916,13 @@ export default { { //证件截止日期 //如果已经勾选了长期 - if (this.userInfo.effectiveDateType) { - //清空数据并返回 - this.userInfo.certiexpiredate = '' - this.$refs.certiexpiredate.date = '' - return - } + // if (this.userInfo.effectiveDateType) { + // //清空数据并返回 + // this.userInfo.certiexpiredate = '' + // this.$refs.certiexpiredate.date = '' + // return + // } + this.userInfo.effectiveDateType = false //如果录入日期早于当前日期 if (Date.parse(val) < Date.parse(new Date())) { this.userInfo.certiexpiredate = '' @@ -1386,13 +1386,13 @@ export default { //勾选长期状态时,证件截止日期置空 if (val) { this.userInfo.certiexpiredate = '' - this.isRequired = false - this.idLimit = true + // this.isRequired = false + // this.idLimit = true this.certiexpiredateRequired = false } else { this.certiexpiredateRequired = true - this.isRequired = true - this.idLimit = false + // this.isRequired = true + // this.idLimit = false } }, //获取身份证扫描信息 @@ -1467,7 +1467,7 @@ export default { return this.$toast(idToData(val).text) } this.userInfo.effectiveDateType = false - this.effectiveDateTypeAble = idToData(val).age < 45 + this.effectiveDateTypeAble = idToData(val).age <= 45 this.userInfo.birthday = idToData(val).birthday this.userInfo.sex = idToData(val).sex if (!from) { @@ -1486,15 +1486,15 @@ export default { this.userInfo.marriage = '' } } - if (idToData(val).age >= 45) { - this.idLimit = true - this.isRequired = false - this.userInfo.effectiveDateType = true - this.effectiveDateTypeAble = true + if (idToData(val).age > 45) { + // this.idLimit = true + // this.isRequired = false + // this.userInfo.effectiveDateType = true + this.effectiveDateTypeAble = false } else { - this.idLimit = false - this.isRequired = true - this.userInfo.effectiveDateType = false + // this.idLimit = false + // this.isRequired = true + // this.userInfo.effectiveDateType = false } //如果选择户口本 // if (this.userInfo.idType == '2') {