diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 8335f0046..30144ce7a 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -32,7 +32,7 @@ :show-plus="false" :show-minus="false" class="ml30" - @change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex)" + @change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex, (riskFactor.minAmt || riskFactor.minPrem), (riskFactor.maxAmt || riskFactor.maxPrem) )" input-width="100" :integer="false" /> @@ -727,26 +727,29 @@ export default { }) }, //保额份数变化 - stepperChange(defalutValue, productIndex, calFactorIndex ) { + stepperChange(defalutValue, productIndex, calFactorIndex, min, max ) { // 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 + } 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() + } + } // let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex] // currentEle.defaultValue = value console.log('进来几次') this.mult = Number(this.defalutAmt) / Number(defalutValue) - let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex] - if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) { - Dialog.alert({ - message: localStorage.hint - }).then(() => { - // debugger - this.defalutAmt = currentEle.rules[productIndex].displayAmount - // this.nextStepFlag = true - }) - } else { - this.mainRiskInfluenceAddRisk() - currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit) - this.getTrial() - } + + }, //下一步 async nextStep() {