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

This commit is contained in:
li.yuetong
2022-12-01 00:41:52 +08:00
parent 66a6948793
commit e59dfada50
9 changed files with 82 additions and 53 deletions

View File

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

@@ -27,27 +27,27 @@ function getSearchString(key) {
} }
return obj[key] return obj[key]
} }
let apiVersion = 'v2' let apiVersion = 'v1'
var ua = window.navigator.userAgent.toLowerCase() // var ua = window.navigator.userAgent.toLowerCase()
//通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信 // //通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信
if(localStorage.getItem('apiVersion')){ // if(localStorage.getItem('apiVersion')){
apiVersion = localStorage.getItem('apiVersion') // apiVersion = localStorage.getItem('apiVersion')
}else{ // }else{
if(ua.match(/MicroMessenger/i) == 'micromessenger'){ // if(ua.match(/MicroMessenger/i) == 'micromessenger'){
//report/reportList数据报表页面在浏览器可以打开了但在微信或企业微信中打开不了,接口请求不需要token // //report/reportList数据报表页面在浏览器可以打开了但在微信或企业微信中打开不了,接口请求不需要token
if(window.location.href.indexOf('apiVersion') > 0){ // if(window.location.href.indexOf('apiVersion') > 0){
apiVersion = getSearchString('apiVersion')== 'V3'?'v3':'v2';//url中apiVersion没有时为v2 // apiVersion = getSearchString('apiVersion')== 'V3'?'v3':'v2';//url中apiVersion没有时为v2
}else{ // }else{
apiVersion = 'v3' // apiVersion = 'v3'
} // }
}else{ // }else{
// 在app // // 在app
if(navigator.userAgent.indexOf('JZG_') > 0){ // if(navigator.userAgent.indexOf('JZG_') > 0){
apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3'?'v3':'v2' // apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3'?'v3':'v2'
} // }
} // }
window.localStorage.setItem('apiVersion', apiVersion) // window.localStorage.setItem('apiVersion', apiVersion)
} // }
// 可以多个接口域名,按需添加 // 可以多个接口域名,按需添加
console.log('环境:', process.env.VUE_APP_FLAG) console.log('环境:', process.env.VUE_APP_FLAG)

View File

@@ -336,40 +336,23 @@
</van-radio-group> </van-radio-group>
<span class="pl5">{{ cvalidateStr }}</span> <span class="pl5">{{ cvalidateStr }}</span>
</div> </div>
<div class="bottom-btn bg-white flex"> <div class="bottom-btn bg-white flex" v-if="isFrom == 'proposal'">
<!-- <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> -->
<van-button 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> </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-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-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" title="核保试算结果" :show-cancel-button="false">
<!-- <van-dialog v-model="trialResultsShow" :show-confirm-button="false" class="dialog_class" style="position: relative; overflow: visible;"> --> <div class="pl40 pr40 mt10">
<div class="pl20 pr20 mt30"> <div class="flex justify-content-s fs12" v-for="(item, index) in verifyResultList" :key="index">
<!-- <div class="flex justify-content-c align-items-c"> <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>
<img class="icon_title_image" src="@/assets/images/kmh/title_bg.png" /> <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-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> </div>
</van-dialog> </van-dialog>
</div> </div>
@@ -377,7 +360,7 @@
<script> <script>
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox, RadioGroup, Radio } from 'vant' import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox, RadioGroup, Radio } from 'vant'
import { trial } from '@/api/ebiz/common/common' 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 { saveProposal } from '@/api/ebiz/proposal/proposal.js'
import { getAgentInfo } from '@/api/ebiz/my/my.js' import { getAgentInfo } from '@/api/ebiz/my/my.js'
@@ -449,6 +432,28 @@ const DUTY_DEFAULT_MIN = 10000
export default { export default {
name: 'calculatePremium', 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: { components: {
[Tag.name]: Tag, [Tag.name]: Tag,
[Icon.name]: Icon, [Icon.name]: Icon,
@@ -505,7 +510,8 @@ export default {
renewal: '-1', renewal: '-1',
richChildrenFlag: false, richChildrenFlag: false,
isCrossChannel: '0', //是否交叉渠道 1-是 0-否 isCrossChannel: '0', //是否交叉渠道 1-是 0-否
trialResultsShow:false //核保试算结果 trialResultsShow:false, //核保试算结果
verifyResultList:[] //核保试算返回数据结构
} }
}, },
mounted() { mounted() {
@@ -2427,7 +2433,7 @@ export default {
this.mult = Math.ceil(Number(defalutValue) / Number(riskFactor.defaultValue)) this.mult = Math.ceil(Number(defalutValue) / Number(riskFactor.defaultValue))
}, },
//下一步 //下一步
async nextStep() { async nextStep(isFrom) {
//GFRS_M0016需要验证责任 //GFRS_M0016需要验证责任
if (this.mainRiskCode === 'GFRS_M0016') { if (this.mainRiskCode === 'GFRS_M0016') {
let calFactorLst = this.chooseProducts[0].calFactorLst let calFactorLst = this.chooseProducts[0].calFactorLst
@@ -2631,13 +2637,21 @@ export default {
} }
}) })
resultData = await saveProposal(params) resultData = await saveProposal(params)
} else { } else if (isFrom != 'orderTrial' && localStorage.isFrom == 'sale') {
resultData = await saveOrUpdateOrderInfo(params) 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 (resultData.result == 0) {
//电投 //电投
if (localStorage.isFrom == 'sale') { if (isFrom != 'orderTrial' && localStorage.isFrom == 'sale') {
if (resultData.deleteFlag == '0') { if (resultData.deleteFlag == '0') {
localStorage.salePageFlag = '3'; localStorage.salePageFlag = '3';
} }
@@ -2672,6 +2686,10 @@ export default {
path: url path: url
} }
}) })
}else if (isFrom == 'orderTrial' && localStorage.isFrom == 'sale') {
this.$toast.clear()
this.trialResultsShow = true
this.verifyResultList = resultData.content.data.verifyResultList
} }
} else { } else {
this.$toast(resultData.resultMessage) this.$toast(resultData.resultMessage)
@@ -2751,5 +2769,8 @@ export default {
width: 7.46667vw; width: 7.46667vw;
height: 7.46667vw; height: 7.46667vw;
} }
.van-dialog__content{
border: 1px solid red;
}
} }
</style> </style>