[FIX]长期修改

This commit is contained in:
zhouna
2019-12-30 12:40:55 +08:00
parent 2675086d64
commit fb2dac8181
3 changed files with 44 additions and 52 deletions

View File

@@ -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
}

View File

@@ -52,9 +52,9 @@
></FieldDatePicter> -->
<FieldDatePicter
:v-validate="{ required: certiexpiredateRequired }"
required
label="证件截止日期"
name="证件截止日期"
:required="isRequired"
:value.sync="userInfo.certiexpiredate"
type="date"
@confirm="onDateConfirm($event, '1')"
@@ -412,7 +412,6 @@ export default {
sessionId: '', //后台返回的 id
effectiveDateTypeAble: false, //长期按钮是否禁用
isElecCont: '', // 保单类型 0 为电子 2 为纸质加电子
isRequired: '', //长期前是否有*
userInfo: {
name: '', //投保人姓名
sex: '0', //投保人性别
@@ -570,7 +569,7 @@ export default {
this.effectiveDateTypeAble = false
} else {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = !(age >= 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

View File

@@ -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') {