diff --git a/src/assets/js/utils/data-dictionary.js b/src/assets/js/utils/data-dictionary.js index 331c084d1..650e7d6b7 100644 --- a/src/assets/js/utils/data-dictionary.js +++ b/src/assets/js/utils/data-dictionary.js @@ -798,6 +798,11 @@ export default { shortName: '年金险', name: '国富人寿国富鑫享年金保险', code: 'GFRS_M0011' + }, + { + shortName: '重疾险', + name: '国富人寿孝心保老年特定疾病保险', + code: 'GFRS_M0014' } ], // 职级 @@ -1555,12 +1560,7 @@ export default { { id: 'TKM', text: '土库曼斯坦' }, { id: 'TMP', text: '东帝汶' } ], - agentGrade: [{ A101: '客户专员' }, - { A102: '客户经理' }, - { A201: '业务主任' }, - { A202: '高级主任' }, - { A301: '营业部经理' }, - { A401: '业务总监' }], + agentGrade: [{ A101: '客户专员' }, { A102: '客户经理' }, { A201: '业务主任' }, { A202: '高级主任' }, { A301: '营业部经理' }, { A401: '业务总监' }], //入司籍贯、户口所在地 rsnativePlace: [ { id: '01', text: '北京市' }, diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 23539f66f..f2681077f 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -47,7 +47,7 @@ :show-plus="false" :show-minus="false" class="ml30" - @change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex, (riskFactor.minAmt || riskFactor.minPrem), (riskFactor.maxAmt || riskFactor.maxPrem) )" + @change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex, (riskFactor.minAmt || riskFactor.minPrem), (riskFactor.maxAmt || riskFactor.maxPrem),riskFactor )" input-width="100" :integer="false" /> @@ -779,22 +779,67 @@ export default { }) }, //保额份数变化 - stepperChange(defalutValue, productIndex, calFactorIndex, min, max) { + stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) { console.log(defalutValue, productIndex, calFactorIndex, min, max) + console.log(this.saleInsuredPersonInfo.age) + console.log(riskFactor) + console.log(JSON.parse(localStorage.trialList)[0].productCode) // debugger let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex] - if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) { - this.$toast(localStorage.hint) - this.nextStepFlag = true + + //改动原因:孝心保产品有对年龄的特殊要求 + //添加判断,是否是孝心保产品 + if (JSON.parse(localStorage.trialList)[0].productCode == 'GFRS_M0014') { + //被保人年龄如果在50-65区间 + if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) { + //使用rules规则里的第二条控制保额份数 + if (Number(this.defalutAmt) < Number(riskFactor.rules[1].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[1].maxPrem)) { + this.$toast(localStorage.hint) + this.nextStepFlag = true + } else { + if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // this.defalutAmt = currentEle.rules[productIndex].displayAmount + this.$toast(localStorage.hint) + this.nextStepFlag = true + } else { + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + this.getTrial() + } + } + //被保人年龄如果在66-75之间 + } else if (this.saleInsuredPersonInfo.age >= 66 && this.saleInsuredPersonInfo.age <= 75) { + //使用rules规则里的第一条控制保额份数 + if (Number(this.defalutAmt) < Number(riskFactor.rules[0].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[0].maxPrem)) { + this.$toast(localStorage.hint) + this.nextStepFlag = true + } else { + if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // this.defalutAmt = currentEle.rules[productIndex].displayAmount + this.$toast(localStorage.hint) + this.nextStepFlag = true + } else { + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + this.getTrial() + } + } + } + //其他产品按照原先的逻辑判断 } else { - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { - // this.defalutAmt = currentEle.rules[productIndex].displayAmount + if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) { this.$toast(localStorage.hint) this.nextStepFlag = true } else { - this.mainRiskInfluenceAddRisk() - currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - this.getTrial() + if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { + // this.defalutAmt = currentEle.rules[productIndex].displayAmount + this.$toast(localStorage.hint) + this.nextStepFlag = true + } else { + this.mainRiskInfluenceAddRisk() + currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) + this.getTrial() + } } } // let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex]