国富人寿附加住院医疗保险(B款): 产品上线代码调整 --提交人:阳华祥

This commit is contained in:
yang.huaxiang
2020-12-17 10:18:36 +08:00
parent c9fb51647d
commit 46763c48fe
2 changed files with 70 additions and 4 deletions

View File

@@ -339,6 +339,20 @@ const dutyGFRS_A0004Rules = {
msg: '恶性肿瘤提示:投保可选责任时,可选责任最低投保 50 元,且应为 10 元的整数倍'
}
}
const dutyGFRS_A0008Rules = {
320205: {
mainRisk: 'GFRS_M0005',
msg: '住院医疗提示金额只能是0.5、1、1.5、2',
msg_1: '附加到国富人寿国富民惠医疗保险2020版最高基本保额不超过1万元。',
msg_2: '住院医疗提示金额只能是0.5、1'
},
320206: {
msg: '住院津贴提示:投保可选责任时,可选责任最低投保 50 元,且应为 10 元的整数倍'
},
320207: {
msg: '恶性肿瘤提示:投保可选责任时,可选责任最低投保 50 元,且应为 10 元的整数倍'
}
}
const DUTY_DEFAULT_MUTIPLE = 1000
const DUTY_DEFAULT_MIN = 10000
@@ -456,7 +470,7 @@ export default {
})
if (this.mainRiskCode == 'GFRS_M0005') {
this.chooseProducts.map(item => {
if (item.productCode == 'GFRS_A0004') {
if (item.productCode == 'GFRS_A0004' || item.productCode == 'GFRS_A0008') {
item.calFactorLst.map(item2 => {
if (item2.code == 'dutyGroup') {
item2.rules.map(item3 => {
@@ -606,7 +620,7 @@ export default {
const orderNo = localStorage.getItem('orderNo')
let detailPromise = this.isFrom === 'proposal' ? localStorage.proposalMedical : await getOrderDetail({ orderNo })
this.chooseProducts.map(item => {
if (!(item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0005')) {
if (!(item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005')) {
//其他产品删掉两个字段
let calFactorLst = item.calFactorLst
for (let i = calFactorLst.length - 1; i >= 0; i--) {
@@ -617,7 +631,7 @@ export default {
}
return
}
if (item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0005') {
if (item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005') {
let isMedical = null
if (this.isFrom === 'proposal') {
isMedical = detailPromise == '1'
@@ -660,6 +674,8 @@ export default {
if (this.chooseProducts[productIndex].productCode === 'GFRS_M0016') return
// 004险种其他验证方式
if (this.chooseProducts[productIndex].productCode === 'GFRS_A0004') return
// 008险种其他验证方式
if (this.chooseProducts[productIndex].productCode === 'GFRS_A0008') return
if (this.chooseProducts[productIndex].productCode === 'GFRS_A0003') {
this.getTrial()
return
@@ -813,6 +829,9 @@ export default {
} else if (validateRiskCode === 'GFRS_A0004' && !this.valiA0004Duty(inputValue, showHint, dutyItem)) {
//验证不通过 险种为GFRS_A0004 责任编码为320205
return
} else if (validateRiskCode === 'GFRS_A0008' && !this.valiA0008Duty(inputValue, showHint, dutyItem)) {
//验证不通过 险种为GFRS_A0008 责任编码为320205
return
} else {
this.mainRiskInfluenceAddRisk()
this.getTrial()
@@ -890,6 +909,48 @@ export default {
this.nextStepFlag = false
return true
},
//险种 GFRS_A0008 险种验证规则
valiA0008Duty(value, showHint, currentEle) {
/* if (!(currentEle.necess == true)) {
this.nextStepFlag = false
return true
}*/
// 验证其他 最小50 其他为50 10 倍数
if (currentEle.duty == '320206' || currentEle.duty == '320207') {
let numberValue = Number(value) * 10000
if (numberValue % 10 != 0 || numberValue < 50) {
this.$toast(dutyGFRS_A0008Rules[currentEle.duty].msg)
this.nextStepFlag = true
return false
}
}
// 保额只能为5000 10000 15000 200000
if (currentEle.duty == '320205') {
if (this.mainRiskCode === dutyGFRS_A0008Rules[currentEle.duty]['mainRisk']) {
if (!(value == '0.5' || value == '1')) {
this.$toast(dutyGFRS_A0008Rules[currentEle.duty].msg_2)
this.nextStepFlag = true
return false
} else if (value - 0 > 1) {
this.$toast(dutyGFRS_A0008Rules[currentEle.duty].msg_1)
this.nextStepFlag = true
return false
}
} else {
if (!(value == '0.5' || value == '1' || value == '1.5' || value == '2')) {
this.$toast(dutyGFRS_A0008Rules[currentEle.duty].msg)
this.nextStepFlag = true
return false
}
}
this.nextStepFlag = false
return true
}
this.nextStepFlag = false
return true
},
/********start 通用规则、特殊规则处理 start******/
//通用规则1交费方式为一次交情无交费期限
hiddenPayEndYear(currentEle) {
@@ -1497,7 +1558,7 @@ export default {
//GFRS_A0004需要验证责任
for (let m = 0; m < this.chooseProducts.length; m++) {
if (this.chooseProducts[m].productCode == 'GFRS_A0004') {
if (this.chooseProducts[m].productCode == 'GFRS_A0004' || this.chooseProducts[m].productCode == 'GFRS_A0008') {
let showHint = this.chooseProducts[m].hint
let calFactorLst = this.chooseProducts[m].calFactorLst
for (let i = 0; i < calFactorLst.length; i++) {