Merge branch 'feature/GFRS-2015【待确定】开门红需求-电投改造' into dev

# Conflicts:
#	src/api/ebiz/sale/sale.js
#	src/views/ebiz/common/CalculatePremium.vue
This commit is contained in:
yang.huaxiang
2020-11-13 11:34:04 +08:00
10 changed files with 685 additions and 47 deletions

View File

@@ -33,6 +33,36 @@
</div>
</div>
<van-dialog v-model="active_show" :show-confirm-button="false" class="dialog_class">
<div class="flex justify-content-fe">
<van-image :src="this.$assetsUrl + 'images/kmh/cancel.png'" class="fr mt15 mr15 icon_image" @click="active_show = false"></van-image>
</div>
<div class="pl20 pr20 mt30">
<p class="fs16 black fw400">请选择</p>
<van-radio-group v-model="active_radio" style="align-items: center;">
<van-radio name="1" class="radio_class ml60">
<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">
<div class="fs16 fw400">开门红产品</div>
</div>
</van-radio>
<van-radio name="2" class="radio_class ml60">
<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">
<div class="fs16 fw400">普通产品</div>
</div>
</van-radio>
</van-radio-group>
<div class="flex justify-content-c bg-white mt20 mb40 align-items-c">
<van-button type="danger" class="dialog-comfirm-button" @click="comfirmCheckActive" v-no-more-click="1000">确认</van-button>
</div>
</div>
</van-dialog>
<div>
<van-submit-bar button-text="下一步" @submit="nextStep" :disabled="nextStepFlag">
<div class="fs15 ml15 fwb" style="flex:1" slot="default">
@@ -45,11 +75,12 @@
</div>
</template>
<script>
import { Tag, SubmitBar, Icon, Dialog } from 'vant'
import { Tag, SubmitBar, Icon, Dialog, RadioGroup, Radio, Image as VanImage } from 'vant'
import FieldPicker from '@/components/ebiz/FieldPicker'
import { orderDetail, deleteOrderInfo } from '@/api/ebiz/common/common'
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
import { getDetail, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
import { getOrderActiveInfo, saveOrderActiveType } from '@/api/ebiz/sale/sale.js'
import utilsAge from '@/assets/js/utils/age'
import IndexBar from '@/components/ebiz/sale/IndexBar'
@@ -63,7 +94,11 @@ export default {
isShow: true,
appntDTO: {},
isFrom: localStorage.isFrom,
salePageFlag: '3'
salePageFlag: '3',
active_show: false,
active_radio: '1',
checkedUrl: this.$assetsUrl + 'images/kmh/kmhCheked.png',
noCheckedUrl: this.$assetsUrl + 'images/kmh/kmhNoCheked.png'
}
},
components: {
@@ -71,10 +106,15 @@ export default {
[FieldPicker.name]: FieldPicker,
[SubmitBar.name]: SubmitBar,
[Icon.name]: Icon,
[IndexBar.name]: IndexBar
[IndexBar.name]: IndexBar,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[VanImage.name]: VanImage
},
mounted() {
if (localStorage.isFrom == 'sale') {
// 清除活动标志
localStorage.removeItem('active_type')
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
@@ -339,7 +379,24 @@ export default {
}
},
//添加产品
addProduct() {
async addProduct() {
// 1、处理判断活动 1、电投流程 2、后端接口提供弹出判断
if (localStorage.isFrom == 'sale') {
let param = {
activeType: 'KMH'
}
let resultData = await getOrderActiveInfo(param)
if (resultData.result == 0) {
if (resultData.content.activeFlag != '1') {
this.active_show = true
return
}
//正常后续跳转流程
} else {
this.$toast(resultData.resultMessage)
return
}
}
this.$jump({
flag: 'h5',
extra: {
@@ -350,6 +407,33 @@ export default {
}
})
},
comfirmCheckActive() {
let param = {
orderDTO: {
orderInfoDTO: {
orderNo: localStorage.orderNo,
activeType: this.active_radio == '1' ? 'KMH' : ''
}
}
}
saveOrderActiveType(param).then(res => {
this.active_show = false
localStorage.setItem('active_type', this.active_radio == '1' ? 'KMH' : '')
if (res.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/common/mainRiskList'
},
routerInfo: {
path: '/common/mainRiskList'
}
})
} else {
this.$toast(res.resultMessage)
}
})
},
showTipForDoubleRecord() {
//判断投保人年龄是否大于等于60岁
let showFlag = false
@@ -385,6 +469,7 @@ export default {
}
</script>
<style lang="scss" scoped>
@import '@/assets/sass/variables.scss';
.select-product-container {
.border-dotted {
border: 1px dashed #999;
@@ -402,5 +487,28 @@ export default {
font-weight: bold;
font-size: 15px;
}
.radio_class {
height: 60px;
}
.dialog-comfirm-button {
width: 167px;
height: 36px;
line-height: 36px;
border-radius: 6px;
text-align: center;
vertical-align: center;
}
.icon_image {
width: 12px;
height: 12px;
}
.radio_icon_image {
width: 16px;
height: 16px;
padding-top: 3px;
}
.dialog_class {
width: 290px;
}
}
</style>