feat: 处理国富人寿鑫盈嘉两全保险(分红型)交费方式和交费期间关联关系

This commit is contained in:
zhang.weiwei
2025-08-28 01:08:13 +08:00
parent c6f4bf5d62
commit c7f847288e

View File

@@ -841,14 +841,17 @@ export default {
this.isEnterAddtionRiskListFunc() this.isEnterAddtionRiskListFunc()
} }
} }
if (item.mainRiskCode == 'GFRS_M0083' || item.mainRiskCode == 'GFRS_M0098' || item.mainRiskCode == 'GFRS_M0103'|| item.mainRiskCode == 'GFRS_M0085') { if (item.mainRiskCode == 'GFRS_M0083' || item.mainRiskCode == 'GFRS_M0098' || item.mainRiskCode == 'GFRS_M0103' || item.mainRiskCode == 'GFRS_M0085') {
this.disabledShow = true this.disabledShow = true
} }
if (item.hasPredictTransferPrem == '1') { if (item.hasPredictTransferPrem == '1') {
this.disabledShow = false this.disabledShow = false
} }
if ((item.mainRiskCode == 'GFRS_M0083' || item.mainRiskCode == 'GFRS_M0098' || item.mainRiskCode == 'GFRS_M0103'|| item.mainRiskCode == 'GFRS_M0085') && this.isFrom == 'proposal') { if (
(item.mainRiskCode == 'GFRS_M0083' || item.mainRiskCode == 'GFRS_M0098' || item.mainRiskCode == 'GFRS_M0103' || item.mainRiskCode == 'GFRS_M0085') &&
this.isFrom == 'proposal'
) {
item.calFactorLst.forEach((i) => { item.calFactorLst.forEach((i) => {
if (i.code == 'inputPrem') { if (i.code == 'inputPrem') {
i.minPrem = 0.01 i.minPrem = 0.01
@@ -962,10 +965,14 @@ export default {
} }
//键盘小数点无法输入试了一下iOS16以下没这个问题iOS16以上有这个问题 type="number"改成type="digit"就可以输入了, //键盘小数点无法输入试了一下iOS16以下没这个问题iOS16以上有这个问题 type="number"改成type="digit"就可以输入了,
this.$nextTick(() => { this.$nextTick(() => {
var div1 = document.getElementsByClassName('van-stepper__input') try {
//拿到的是一个数组集合,遍历修改每一个input var div1 = document.getElementsByClassName('van-stepper__input')
for (var x in div1) { //拿到的是一个数组集合遍历修改每一个input
div1[x].setAttribute('type', 'digit') for (var x in div1) {
div1[x].setAttribute('type', 'digit')
}
} catch (e) {
console.error(e)
} }
}) })
}, },
@@ -1096,10 +1103,11 @@ export default {
} }
}, },
//弹框选择 //弹框选择
toSelect(index, index1, columns) { toSelect(productIndex, factorIndex, columns) {
this.columns = [] this.columns = []
;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, index, index1] ;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, productIndex, factorIndex]
let currentFactor = this.chooseProducts[this.productIndex].calFactorLst let currentProduct = this.chooseProducts[productIndex]
let currentFactor = currentProduct.calFactorLst
let currentEle = currentFactor[this.calFactorIndex] let currentEle = currentFactor[this.calFactorIndex]
let sex = this.saleInsuredPersonInfo.sex //0男 1女 let sex = this.saleInsuredPersonInfo.sex //0男 1女
//性别男女,养老保险金领取年龄不一致 //性别男女,养老保险金领取年龄不一致
@@ -1109,9 +1117,37 @@ export default {
this.columns.push(item) this.columns.push(item)
} }
}) })
} else { return
this.columns = columns
} }
if (currentProduct.mainRiskCode === 'GFRS_M0111') {
// 国富人寿鑫盈嘉两全保险(分红型) 交费期间payEndYear: 1次交清和3年交 保险期间insuYear: 5年和6年
// 现要求payEndYear选择一次交清insuYear只能选5年payEndYear选择3年交payEndYear只能选6年保险期间
if (currentEle.code == 'insuYear') {
let payEndYearFactor = currentFactor.find((factor) => factor.code == 'payEndYear')
if (!payEndYearFactor) {
return
}
let payEndYear = payEndYearFactor.showContent
if (!payEndYear) {
// 保险期间未选择, 提示选择
this.$toast(`请先选择${payEndYearFactor.name}`)
return
}
let payEndYearOption = payEndYearFactor.columns.find((item) => item.text == payEndYear)
let payEndYearVal = payEndYearOption.value
console.log('payEndYearVal--->', payEndYearVal, columns)
// 如果有值,则需约定可选择项
if (payEndYearVal) {
columns.forEach((item) => {
if ((payEndYearVal == '1000' && item.value == '5') || (payEndYearVal == '3' && item.value == '6')) {
this.columns.push(item)
}
})
}
return
}
}
this.columns = columns
}, },
//取消picker //取消picker
onCancel() { onCancel() {
@@ -1127,7 +1163,7 @@ export default {
let currentEle = currentFactor[this.calFactorIndex] let currentEle = currentFactor[this.calFactorIndex]
if (currentEle.code == 'insuYear') { if (currentEle.code == 'insuYear') {
if (value.value == '70') { if (value.value == '70') {
this.chooseProducts.forEach((item, index) => { this.chooseProducts.forEach((item) => {
if (item.mainRiskCode == 'GFRS_M0086') { if (item.mainRiskCode == 'GFRS_M0086') {
item.calFactorLst.forEach((i) => { item.calFactorLst.forEach((i) => {
if (i.code == 'inputAmt') { if (i.code == 'inputAmt') {
@@ -1139,7 +1175,7 @@ export default {
} }
}) })
} else if (value.value == '106') { } else if (value.value == '106') {
this.chooseProducts.forEach((item, index) => { this.chooseProducts.forEach((item) => {
if (item.mainRiskCode == 'GFRS_M0086') { if (item.mainRiskCode == 'GFRS_M0086') {
item.calFactorLst.forEach((i) => { item.calFactorLst.forEach((i) => {
if (i.code == 'inputAmt') { if (i.code == 'inputAmt') {
@@ -1152,17 +1188,24 @@ export default {
}) })
} }
} }
// let sex = this.saleInsuredPersonInfo.sex //0男 1女
// //特殊设置:如果需要填写的保费/保额校验规则跟缴费期间挂钩当改变缴费期间时将输入框的值恢复默认值1 if (this.chooseProducts[this.productIndex].mainRiskCode === 'GFRS_M0111') {
// if (currentEle.code == 'payEndYear' && this.isTrial == '0') { // 国富人寿鑫盈嘉两全保险(分红型) 交费期间payEndYear: 1次交清和3年交 保险期间insuYear: 5年和6年
// currentEle['columns'].forEach((item, index) => { // 现要求payEndYear选择一次交清insuYear只能选5年payEndYear选择3年交payEndYear只能选6年保险期间
// if (item.value == value.value) { if (currentEle.code == 'payEndYear') {
// this.payEndYearColumnsIndex = index // 获取当前的值
// } let payEndYear = value.value
// }) console.log('payEndYear--->', payEndYear)
// this.defalutAmt = 1 const insuYearFactor = currentFactor.find((factor) => factor.code == 'insuYear')
// } if (insuYearFactor) {
console.log('insuYearFactor--->', insuYearFactor)
let matchInsureYearValue = payEndYear == '1000' ? '5' : payEndYear == '3' ? '6' : null
let matchedOption = insuYearFactor.columns.find((item) => item.value == matchInsureYearValue)
insuYearFactor.showContent = matchedOption ? matchedOption.text : ''
insuYearFactor['insuYear'] = matchedOption ? matchedOption.value : ''
}
}
}
//中介渠道交费期间为一次性交清时附加险GFRS_A0007GFRS_A0009GFRS_A0010去掉后附加险list就为空--隐藏icon //中介渠道交费期间为一次性交清时附加险GFRS_A0007GFRS_A0009GFRS_A0010去掉后附加险list就为空--隐藏icon
if (currentEle.code == 'payEndYear' && value.value == '1000') { if (currentEle.code == 'payEndYear' && value.value == '1000') {
this.isEnterAddtionRiskListFunc() this.isEnterAddtionRiskListFunc()
@@ -1175,7 +1218,6 @@ export default {
} else { } else {
this.isEnterAddtionRisk = true this.isEnterAddtionRisk = true
} }
if (currentEle.showContent != value.text) { if (currentEle.showContent != value.text) {
//通用规则校验 //通用规则校验
if (await this.payExceedInsured(currentEle, currentFactor, value.value)) { if (await this.payExceedInsured(currentEle, currentFactor, value.value)) {
@@ -1201,18 +1243,9 @@ export default {
}) })
this.defalutAmt = 1 this.defalutAmt = 1
} }
// if(this.ruleExpression[productCode]){
// this.errorMsg = []
// this.ruleExpression[productCode].eventList.forEach(item => {
// this.$emit(item,currentFactor,currentEle.code,value);
// })
// if(this.errorMsg.length > 0){
// this.$toast(this.errorMsg[0]);
// this.popupShow = false
// return false
// }
// }
let productCode = this.chooseProducts[this.productIndex].productCode let productCode = this.chooseProducts[this.productIndex].productCode
if (this.ruleExpression[productCode]) { if (this.ruleExpression[productCode]) {
this.errorMsg = [] this.errorMsg = []
let currentFactor = this.chooseProducts[this.productIndex].calFactorLst let currentFactor = this.chooseProducts[this.productIndex].calFactorLst
@@ -1756,10 +1789,22 @@ export default {
} }
}) })
this.chooseProducts.forEach((item, index) => { this.chooseProducts.forEach((item, index) => {
if (item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0013' || item.productCode == 'GFRS_A0014' || item.productCode == 'GFRS_A0015' || item.productCode == 'GFRS_A0016') { if (
item.productCode == 'GFRS_A0010' ||
item.productCode == 'GFRS_A0009' ||
item.productCode == 'GFRS_A0013' ||
item.productCode == 'GFRS_A0014' ||
item.productCode == 'GFRS_A0015' ||
item.productCode == 'GFRS_A0016'
) {
//(投保人)国富人寿附加豁免保险费重大疾病保险(B款 //(投保人)国富人寿附加豁免保险费重大疾病保险(B款
// 投被不同人:投保人豁免险单独搭配主险时,投保人豁免险,豁免主险保费,当投保人豁免险加两全(有长险附加险时),豁免主险保费加两全保费 // 投被不同人:投保人豁免险单独搭配主险时,投保人豁免险,豁免主险保费,当投保人豁免险加两全(有长险附加险时),豁免主险保费加两全保费
if (item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0013' || item.productCode == 'GFRS_A0015' || item.productCode == 'GFRS_A0016') { if (
item.productCode == 'GFRS_A0009' ||
item.productCode == 'GFRS_A0013' ||
item.productCode == 'GFRS_A0015' ||
item.productCode == 'GFRS_A0016'
) {
if (this.saleInsuredPersonInfo.relationToAppnt != 1) { if (this.saleInsuredPersonInfo.relationToAppnt != 1) {
//不同人 //不同人
if (showPrem001) { if (showPrem001) {
@@ -2182,14 +2227,14 @@ export default {
let thisproductInfo = JSON.parse(window.localStorage.getItem('chooseProducts')) let thisproductInfo = JSON.parse(window.localStorage.getItem('chooseProducts'))
if (thisproductInfo && thisproductInfo.length != 0) { if (thisproductInfo && thisproductInfo.length != 0) {
thisproductInfo.forEach((item) => { thisproductInfo.forEach((item) => {
if (item.productCode == 'GFRS_M0083' || item.productCode == 'GFRS_M0098' || item.productCode == 'GFRS_M0103'|| item.productCode == 'GFRS_M0085') { if (item.productCode == 'GFRS_M0083' || item.productCode == 'GFRS_M0098' || item.productCode == 'GFRS_M0103' || item.productCode == 'GFRS_M0085') {
productCode = item.productCode productCode = item.productCode
hasPredictTransferPrem = item.hasPredictTransferPrem hasPredictTransferPrem = item.hasPredictTransferPrem
} }
}) })
} }
if (this.isFrom != 'proposal') { if (this.isFrom != 'proposal') {
if (productCode == 'GFRS_M0083' || productCode == 'GFRS_M0098' || productCode == 'GFRS_M0103'|| productCode == 'GFRS_M0085') { if (productCode == 'GFRS_M0083' || productCode == 'GFRS_M0098' || productCode == 'GFRS_M0103' || productCode == 'GFRS_M0085') {
if (!that.policyNo) { if (!that.policyNo) {
this.disabledShow = true this.disabledShow = true
that.chooseProducts.forEach((item) => { that.chooseProducts.forEach((item) => {
@@ -2390,14 +2435,13 @@ export default {
trialFlag = false trialFlag = false
} }
} }
}else if (item.productCode == 'GFRS_M0101' || item.productCode == 'GFRS_M0102') { } else if (item.productCode == 'GFRS_M0101' || item.productCode == 'GFRS_M0102') {
// 当投保人年龄≥75周岁时需转人工核保。核心提示语投保人年龄≥75周岁。前端提示语为投保人年龄≥75周岁需进一步人工审核 // 当投保人年龄≥75周岁时需转人工核保。核心提示语投保人年龄≥75周岁。前端提示语为投保人年龄≥75周岁需进一步人工审核
let appntAge = this.saleInsuredInfo.age let appntAge = this.saleInsuredInfo.age
if (appntAge>=75){ if (appntAge >= 75) {
this.nextStepFlag = true this.nextStepFlag = true
this.$toast('投保人年龄≥75周岁需进一步人工审核') this.$toast('投保人年龄≥75周岁需进一步人工审核')
} }
} }
}) })
if (!trialFlag) { if (!trialFlag) {
@@ -2974,7 +3018,7 @@ export default {
} }
} }
} }
} else if (productCode == 'GFRS_M0083' || productCode == 'GFRS_M0098' || productCode == 'GFRS_M0103'|| productCode == 'GFRS_M0085') { } else if (productCode == 'GFRS_M0083' || productCode == 'GFRS_M0098' || productCode == 'GFRS_M0103' || productCode == 'GFRS_M0085') {
if (this.isFrom != 'proposal') { if (this.isFrom != 'proposal') {
if (!this.policyNo && defalutValue < 5) { if (!this.policyNo && defalutValue < 5) {
this.$toast('单独投保保费为大于等于50000元') this.$toast('单独投保保费为大于等于50000元')
@@ -3097,7 +3141,7 @@ export default {
return this.$toast('关联保单的格式不正确') return this.$toast('关联保单的格式不正确')
} }
} }
this.$CacheUtils.setLocItem('associatedPolicyNo',this.policyNo || null) this.$CacheUtils.setLocItem('associatedPolicyNo', this.policyNo || null)
//组装险种提交数据 //组装险种提交数据
let [mainRiskCode, riskDTOLst] = ['', []] let [mainRiskCode, riskDTOLst] = ['', []]
let rollInResult = '' //校验预计转入保费结果 let rollInResult = '' //校验预计转入保费结果