Merge branch 'hotfix_证件截止与长期判断修改' into dev

This commit is contained in:
zhouna
2019-12-30 12:43:07 +08:00
3 changed files with 44 additions and 52 deletions

View File

@@ -581,12 +581,13 @@ export default {
{ {
//证件截止日期 //证件截止日期
//如果已经勾选了长期 //如果已经勾选了长期
if (this.userInfo.effectiveDateType) { // if (this.userInfo.effectiveDateType) {
//清空数据并返回 // //清空数据并返回
this.userInfo.certiexpiredate = '' // this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = '' // this.$refs.certiexpiredate.date = ''
return // return
} // }
this.userInfo.effectiveDateType = false
//如果录入日期早于当前日期 //如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) { if (Date.parse(val) < Date.parse(new Date())) {
this.userInfo.certiexpiredate = '' this.userInfo.certiexpiredate = ''
@@ -653,7 +654,7 @@ export default {
return this.$toast(idToData(val).text) return this.$toast(idToData(val).text)
} }
this.userInfo.effectiveDateType = false this.userInfo.effectiveDateType = false
this.effectiveDateTypeAble = idToData(val).age < 45 this.effectiveDateTypeAble = idToData(val).age <= 45
this.userInfo.birthday = idToData(val).birthday this.userInfo.birthday = idToData(val).birthday
this.userInfo.customerSex = idToData(val).sex this.userInfo.customerSex = idToData(val).sex
} }

View File

@@ -52,9 +52,9 @@
></FieldDatePicter> --> ></FieldDatePicter> -->
<FieldDatePicter <FieldDatePicter
:v-validate="{ required: certiexpiredateRequired }" :v-validate="{ required: certiexpiredateRequired }"
required
label="证件截止日期" label="证件截止日期"
name="证件截止日期" name="证件截止日期"
:required="isRequired"
:value.sync="userInfo.certiexpiredate" :value.sync="userInfo.certiexpiredate"
type="date" type="date"
@confirm="onDateConfirm($event, '1')" @confirm="onDateConfirm($event, '1')"
@@ -412,7 +412,6 @@ export default {
sessionId: '', //后台返回的 id sessionId: '', //后台返回的 id
effectiveDateTypeAble: false, //长期按钮是否禁用 effectiveDateTypeAble: false, //长期按钮是否禁用
isElecCont: '', // 保单类型 0 为电子 2 为纸质加电子 isElecCont: '', // 保单类型 0 为电子 2 为纸质加电子
isRequired: '', //长期前是否有*
userInfo: { userInfo: {
name: '', //投保人姓名 name: '', //投保人姓名
sex: '0', //投保人性别 sex: '0', //投保人性别
@@ -570,7 +569,7 @@ export default {
this.effectiveDateTypeAble = false this.effectiveDateTypeAble = false
} else { } else {
let age = utilsAge.getAge(this.userInfo.birthday, new Date()) let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = !(age >= 45) this.effectiveDateTypeAble = !(age > 45)
} }
this.userInfo.idType = value.id this.userInfo.idType = value.id
} else if (this.pickerType == '3') { } else if (this.pickerType == '3') {
@@ -614,12 +613,13 @@ export default {
console.log('证件截止日期') console.log('证件截止日期')
//证件截止日期 //证件截止日期
//如果已经勾选了长期 //如果已经勾选了长期
if (this.userInfo.effectiveDateType) { // if (this.userInfo.effectiveDateType) {
//清空数据并返回 // //清空数据并返回
this.userInfo.certiexpiredate = '' // this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = '' // this.$refs.certiexpiredate.date = ''
return // return
} // }
this.userInfo.effectiveDateType = false
//如果录入日期早于当前日期 //如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) { if (Date.parse(val) < Date.parse(new Date())) {
this.userInfo.certiexpiredate = '' this.userInfo.certiexpiredate = ''
@@ -666,7 +666,7 @@ export default {
//长判断 //长判断
if (this.userInfo.idType == '1') { if (this.userInfo.idType == '1') {
let age = utilsAge.getAge(this.userInfo.birthday, new Date()) let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = !(age >= 45) this.effectiveDateTypeAble = !(age > 45)
} }
} }
break break
@@ -1051,13 +1051,9 @@ export default {
//勾选长期状态时,证件截止日期置空 //勾选长期状态时,证件截止日期置空
if (val) { if (val) {
this.userInfo.certiexpiredate = '' this.userInfo.certiexpiredate = ''
this.isRequired = false
this.idLimit = true
this.certiexpiredateRequired = false this.certiexpiredateRequired = false
} else { } else {
this.certiexpiredateRequired = true this.certiexpiredateRequired = true
this.isRequired = true
this.idLimit = false
} }
}, },
//获取身份证扫描信息 //获取身份证扫描信息
@@ -1099,18 +1095,14 @@ export default {
return this.$toast(idToData(val).text) return this.$toast(idToData(val).text)
} }
this.userInfo.effectiveDateType = false this.userInfo.effectiveDateType = false
this.effectiveDateTypeAble = idToData(val).age < 45 this.effectiveDateTypeAble = idToData(val).age <= 45
this.userInfo.birthday = idToData(val).birthday this.userInfo.birthday = idToData(val).birthday
this.userInfo.sex = idToData(val).sex this.userInfo.sex = idToData(val).sex
if (idToData(val).age >= 45) { if (idToData(val).age > 45) {
this.idLimit = true //this.userInfo.effectiveDateType = true
this.isRequired = false this.effectiveDateTypeAble = false
this.userInfo.effectiveDateType = true
this.effectiveDateTypeAble = true
} else { } else {
this.idLimit = false // this.userInfo.effectiveDateType = false
this.isRequired = true
this.userInfo.effectiveDateType = false
} }
} }
}, },
@@ -1126,7 +1118,6 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
//清理计时器 //清理计时器
console.log('123')
window.clearInterval(this.timeId) window.clearInterval(this.timeId)
this.timeId = null this.timeId = null
this.countDown = 60 this.countDown = 60

