【关于户口本证件有效期规则】证件类型户口本时,证件截止日期和是否长期不可选择

This commit is contained in:
liyuetong
2021-12-01 10:52:49 +08:00
parent 5da8859987
commit 35d23662b1
2 changed files with 36 additions and 3 deletions

View File

@@ -246,6 +246,8 @@ import idNoCheck from '@/assets/js/utils/idNoCheck'
import { idToData } from './js/verification' import { idToData } from './js/verification'
import { selectComp } from './js/methods' import { selectComp } from './js/methods'
import getAreaName from '@/assets/js/utils/getAreaNameForSale' import getAreaName from '@/assets/js/utils/getAreaNameForSale'
import { getOrderDetail } from '@/api/ebiz/sale/sale'
let relationToInsured = [ let relationToInsured = [
{ id: 2, text: '配偶' }, { id: 2, text: '配偶' },
{ id: 3, text: '父母' }, { id: 3, text: '父母' },
@@ -269,6 +271,7 @@ export default {
}, },
data() { data() {
return { return {
appntDateLabel:'', //订单创建时间
nameLimit: false, nameLimit: false,
idNoLimit: false, idNoLimit: false,
birthdayLimit: false, birthdayLimit: false,
@@ -356,6 +359,17 @@ export default {
} else { } else {
this.Insured = false this.Insured = false
} }
const orderNo = this.$CacheUtils.getLocItem('orderNo')
if (orderNo) {
getOrderDetail({ orderNo: orderNo }).then((res) => {
if (res.result == 0) {
// 获取订单创建时间
this.appntDateLabel = res.orderDTO.orderInfoDTO.appntDateLabel
} else {
return this.$toast(res.resultMessage)
}
})
}
}, },
methods: { methods: {
setCustomerMarriage(marriageCode) { setCustomerMarriage(marriageCode) {
@@ -494,6 +508,11 @@ export default {
console.log('123') console.log('123')
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
}else if (value.id == '2') {
//证件类型户口本时,证件截止日期和是否长期不可选择
this.idLimit = true
this.effectiveDateTypeAble = true
this.userInfo.effectiveDateType = false
} }
// else if (value.id == 2 || value.id == 3) { // else if (value.id == 2 || value.id == 3) {
// this.effectiveDateTypeAble = true // this.effectiveDateTypeAble = true
@@ -1063,7 +1082,7 @@ export default {
return `${year}-${month}-${day}` return `${year}-${month}-${day}`
}, },
getRelatedData(val, from) { getRelatedData(val, from) {
if (this.userInfo.idType != '1') { if (this.userInfo.idType != '1' && this.userInfo.idType != '2') {
return return
} }
//如果证件校验不通过,恢复默认值 //如果证件校验不通过,恢复默认值
@@ -1074,6 +1093,7 @@ export default {
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.certiexpiredate = Number(this.appntDateLabel.substr(0,4))+16+'-'+ this.userInfo.birthday.substr(5,5)
this.userInfo.sex = idToData(val).sex this.userInfo.sex = idToData(val).sex
if (idToData(val).age > 45) { if (idToData(val).age > 45) {
if (from) { if (from) {

View File

@@ -484,6 +484,7 @@ export default {
}, },
data() { data() {
return { return {
appntDateLabel:'', //订单创建时间
isMarriageStatusShow: false, isMarriageStatusShow: false,
withRootUser: { withRootUser: {
load: false, //防止重复请求 load: false, //防止重复请求
@@ -614,6 +615,8 @@ export default {
if (orderNo) { if (orderNo) {
getOrderDetail({ orderNo: orderNo }).then((res) => { getOrderDetail({ orderNo: orderNo }).then((res) => {
if (res.result == 0) { if (res.result == 0) {
// 获取订单创建时间
this.appntDateLabel = res.orderDTO.orderInfoDTO.appntDateLabel
//投被同人 //投被同人
if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') { if (res.orderDTO.insuredDTOs.length && res.orderDTO.insuredDTOs[0].relationToAppnt == '1') {
this.$nextTick(() => { this.$nextTick(() => {
@@ -874,7 +877,16 @@ export default {
this.userInfo.sex = '0' this.userInfo.sex = '0'
} }
} }
} else if (value.id == 2 || value.id == 3) { } else if (value.id == 2) {
//证件类型户口本时,证件截止日期和是否长期不可选择
this.idLimit = true
this.effectiveDateTypeAble = true
this.userInfo.effectiveDateType = false
// this.userInfo.effectiveDateType = true
// this.effectiveDateTypeAble = true
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
} else if (value.id == 3) {
this.userInfo.effectiveDateType = true this.userInfo.effectiveDateType = true
// this.effectiveDateTypeAble = true // this.effectiveDateTypeAble = true
this.userInfo.certiexpiredate = '' this.userInfo.certiexpiredate = ''
@@ -1747,7 +1759,7 @@ export default {
}, },
getRelatedData(val, from) { getRelatedData(val, from) {
// debugger // debugger
if (this.userInfo.idType != '1') { if (this.userInfo.idType != '1' && this.userInfo.idType != '2') {
return return
} }
// if (!['1', '2', '3', 1, 2, 3].includes(this.userInfo.idType)) { // if (!['1', '2', '3', 1, 2, 3].includes(this.userInfo.idType)) {
@@ -1761,6 +1773,7 @@ export default {
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.certiexpiredate = Number(this.appntDateLabel.substr(0,4))+16+'-'+ this.userInfo.birthday.substr(5,5)
this.userInfo.sex = idToData(val).sex this.userInfo.sex = idToData(val).sex
//年龄小于18周岁工作单位默认值为 //年龄小于18周岁工作单位默认值为
if (idToData(val).age < 18) { if (idToData(val).age < 18) {