mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 20:26:44 +08:00
【中介渠道鑫享金生养老年金保险】被保人年龄小于30天未校验
This commit is contained in:
@@ -30,6 +30,30 @@ export default {
|
|||||||
return age
|
return age
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getAge29: function(value = '', today) {
|
||||||
|
// value: 身份证号码获取的生日, today: 当前的时间
|
||||||
|
var b = value.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/)
|
||||||
|
if (b == null) {
|
||||||
|
return null
|
||||||
|
} else {
|
||||||
|
var month = b[3] * 1
|
||||||
|
var day = b[4] * 1
|
||||||
|
var nowY = today.getFullYear()
|
||||||
|
var age = nowY - b[1]
|
||||||
|
if (today.getMonth() + 1 < month) {
|
||||||
|
age--
|
||||||
|
} else if (today.getMonth() + 1 == month && today.getDate() < day) {
|
||||||
|
age--
|
||||||
|
}
|
||||||
|
if (age < 1) {
|
||||||
|
var dayNum = this.getDateDiff(value, nowY + '-' + (today.getMonth() + 1) + '-' + today.getDate())
|
||||||
|
if (dayNum <= 29) {
|
||||||
|
age--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return age
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取得两个日期的时间差
|
* 取得两个日期的时间差
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (riskRules.ageLimit(resultData, this)) {
|
if (riskRules.ageLimit(resultData, this, null,riskProductCode)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { productCheck } from '@/api/ebiz/common/common'
|
import { productCheck } from '@/api/ebiz/common/common'
|
||||||
import { getCompany } from '@/api/ebiz/sale/sale'
|
import { getCompany } from '@/api/ebiz/sale/sale'
|
||||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||||
|
import utilsAge from '@/assets/js/utils/age'
|
||||||
import CacheUtils from '@/assets/js/utils/cacheUtils'
|
import CacheUtils from '@/assets/js/utils/cacheUtils'
|
||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||||
export default {
|
export default {
|
||||||
@@ -41,13 +42,17 @@ export default {
|
|||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
//投、被保险人年龄对险种的限制
|
//投、被保险人年龄对险种的限制
|
||||||
ageLimit(resultData, vm, isApplicant) {
|
ageLimit(resultData, vm, isApplicant,riskProductCode) {
|
||||||
let age, tips
|
let age, tips
|
||||||
if (isApplicant) {
|
if (isApplicant) {
|
||||||
age = this.getSaleInsuredInfo().age
|
age = this.getSaleInsuredInfo().age
|
||||||
tips = '投保人年龄不适合此款险种,请选择其他险种!'
|
tips = '投保人年龄不适合此款险种,请选择其他险种!'
|
||||||
} else {
|
} else {
|
||||||
age = this.getSaleInsuredPersonInfo().age
|
if(riskProductCode == 'GFRS_M0061'){
|
||||||
|
age = utilsAge.getAge29(this.getSaleInsuredPersonInfo().birthday, new Date())
|
||||||
|
}else{
|
||||||
|
age = this.getSaleInsuredPersonInfo().age
|
||||||
|
}
|
||||||
tips = '被保险人年龄不适合此款险种,请选择其他险种!'
|
tips = '被保险人年龄不适合此款险种,请选择其他险种!'
|
||||||
}
|
}
|
||||||
let minAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.minAge
|
let minAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.minAge
|
||||||
|
|||||||
Reference in New Issue
Block a user