Merge branch 'dev_1220' into release/1226

# Conflicts:
#	src/views/ebiz/common/CalculatePremium.vue
#	src/views/ebiz/sale/AccountInformation.vue
#	src/views/ebiz/sale/SignatureConfirmation.vue
This commit is contained in:
皮伟
2019-12-25 13:55:11 +08:00
19 changed files with 1454 additions and 814 deletions

View File

@@ -21,16 +21,18 @@
<div v-if="item.isRemit == 1">
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
<div class="flex justify-content-s pv10 border-bottom" v-if="riskFactor.type == 1">
<div class="flex">
<div class="flex align-items-c">
<span v-if="riskFactor.suffix" class="fs14"> {{ riskFactor.name + '(' + riskFactor.suffix + ')' }} </span>
<span v-else class="fs14"> {{ riskFactor.name }} &nbsp;&nbsp; &nbsp;&nbsp;</span>
<!-- {{riskFactorIndex}} -->
<van-stepper
v-model="item.calFactorLst[riskFactorIndex].defaultValue"
v-model="defalutAmt"
:min="riskFactor.minAmt || riskFactor.minPrem"
:max="riskFactor.maxAmt || riskFactor.maxPrem"
class="ml10"
@change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex)"
:show-plus="false"
:show-minus="false"
class="ml30"
@change="stepperChange(item.calFactorLst[riskFactorIndex].defaultValue, index, riskFactorIndex, (riskFactor.minAmt || riskFactor.minPrem), (riskFactor.maxAmt || riskFactor.maxPrem) )"
input-width="100"
:integer="false"
/>
@@ -59,7 +61,9 @@
<van-stepper
v-model="dutyItem.defaultDutyAmt"
:min="dutyItem.minDutyAmt"
:max="dutyItem.maxDutyAmt"
:max=" dutyItem.maxDutyAmt"
:show-plus="false"
:show-minus="false"
class="ml10 mr10"
@focus="focusStep"
@blur="blurStep"
@@ -74,7 +78,7 @@
dutyItem.maxDutyAmt
)
"
input-width="100"
input-width="200"
:integer="false"
/>
<van-checkbox
@@ -144,7 +148,8 @@ export default {
[Picker.name]: Picker,
[Stepper.name]: Stepper,
[Field.name]: Field,
[Checkbox.name]: Checkbox
[Checkbox.name]: Checkbox,
[Dialog.name]: Dialog
},
data() {
return {
@@ -169,7 +174,9 @@ export default {
policyNo: '',
// 份数
mult: '',
isFrom: ''
isFrom: '',
// 默认钱数
defalutAmt: ''
}
},
mounted() {
@@ -204,12 +211,15 @@ export default {
if (item.mainRiskCode == 'GFRS_M0006') {
item.isHidden = true
}
item.calFactorLst.map(i => {
if (i.defaultValue) {
this.mult = i.defaultValue
if(item.mainRiskCode != 'GFRS_M0008') {
item.calFactorLst.map(i => {
this.defalutAmt = i.displayAmount
console.log(i.displayAmount)
console.log(i.defaultValue)
this.mult = Number(i.displayAmount) / Number(i.defaultValue)
})
}
})
})
// this.influenceAddRiskCodes
@@ -226,27 +236,42 @@ export default {
},
// 责任保额份数变化
dutyStepperChange(value, productIndex, calFactorIndex, dutyItemIndex, isChecked, min, max) {
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]
if (value < min || value > max) {
this.nextStepFlag = true
this.changeFlag = false
this.$toast(localStorage.hint)
} else {
this.changeFlag = true
}
if (isChecked) {
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
currentEle.forEach(item => {
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
})
this.mainRiskInfluenceAddRisk()
this.getTrial()
} else {
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
currentEle.forEach(item => {
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
})
if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
Dialog.alert({
message: localStorage.hint
}).then(()=> {
currentEle.defaultDutyAmt = currentEle.minDutyAmt
})
// this.$toast(localStorage.hint)
} else {
// this.mainRiskInfluenceAddRisk()
// currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
// this.getTrial()
if (isChecked) {
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
currentEle.forEach(item => {
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
})
this.mainRiskInfluenceAddRisk()
this.getTrial()
} else {
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
currentEle.forEach(item => {
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
})
}
}
}
},
//弹框选择
toSelect(index, index1, columns) {
@@ -623,9 +648,9 @@ export default {
}
} else if (factor.type == 1) {
if (factor.code == 'inputPrem') {
trialInfo['prem'] = Number(factor.defaultValue) * Number(factor.moneyUnit)
trialInfo['prem'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
} else {
trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit)
trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
}
} else if (factor.type == 2) {
trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code]
@@ -646,7 +671,7 @@ export default {
})
//通用规则1交费方式为一次交情无交费期限
if (trialInfo['payIntv'] == '0') {
if (trialInfo['payIntv'] == '0') {
trialInfo['payEndYear'] = '1000'
trialInfo['payEndYearFlag'] = 'Y'
// 福宝宝和万能险传A
@@ -707,24 +732,29 @@ export default {
})
},
//保额份数变化
stepperChange(value, 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 = value
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
Dialog.alert({
message: localStorage.hint
}).then(() => {
currentEle.defaultValue = currentEle.rules[productIndex].defaultValue
// this.nextStepFlag = true
})
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
this.mult = Number(this.defalutAmt) / Number(defalutValue)
},
//下一步
async nextStep() {