View File

@@ -845,10 +845,9 @@ export default {
//是否长期 //是否长期
if (insuredInfo.effectiveDateType == 'false') { if (insuredInfo.effectiveDateType == 'false') {
this.userInfo.effectiveDateType = false this.userInfo.effectiveDateType = false
this.idLimit = false
} else { } else {
this.userInfo.effectiveDateType = true this.userInfo.effectiveDateType = true
this.idLimit = true this.effectiveDateTypeAble = false
this.userInfo.certiexpiredate = '' this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = '' this.$refs.certiexpiredate.date = ''
} }
@@ -917,12 +916,13 @@ export default {
{ {
//证件截止日期 //证件截止日期
//如果已经勾选了长期 //如果已经勾选了长期
if (this.userInfo.effectiveDateType) { // if (this.userInfo.effectiveDateType) {
//清空数据并返回 // //清空数据并返回
this.userInfo.certiexpiredate = '' // this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = '' // this.$refs.certiexpiredate.date = ''
return // return
} // }
this.userInfo.effectiveDateType = false
//如果录入日期早于当前日期 //如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) { if (Date.parse(val) < Date.parse(new Date())) {
this.userInfo.certiexpiredate = '' this.userInfo.certiexpiredate = ''
@@ -1386,13 +1386,13 @@ export default {
//勾选长期状态时,证件截止日期置空 //勾选长期状态时,证件截止日期置空
if (val) { if (val) {
this.userInfo.certiexpiredate = '' this.userInfo.certiexpiredate = ''
this.isRequired = false // this.isRequired = false
this.idLimit = true // this.idLimit = true
this.certiexpiredateRequired = false this.certiexpiredateRequired = false
} else { } else {
this.certiexpiredateRequired = true this.certiexpiredateRequired = true
this.isRequired = true // this.isRequired = true
this.idLimit = false // this.idLimit = false
} }
}, },
//获取身份证扫描信息 //获取身份证扫描信息
@@ -1467,7 +1467,7 @@ export default {
return this.$toast(idToData(val).text) return this.$toast(idToData(val).text)
} }
this.userInfo.effectiveDateType = false this.userInfo.effectiveDateType = false
this.effectiveDateTypeAble = idToData(val).age < 45 this.effectiveDateTypeAble = idToData(val).age <= 45
this.userInfo.birthday = idToData(val).birthday this.userInfo.birthday = idToData(val).birthday
this.userInfo.sex = idToData(val).sex this.userInfo.sex = idToData(val).sex
if (!from) { if (!from) {
@@ -1486,15 +1486,15 @@ export default {
this.userInfo.marriage = '' this.userInfo.marriage = ''
} }
} }
if (idToData(val).age >= 45) { if (idToData(val).age > 45) {
this.idLimit = true // this.idLimit = true
this.isRequired = false // this.isRequired = false
this.userInfo.effectiveDateType = true // this.userInfo.effectiveDateType = true
this.effectiveDateTypeAble = true this.effectiveDateTypeAble = false
} else { } else {
this.idLimit = false // this.idLimit = false
this.isRequired = true // this.isRequired = true
this.userInfo.effectiveDateType = false // this.userInfo.effectiveDateType = false
} }
//如果选择户口本 //如果选择户口本
// if (this.userInfo.idType == '2') { // if (this.userInfo.idType == '2') {