【国富人寿】保费试算页面代码回归记录

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-05-19 09:17:04 +08:00
parent 42146430d0
commit e1d854a2d1

View File

@@ -691,21 +691,12 @@
//构建提交数据、渲染险种 //构建提交数据、渲染险种
if(this.$route.query.insuanceId && this.isFrom == 'proposal'){ if(this.$route.query.insuanceId && this.isFrom == 'proposal'){
// 获取试算记录详情 // 获取试算记录详情
let serialNo = ''
if (this.$route.query.orderNo) {
serialNo = this.$route.query.orderNo
}
if (this.$route.query.proposalOrderNo) {
serialNo = this.$route.query.proposalOrderNo
}
await getTrialRecordInfo({ await getTrialRecordInfo({
serialNo:serialNo, serialNo:this.$CacheUtils.getLocItem('proposalNo'),
mainRiskId:this.$route.query.insuanceId mainRiskId:this.$route.query.insuanceId
}).then(res => { }).then(res => {
if (res.result == '0') { if (res.result == '0') {
this.chooseProducts = JSON.parse(res.content.trialJsonStr) this.chooseProducts = JSON.parse(res.content.trialJsonStr)
} else {
this.$toast(res.resultMessage)
} }
}) })
}else{ }else{
@@ -1939,6 +1930,7 @@
if ( if (
this.chooseProducts[0].mainRiskCode == 'GFRS_M0051' || this.chooseProducts[0].mainRiskCode == 'GFRS_M0051' ||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0044' || this.chooseProducts[0].mainRiskCode == 'GFRS_M0044' ||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0060' ||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0035' || this.chooseProducts[0].mainRiskCode == 'GFRS_M0035' ||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0038' || this.chooseProducts[0].mainRiskCode == 'GFRS_M0038' ||
this.chooseProducts[0].mainRiskCode == 'GFRS_M0040' this.chooseProducts[0].mainRiskCode == 'GFRS_M0040'
@@ -2352,6 +2344,7 @@
}) })
localStorage.addRiskCodes = JSON.stringify(addRiskCodes) localStorage.addRiskCodes = JSON.stringify(addRiskCodes)
// this.$router.push({ path: '/common/addRiskList' })
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
@@ -2374,7 +2367,7 @@
let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode
if (productCode == 'GFRS_M0014') { if (productCode == 'GFRS_M0014') {
//被保险人年龄如果在50-65区间 //被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) { if (this.saleInsuredPersonInfo.insuredAge >= 50 && this.saleInsuredPersonInfo.insuredAge <= 65) {
//使用rules规则里的第二条控制保额份数 //使用rules规则里的第二条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast(showHint) this.$toast(showHint)
@@ -2391,7 +2384,7 @@
} }
} }
//被保险人年龄如果在66-75之间 //被保险人年龄如果在66-75之间
} else if (this.saleInsuredPersonInfo.age >= 66 && this.saleInsuredPersonInfo.age <= 75) { } else if (this.saleInsuredPersonInfo.insuredAge >= 66 && this.saleInsuredPersonInfo.insuredAge <= 75) {
//使用rules规则里的第一条控制保额份数 //使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast(showHint) this.$toast(showHint)
@@ -2410,22 +2403,22 @@
} }
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验 //isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
} else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044' } else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044'
|| productCode == 'GFRS_M0056' || productCode == 'GFRS_M0057') { || productCode == 'GFRS_M0056' || productCode == 'GFRS_M0057' || productCode == 'GFRS_M0060') {
console.log('defalutValue==', defalutValue) console.log('defalutValue==', defalutValue)
console.log("currentEle['amt']==", currentEle['amt']) console.log("currentEle['amt']==", currentEle['amt'])
console.log('riskFactor.rules', riskFactor.rules) console.log('riskFactor.rules', riskFactor.rules)
console.log('this.saleInsuredPersonInfo.age ', this.saleInsuredPersonInfo.age) console.log('this.saleInsuredPersonInfo.insuredAge ', this.saleInsuredPersonInfo.insuredAge)
//被保险人年龄如果在50-65区间 //被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.age >= 56 && this.saleInsuredPersonInfo.age <= 60) { if (this.saleInsuredPersonInfo.insuredAge >= 56 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数 //使用rules规则里的第二条控制保额份数
// 年龄在56周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。 // 年龄在56周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为10000元整数倍。') this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true this.nextStepFlag = true
} else { } else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount // this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为10000元整数倍。') this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true this.nextStepFlag = true
} else { } else {
this.mainRiskInfluenceAddRisk() this.mainRiskInfluenceAddRisk()
@@ -2434,15 +2427,15 @@
} }
} }
//年龄在0-55周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。 //年龄在0-55周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.age >= 0 && this.saleInsuredPersonInfo.age <= 55) { } else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 55) {
//使用rules规则里的第一条控制保额份数 //使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为10000元整数倍。') this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true this.nextStepFlag = true
} else { } else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) { if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount // this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为10000元整数倍。') this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true this.nextStepFlag = true
} else { } else {
this.mainRiskInfluenceAddRisk() this.mainRiskInfluenceAddRisk()
@@ -2455,7 +2448,7 @@
} else if (productCode == 'GFRS_M0040') { } else if (productCode == 'GFRS_M0040') {
// 惠企保保额限制 // 惠企保保额限制
//被保险人年龄如果在41-60区间 //被保险人年龄如果在41-60区间
if (this.saleInsuredPersonInfo.age >= 41) { if (this.saleInsuredPersonInfo.insuredAge >= 41) {
//使用rules规则里的第二条控制保额份数 //使用rules规则里的第二条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast('年龄在41周岁至60周岁被保险人投保本险种时最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。') this.$toast('年龄在41周岁至60周岁被保险人投保本险种时最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
@@ -2471,7 +2464,7 @@
this.getTrial() this.getTrial()
} }
} }
} else if (this.saleInsuredPersonInfo.age >= 0 && this.saleInsuredPersonInfo.age <= 40) { } else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 40) {
//使用rules规则里的第一条控制保额份数 //使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast('年龄在0-40周岁被保险人投保本险种时最低基本保险金额为100000元超过最低基本保险金额为10000元整数倍。') this.$toast('年龄在0-40周岁被保险人投保本险种时最低基本保险金额为100000元超过最低基本保险金额为10000元整数倍。')
@@ -2492,7 +2485,7 @@
} else if (productCode == 'GFRS_M0046') { } else if (productCode == 'GFRS_M0046') {
//被保险人年龄如果在50-65区间 //被保险人年龄如果在50-65区间
if(this.branchTypeVal == 'Z'){ //中介渠道规则 if(this.branchTypeVal == 'Z'){ //中介渠道规则
if (this.saleInsuredPersonInfo.age >= 51 && this.saleInsuredPersonInfo.age <= 60) { if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数 //使用rules规则里的第二条控制保额份数
// 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。 // 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
@@ -2510,7 +2503,7 @@
} }
} }
//年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。 //年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.age >= 0 && this.saleInsuredPersonInfo.age <= 50) { } else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 50) {
//使用rules规则里的第一条控制保额份数 //使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。') this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
@@ -2528,7 +2521,7 @@
} }
}else if(this.branchTypeVal == 'G' || this.branchTypeVal == 'T'|| this.branchTypeVal == 'Y' ){ //世纪无忧中介渠道规则(银销个,健销个投保规则同个险规则) }else if(this.branchTypeVal == 'G' || this.branchTypeVal == 'T'|| this.branchTypeVal == 'Y' ){ //世纪无忧中介渠道规则(银销个,健销个投保规则同个险规则)
//被保险人年龄如果在50-65区间 //被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.age >= 56 && this.saleInsuredPersonInfo.age <= 60) { if (this.saleInsuredPersonInfo.insuredAge >= 56 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数 //使用rules规则里的第二条控制保额份数
// 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。 // 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
@@ -2546,7 +2539,7 @@
} }
} }
//年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。 //年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.age >= 0 && this.saleInsuredPersonInfo.age <= 55) { } else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 55) {
//使用rules规则里的第一条控制保额份数 //使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) { if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。') this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
@@ -2566,9 +2559,6 @@
// 国富人寿富桂金生养老年金保险GFRS_M0053中介渠道鑫享金生养老年金保险GFRS_M0061 // 国富人寿富桂金生养老年金保险GFRS_M0053中介渠道鑫享金生养老年金保险GFRS_M0061
} else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') { } else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') {
if (Number(defalutValue) < Number(min)) { if (Number(defalutValue) < Number(min)) {
if (riskFactor.yearWay == "一次性交清") {
this.$toast(`交费期间为${riskFactor.yearWay}时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
} else {
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`) this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
} }
this.nextStepFlag = true this.nextStepFlag = true
@@ -2889,6 +2879,35 @@
this.saleInsuredPersonInfo.insuredId = resultData.content.id; this.saleInsuredPersonInfo.insuredId = resultData.content.id;
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(this.saleInsuredPersonInfo)) this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(this.saleInsuredPersonInfo))
} }
//试算记录保存更新--编辑
this.saveOrUpdateTrialRecordInfoFunc(resultData.content.riskDTO)
}else if (isFrom == 'orderTrial' && localStorage.isFrom == 'sale') {
this.$toast.clear()
this.trialResultsShow = true
this.verifyResultList = resultData.content.data.verifyResultList
}
} else {
this.$toast(resultData.resultMessage)
}
},
//建议书试算记录保存更新--编辑功能
saveOrUpdateTrialRecordInfoFunc(riskDTO){
let insuanceId
riskDTO.forEach(item => {
if (item.isMainRisk == '0') {
insuanceId = item.insuanceId
}
})
let data ={
serialNo:this.$CacheUtils.getLocItem('proposalNo'),
mainRiskId:insuanceId+'',
trialJsonStr:localStorage.chooseProducts
}
saveOrUpdateTrialRecordInfo(data).then(res => {
if (res.result == '0') {
//被保人产品列表界面 点击编辑按钮进入产品试算界面 点击完成 页面跳转不正确
let proposalOrderNo = this.$route.query.orderNo || ''
let url = `/common/selectedProduct?proposalOrderNo=${proposalOrderNo}`
this.$jump({ this.$jump({
flag: 'goBack', flag: 'goBack',
extra: { extra: {