From 42c98518a7c2b83c0ff1e100e5a300d9de8c1058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9A=AE=E4=BC=9F?= Date: Sat, 21 Dec 2019 18:37:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90IMP=E3=80=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BF=9D=E8=B4=B9=E8=AF=95=E7=AE=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/common/CalculatePremium.vue | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) 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() {