代码修正

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-10-04 19:49:07 +08:00
parent 839cd16311
commit 93c7c991d8

View File

@@ -109,7 +109,6 @@
item.productCode == 'GFRS_M0051' ||
item.productCode == 'GFRS_M0054' ||
item.productCode == 'GFRS_M0073' ||
item.productCode == 'GFRS_M0077' ||
item.productCode == 'GFRS_M0057'
)
"
@@ -128,7 +127,6 @@
item.productCode == 'GFRS_M0051' ||
item.productCode == 'GFRS_M0054' ||
item.productCode == 'GFRS_M0073' ||
item.productCode == 'GFRS_M0077' ||
item.productCode == 'GFRS_M0057'
)
"
@@ -137,10 +135,10 @@
:max="dutyItem.maxDutyAmt"
:show-plus="false"
:show-minus="false"
:disabled="item.productCode == 'GFRS_A0012'"
:disabled="item.productCode == 'GFRS_A0012' || (item.productCode == 'GFRS_M0077' && !dutyItem.necess) || (item.productCode == 'GFRS_M0077' && dutyItem.duty == '311507')"
class="ml10 mr10"
@focus="focusStep"
@blur="blurStep(dutyItem, index)"
@blur="blurStep(dutyItem, index,item.productCode)"
@change="
dutyStepperChange(
item.calFactorLst[riskFactorIndex].rules[dutyItemIndex].defaultDutyAmt,
@@ -360,7 +358,7 @@
<span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span>
</div>
<div>
<!-- <span class="v-middle">{{item.status | approvedFilter}}</span>-->
<!-- <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>
@@ -372,14 +370,14 @@
</div>
</template>
<script>
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox, RadioGroup, Radio } from 'vant'
import { trial } from '@/api/ebiz/common/common'
import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sale/sale'
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";
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox, RadioGroup, Radio } from 'vant'
import { trial } from '@/api/ebiz/common/common'
import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sale/sale'
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的责任的验证规则
//默认 最低基本保险金额min 10000 整数倍要求mutiple 1000
@@ -487,7 +485,7 @@ import riskRules from "./risk-rules";
const DUTY_DEFAULT_MUTIPLE = 1000
const DUTY_DEFAULT_MIN = 10000
export default {
export default {
name: 'calculatePremium',
filters: {
ruleTypeFilter(val) {
@@ -1189,6 +1187,23 @@ export default {
})
}
}
if (validateRiskCode === 'GFRS_M0077'){
if(dutyItem.duty == '311507' && dutyItem.necess){
this.chooseProducts.forEach(item => {
item.calFactorLst.map((i) => {
if (i.code == 'dutyGroup') {
if(i.rules && i.rules.length != 0) {
i.rules.forEach(ii=>{
if(ii.duty != '311507' && ii.necess){
dutyItem.defaultDutyAmt = ii.defaultDutyAmt
}
})
}
}
})
})
}
}
this.valiAndSend(dutyItem, productIndex)
},
valiAndSend(dutyItem, productIndex) {
@@ -1218,14 +1233,30 @@ export default {
focusStep() {
this.nextStepFlag = true
},
blurStep(dutyItem, productIndex) {
blurStep(dutyItem, productIndex, productCode) {
this.nextStepFlag = false
//失去焦点时做验证
if (dutyItem.necess) {
//勾选时才做验证
this.valiAndSend(dutyItem, productIndex)
}
if(productCode == 'GFRS_M0077'){
this.chooseProducts.forEach(item => {
if (item.mainRiskCode == 'GFRS_M0077') {
item.calFactorLst.map((i) => {
if (i.code == 'dutyGroup') {
if(i.rules && i.rules.length != 0) {
i.rules.forEach(ii=>{
if(ii.duty == '311507' && ii.necess){
ii.defaultDutyAmt = dutyItem.defaultDutyAmt
}
})
}
}
})
}
})
}
},
//险种GFRS_M0016\GFRS_M0070的责任的验证规则
valiDuty(value, duty) {
@@ -2821,7 +2852,7 @@ export default {
this.trialInfos[index].amt = this.trialList[index].amt
}
// GFRS_A0009,GFRS_A0010 这两款时,责任保额不相加
if(item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0013'|| item.productCode == 'GFRS_A0014'){
if(item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0013'|| item.productCode == 'GFRS_A0014' || item.productCode == 'GFRS_M0077'){
this.trialInfos[index].amt = this.trialList[index].duty[0].amt
}
// GFRS_A0011-附加两全 属于非豁免险 但附加两全保额=主险年交保费+其他不带豁免责任的长期期交附加险年交保费
@@ -3036,39 +3067,39 @@ export default {
}
</script>
<style lang="scss" scoped>
/deep/ .van-dialog .van-dialog__header{
/deep/ .van-dialog .van-dialog__header{
font-size: 16px;
font-weight: 700;
}
/deep/ .van-button--danger{
}
/deep/ .van-button--danger{
border-radius: 0;
}
}
/deep/ .van-button--plain {
/deep/ .van-button--plain {
border: none !important;
border-top: 1px solid #E9332E !important;
}
.renewalWrappser {
}
.renewalWrappser {
display: flex;
justify-content: space-between;
align-items: center;
}
}
/deep/ .van-radio {
/deep/ .van-radio {
margin: 0 0.5em;
}
}
.renewal {
.renewal {
display: flex;
justify-content: flex-end;
padding: 1em;
}
}
/deep/ .van-radio__label {
/deep/ .van-radio__label {
line-height: normal;
}
}
.calculate-premium-container {
.calculate-premium-container {
.border-bottom {
border-bottom: 1px solid #dadada;
}
@@ -3081,7 +3112,7 @@ export default {
/deep/.van-action-sheet__name {
font-size: 12px;
}
.checkbox-click {
.checkbox-click
position: absolute;
right: 0;
top: 0;
@@ -3091,5 +3122,5 @@ export default {
.van-dialog__content{
border: 1px solid red;
}
}
}
</style>