【关于开发金掌桂核保试算功能的需求】核保试算功能

This commit is contained in:
li.yuetong
2022-12-01 00:41:52 +08:00
parent 416a9c90be
commit 7afb40b047
8 changed files with 61 additions and 33 deletions

View File

@@ -10,7 +10,14 @@ export function saveOrUpdateOrderInfo(data) {
data
})
}
// 核保试算
export function orderTrial(data) {
return request({
url: getUrl('/sale/orderTrial/trial', 1),
method: 'post',
data
})
}
//人核转线上支付判断是否可进行支付操作
export function payFlag(data) {
return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -336,40 +336,23 @@
</van-radio-group>
<span class="pl5">{{ cvalidateStr }}</span>
</div>
<div class="bottom-btn bg-white flex">
<!-- <van-button plain type="danger" size="large" @click="nextStep" :disabled="nextStepFlag" v-no-more-click="1000">核保试算</van-button> -->
<!-- <van-button type="danger" size="large" @click="nextStep" :disabled="nextStepFlag" v-no-more-click="1000">下一步</van-button> -->
<div class="bottom-btn bg-white flex" v-if="isFrom == 'proposal'">
<van-button type="danger" size="large" @click="nextStep" :disabled="nextStepFlag" v-no-more-click="1000">完成</van-button>
</div>
<div class="bottom-btn bg-white flex" v-else>
<van-button plain type="danger" size="large" @click="nextStep('orderTrial')" v-no-more-click="1000">核保试算</van-button>
<van-button type="danger" size="large" @click="nextStep" :disabled="nextStepFlag" v-no-more-click="1000">下一步</van-button>
</div>
<van-action-sheet v-model="show" cancel-text="取消" :actions="policyInfo" @select="openDocument" />
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom"><van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="onCancel" /></van-popup>
<van-dialog v-model="trialResultsShow" title="核保试算结果" :show-cancel-button="false">
<!-- <van-dialog v-model="trialResultsShow" :show-confirm-button="false" class="dialog_class" style="position: relative; overflow: visible;"> -->
<div class="pl20 pr20 mt30">
<!-- <div class="flex justify-content-c align-items-c">
<img class="icon_title_image" src="@/assets/images/kmh/title_bg.png" />
</div> -->
<!-- <van-radio-group v-model="active_radio" style="align-items: center;padding-top: 140px">
<van-radio name="1" class="radio_class ml50">
<template #icon="props">
<img class="img-icon radio_icon_image" :src="props.checked ? checkedUrl : noCheckedUrl" />
</template>
<div class="flex justify-content-fs align-items-c pl5">
<img class="icon_select_image" src="@/assets/images/kmh/kmh_pro.png" />
</div>
</van-radio>
<van-radio name="0" class="radio_class ml50">
<template #icon="props">
<img class="img-icon radio_icon_image" :src="props.checked ? checkedUrl : noCheckedUrl" />
</template>
<div class="flex justify-content-fs align-items-c pl5">
<img class="icon_select_image" src="@/assets/images/kmh/normal_pro.png" />
</div>
</van-radio>
</van-radio-group> -->
<div class="pl40 pr40 mt10">
<div class="flex justify-content-s fs12" v-for="(item, index) in verifyResultList" :key="index">
<div><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt=""><span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span></div>
<div><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>
</div>
</van-dialog>
</div>
@@ -377,7 +360,7 @@
<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 } from '@/api/ebiz/sale/sale'
import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sale/sale'
import { saveProposal } from '@/api/ebiz/proposal/proposal.js'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
@@ -449,6 +432,28 @@ const DUTY_DEFAULT_MIN = 10000
export default {
name: 'calculatePremium',
filters: {
ruleTypeFilter(val) {
switch (val) {
case '1':
return '体检:'
case '2':
return '财务问卷:'
case '3':
return '契调:'
case '4':
return '财务资料:'
}
},
approvedFilter(val) {
switch (val) {
case '0':
return '达标:'
case '1':
return '未达标'
}
}
},
components: {
[Tag.name]: Tag,
[Icon.name]: Icon,
@@ -505,7 +510,8 @@ export default {
renewal: '-1',
richChildrenFlag: false,
isCrossChannel: '0', //是否交叉渠道 1-是 0-否
trialResultsShow:false //核保试算结果
trialResultsShow:false, //核保试算结果
verifyResultList:[] //核保试算返回数据结构
}
},
mounted() {
@@ -2428,7 +2434,7 @@ export default {
this.mult = Math.ceil(Number(defalutValue) / Number(riskFactor.defaultValue))
},
//下一步
async nextStep() {
async nextStep(isFrom) {
//GFRS_M0016需要验证责任
if (this.mainRiskCode === 'GFRS_M0016') {
let calFactorLst = this.chooseProducts[0].calFactorLst
@@ -2632,13 +2638,21 @@ export default {
}
})
resultData = await saveProposal(params)
} else {
} else if (isFrom != 'orderTrial' && localStorage.isFrom == 'sale') {
resultData = await saveOrUpdateOrderInfo(params)
} else if (isFrom == 'orderTrial' && localStorage.isFrom == 'sale') {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '核保试算中'
})
resultData = await orderTrial(params)
}
if (resultData.result == 0) {
//电投
if (localStorage.isFrom == 'sale') {
if (isFrom != 'orderTrial' && localStorage.isFrom == 'sale') {
if (resultData.deleteFlag == '0') {
localStorage.salePageFlag = '3';
}
@@ -2673,6 +2687,10 @@ export default {
path: url
}
})
}else if (isFrom == 'orderTrial' && localStorage.isFrom == 'sale') {
this.$toast.clear()
this.trialResultsShow = true
this.verifyResultList = resultData.content.data.verifyResultList
}
} else {
this.$toast(resultData.resultMessage)
@@ -2752,5 +2770,8 @@ export default {
width: 7.46667vw;
height: 7.46667vw;
}
.van-dialog__content{
border: 1px solid red;
}
}
</style>