Compare commits

...

9 Commits

4 changed files with 262 additions and 204 deletions

View File

@@ -559,7 +559,7 @@ export default {
)
if (insuredDTO) {
let insuredPersonAge = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
let insuredPersonAge = utilsAge.getAge(insuredDTO.birthday, new Date())
CacheUtils.setLocItem('saleInsuredPersonInfo',
JSON.stringify({
birthday: insuredDTO.birthday,

View File

@@ -3777,6 +3777,22 @@ export default {
{
code: "GFRS_M0073__cashValue",
label: "元"
},
{
code: "currentBonus_L",
label: "元"
},
{
code: "currentBonus_M",
label: "元"
},
{
code: "riskAC_L",
label: "元"
},
{
code: "riskAC_M",
label: "元"
}
],
// 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件,

View File

@@ -353,8 +353,17 @@
<van-dialog v-model="trialResultsShow" title="核保试算结果" :show-cancel-button="false">
<div class="pl40 pr40 mt10">
<div class="flex justify-content-s fs12" v-for="(item, index) in verifyResultList" :key="index">
<div><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt=""><span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span></div>
<div><span class="v-middle">{{item.status | approvedFilter}}</span><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt=""></div>
<div>
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt="">
<span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span>
</div>
<div>
<!-- <span class="v-middle">{{item.status | approvedFilter}}</span>-->
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt="">
</div>
</div>
<div style="padding:25px 0px 10px 10px;font-size: 10px;color: #999;">
<p style="line-height: 20px;"><span style="width: 40px;display: inline-block;">说明:</span>绿色✔表示 未触发规则、红色×表示 触发规则</p>
</div>
</div>
</van-dialog>
@@ -367,6 +376,7 @@ import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sal
import { saveProposal, getTrialRecordInfo, saveOrUpdateTrialRecordInfo } from '@/api/ebiz/proposal/proposal.js'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
import occupationList from '@/components/ebiz/occipation/data/occupation'
import utilsAge from '@/assets/js/utils/age'
import riskRules from "./risk-rules";
//险种GFRS_M0016的责任的验证规则
@@ -654,7 +664,7 @@ export default {
//获取被保险人信息
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
this.saleInsuredPersonInfo.insuredAge = this.saleInsuredPersonInfo.insuredAge ? this.saleInsuredPersonInfo.insuredAge : this.saleInsuredPersonInfo.age
this.saleInsuredPersonInfo.insuredAge = utilsAge.getAge(this.saleInsuredPersonInfo.birthday, new Date())
if (this.isFrom == 'proposal' && !this.saleInsuredPersonInfo.name) {
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
let sex = this.saleInsuredPersonInfo.sex == '0'?'男':'女'
@@ -2338,7 +2348,7 @@ export default {
this.saleInsuredInfo.sex,
this.saleInsuredInfo.occupationCode,
this.saleInsuredInfo.occupationName,
this.saleInsuredInfo.insuredAge?this.saleInsuredInfo.insuredAge:this.saleInsuredInfo.age,
utilsAge.getAge(this.saleInsuredPersonInfo.birthday, new Date())
]
} else {
;[birthday, sex, occupationCode, occupationName, age] = [
@@ -2346,7 +2356,7 @@ export default {
this.saleInsuredPersonInfo.sex,
this.saleInsuredPersonInfo.occupationCode,
this.saleInsuredPersonInfo.occupationName,
this.saleInsuredPersonInfo.insuredAge?this.saleInsuredPersonInfo.insuredAge:this.saleInsuredPersonInfo.age
utilsAge.getAge(this.saleInsuredPersonInfo.birthday, new Date())
]
}
trialInfo = Object.assign(trialInfo, {
@@ -2404,25 +2414,161 @@ export default {
},
//保额份数变化
stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) {
let currentEle =
localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'
? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex]
: this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
//改动原因:孝心保产品有对年龄的特殊要求
//添加判断,是否是孝心保产品
let showHint = this.chooseProducts[productIndex].hint
let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode
if (productCode == 'GFRS_M0014') {
//被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.insuredAge >= 50 && this.saleInsuredPersonInfo.insuredAge <= 65) {
//使用rules规则里的第二条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
let currentEle = ''
let params = this.getParams()
if(localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'){
// params[productIndex].payEndYear == '1000' 交费期间为一次性交清
this.chooseProducts[productIndex].productTrialYearDTOS.forEach(item=>{
if(params.trialInfos[productIndex].payEndYear == '1000') {
if(item.yearWay == '一次性交清'){
currentEle = item
}
} else {
if(item.yearWay == params.trialInfos[productIndex].payEndYear){
currentEle = item
}
}
})
} else {
currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
}
//改动原因:孝心保产品有对年龄的特殊要求
//添加判断,是否是孝心保产品
let showHint = this.chooseProducts[productIndex].hint
let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode
if (productCode == 'GFRS_M0014') {
//被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.insuredAge >= 50 && this.saleInsuredPersonInfo.insuredAge <= 65) {
//使用rules规则里的第二条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast(showHint)
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(showHint)
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
//被保险人年龄如果在66-75之间
} else if (this.saleInsuredPersonInfo.insuredAge >= 66 && this.saleInsuredPersonInfo.insuredAge <= 75) {
//使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast(showHint)
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(showHint)
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
}
else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044'
|| productCode == 'GFRS_M0056' || productCode == 'GFRS_M0057' || productCode == 'GFRS_M0060') {
console.log('defalutValue==', defalutValue)
console.log("currentEle['amt']==", currentEle['amt'])
console.log('riskFactor.rules', riskFactor.rules)
console.log('this.saleInsuredPersonInfo.insuredAge ', this.saleInsuredPersonInfo.insuredAge)
//被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.insuredAge >= 56 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数
// 年龄在56周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
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) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
//年龄在0-55周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 55) {
//使用rules规则里的第一条控制保额份数
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.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
}
else if (productCode == 'GFRS_M0040') {
// 惠企保保额限制
//被保险人年龄如果在41-60区间
if (this.saleInsuredPersonInfo.insuredAge >= 41) {
//使用rules规则里的第二条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast('年龄在41周岁至60周岁被保险人投保本险种时最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('年龄在41周岁至60周岁被保险人投保本险种时最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 40) {
//使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast('年龄在0-40周岁被保险人投保本险种时最低基本保险金额为100000元超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('年龄在0-40周岁被保险人投保本险种时最低基本保险金额为100000元超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
}
else if (productCode == 'GFRS_M0046') {
//被保险人年龄如果在50-65区间
if(this.branchTypeVal == 'Z'){ //中介渠道规则
if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数
// 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(showHint)
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
@@ -2430,16 +2576,15 @@ export default {
this.getTrial()
}
}
//被保险人年龄如果在66-75之间
} else if (this.saleInsuredPersonInfo.insuredAge >= 66 && this.saleInsuredPersonInfo.insuredAge <= 75) {
//年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 50) {
//使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast(showHint)
this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(showHint)
this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
@@ -2448,17 +2593,11 @@ export default {
}
}
}
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
} else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044'
|| productCode == 'GFRS_M0056' || productCode == 'GFRS_M0057' || productCode == 'GFRS_M0060') {
console.log('defalutValue==', defalutValue)
console.log("currentEle['amt']==", currentEle['amt'])
console.log('riskFactor.rules', riskFactor.rules)
console.log('this.saleInsuredPersonInfo.insuredAge ', this.saleInsuredPersonInfo.insuredAge)
}else if(this.branchTypeVal == 'G' || this.branchTypeVal == 'T'|| this.branchTypeVal == 'Y' ){ //世纪无忧中介渠道规则(银销个,健销个投保规则同个险规则)
//被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.insuredAge >= 56 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数
// 年龄在56周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
// 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
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) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
@@ -2473,7 +2612,7 @@ export default {
this.getTrial()
}
}
//年龄在0-55周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
//年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 55) {
//使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
@@ -2481,7 +2620,6 @@ export default {
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
@@ -2491,190 +2629,83 @@ export default {
}
}
}
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
} else if (productCode == 'GFRS_M0040') {
// 惠企保保额限制
//被保险人年龄如果在41-60区间
if (this.saleInsuredPersonInfo.insuredAge >= 41) {
//使用rules规则里的第二条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast('年龄在41周岁至60周岁被保险人投保本险种时最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('年龄在41周岁至60周岁被保险人投保本险种时最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 40) {
//使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast('年龄在0-40周岁被保险人投保本险种时最低基本保险金额为100000元超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('年龄在0-40周岁被保险人投保本险种时最低基本保险金额为100000元超过最低基本保险金额为10000元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
// 国富人寿富桂金生养老年金保险GFRS_M0053中介渠道鑫享金生养老年金保险GFRS_M0061
}
else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') {
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)}元`)
}
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
} else if (productCode == 'GFRS_M0046') {
//被保险人年龄如果在50-65区间
if(this.branchTypeVal == 'Z'){ //中介渠道规则
if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数
// 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
//年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 50) {
//使用rules规则里的第一条控制保额份数
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.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
}else if(this.branchTypeVal == 'G' || this.branchTypeVal == 'T'|| this.branchTypeVal == 'Y' ){ //世纪无忧中介渠道规则(银销个,健销个投保规则同个险规则)
//被保险人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.insuredAge >= 56 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数
// 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
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) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
//年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 55) {
//使用rules规则里的第一条控制保额份数
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.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
this.nextStepFlag = true
}else{
this.nextStepFlag = false
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(riskFactor.moneyUnit)
this.getTrial()
}
}
else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
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)}元`)
}
// 国富人寿富桂金生养老年金保险GFRS_M0053中介渠道鑫享金生养老年金保险GFRS_M0061
} else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') {
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.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(`超过最低保费部分金额需为1000元整数倍`)
this.nextStepFlag = true
}else{
} else {
this.nextStepFlag = false
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(riskFactor.moneyUnit)
this.getTrial()
}
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
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.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(`超过最低保费部分金额需为1000元整数倍`)
this.nextStepFlag = true
} else {
this.nextStepFlag = false
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(riskFactor.moneyUnit)
this.getTrial()
}
}
//其他产品按照原先的逻辑判断
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '1') {
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
}
//其他产品按照原先的逻辑判断
}
else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '1') {
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
this.$toast('投保本险种最低基本保险金额为10000元超过最低基本保险金额为1000元整数倍')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// defalutValue = currentEle.rules[productIndex].displayAmount
this.$toast('投保本险种最低基本保险金额为10000元超过最低基本保险金额为1000元整数倍')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// defalutValue = currentEle.rules[productIndex].displayAmount
this.$toast('投保本险种最低基本保险金额为10000元超过最低基本保险金额为1000元整数倍')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
else {
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
this.$toast(showHint)
this.nextStepFlag = true
} else {
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// defalutValue = currentEle.rules[productIndex].displayAmount
this.$toast(showHint)
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// defalutValue = currentEle.rules[productIndex].displayAmount
this.$toast(showHint)
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
// let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex]
// defalutValue = value
console.log('进来几次')
this.mult = Math.ceil(Number(defalutValue) / Number(riskFactor.defaultValue))
},
}
// let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex]
// defalutValue = value
console.log('进来几次')
this.mult = Math.ceil(Number(defalutValue) / Number(riskFactor.defaultValue))
},
//下一步
async nextStep(isFrom) {
//GFRS_M0016需要验证责任
@@ -2845,7 +2876,7 @@ export default {
//建议书需要添加全部投保人信息电投只需要投保人ID
let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst })
if (!insuredDTOItem.insuredAge) {
insuredDTOItem.insuredAge = insuredDTOItem.age
insuredDTOItem.insuredAge = insuredDTOItem.birthday ? utilsAge.getAge(insuredDTOItem.birthday, new Date()) : insuredDTOItem.age
}
let orderNo = localStorage.isFrom == 'proposal'?this.$route.query.proposalOrderNo:this.$route.query.orderNo
let params = {
@@ -2956,7 +2987,7 @@ export default {
}
})
let data = {
serialNo:this.$CacheUtils.getLocItem('proposalNo'),
serialNo:this.$route.query.proposalOrderNo,
mainRiskId:insuanceId+'',
trialJsonStr:localStorage.chooseProducts
}

View File

@@ -199,7 +199,11 @@
<div class="text-left" style="width: 75%;">
<span>{{ moneyItem.contentLabel }}</span>
</div>
<div class="text-right">
<div class="text-right" v-if="moneyItem.content == 'currentBonus_M'">
<span class="color_3A81F6">{{ moneyItem.value | numFormat2 }}</span
>{{ moneyItem.content | productRateUnit }}
</div>
<div class="text-right" v-else>
<span class="color_3A81F6">{{ moneyItem.value | numFormatNo }}</span
>{{ moneyItem.content | productRateUnit }}
</div>
@@ -395,6 +399,13 @@ export default {
numFormat(str) {
return str.replace(/\.00/, '')
},
numFormat2(str) {
if (str) {
return Number(str.replace(/,/g, '')).toFixed(2)
} else {
return '-'
}
},
numFormatNo(str) {
if (str) {
return Number(str.replace(/,/g, '')).toFixed(0)