【国富人寿】建议书选择产品页面编辑按钮跳转链接参数拼接字段名称修改以及保费试算页面接口请求入参字段名称添加逻辑判断

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-05-18 17:29:21 +08:00
parent d0def37fa6
commit 42146430d0
2 changed files with 126 additions and 56 deletions

View File

@@ -14,7 +14,7 @@
<van-tag type="primary" v-else class="mr5 green" plain>附加险</van-tag> <van-tag type="primary" v-else class="mr5 green" plain>附加险</van-tag>
<span class="ml5 center fs13 flex1">{{ item.riskName }}</span> <span class="ml5 center fs13 flex1">{{ item.riskName }}</span>
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8" <van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8"
></van-tag ></van-tag
> >
<van-icon name="search" size="20" v-if="item.documentDTOS && item.documentDTOS.length > 0" @click="seeDocument(index)" class="green mr5" /> <van-icon name="search" size="20" v-if="item.documentDTOS && item.documentDTOS.length > 0" @click="seeDocument(index)" class="green mr5" />
<van-icon name="delete" size="22" @click="deleteRisk(index)" class="green" /> <van-icon name="delete" size="22" @click="deleteRisk(index)" class="green" />
@@ -31,13 +31,13 @@
<!-- {{ riskFactorIndex }} --> <!-- {{ riskFactorIndex }} -->
<!-- {{defalutAmt}} --> <!-- {{defalutAmt}} -->
<van-stepper <van-stepper
v-model.number="item.calFactorLst[riskFactorIndex].displayAmount" v-model.number="item.calFactorLst[riskFactorIndex].displayAmount"
:min="riskFactor.minAmt || riskFactor.minPrem" :min="riskFactor.minAmt || riskFactor.minPrem"
:max="riskFactor.maxAmt || riskFactor.maxPrem" :max="riskFactor.maxAmt || riskFactor.maxPrem"
:show-plus="false" :show-plus="false"
:show-minus="false" :show-minus="false"
class="ml30" class="ml30"
@change=" @change="
stepperChange( stepperChange(
item.calFactorLst[riskFactorIndex].displayAmount, item.calFactorLst[riskFactorIndex].displayAmount,
index, index,
@@ -688,61 +688,70 @@
} }
this.cvalidateFlag = this.activeType && this.isFrom != 'proposal' this.cvalidateFlag = this.activeType && this.isFrom != 'proposal'
//构建提交数据、渲染险种 //构建提交数据、渲染险种
if(this.$route.query.insuanceId && this.isFrom == 'proposal'){ if(this.$route.query.insuanceId && this.isFrom == 'proposal'){
// 获取试算记录详情 // 获取试算记录详情
await getTrialRecordInfo({ let serialNo = ''
serialNo:this.$CacheUtils.getLocItem('proposalNo'), if (this.$route.query.orderNo) {
mainRiskId:this.$route.query.insuanceId serialNo = this.$route.query.orderNo
}).then(res => { }
if (res.result == '0') { if (this.$route.query.proposalOrderNo) {
this.chooseProducts = JSON.parse(res.content.trialJsonStr) serialNo = this.$route.query.proposalOrderNo
}
await getTrialRecordInfo({
serialNo:serialNo,
mainRiskId:this.$route.query.insuanceId
}).then(res => {
if (res.result == '0') {
this.chooseProducts = JSON.parse(res.content.trialJsonStr)
} else {
this.$toast(res.resultMessage)
}
})
}else{
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
}
this.chooseProducts.forEach((item, index) => {
if (item.isCrossChannel == '1') {
this.isCrossChannel = item.isCrossChannel
}
if (item.mainRiskCode == 'GFRS_M0006') {
item.isHidden = true
}
if (item.mainRiskCode != 'GFRS_M0008') {
item.calFactorLst.map((i) => {
// this.defalutAmt = i.displayAmount || 1
if (i.code == 'inputPrem') {
this.mult = Math.ceil(Number(i.displayAmount) / Number(i.defaultValue))
} }
}) })
}else{
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
} }
this.chooseProducts.forEach((item, index) => { if (item.mainRiskCode == 'GFRS_M0046') {
if (item.isCrossChannel == '1') { if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
this.isCrossChannel = item.isCrossChannel this.isEnterAddtionRiskListFunc()
} }
if (item.mainRiskCode == 'GFRS_M0006') { }
item.isHidden = true let payEndYearVal
//初始化时交费期间为一次性交清时,在就是中介渠道, 附加险GFRS_A0007GFRS_A0009GFRS_A0010去掉后附加险list就为空--隐藏icon
item.calFactorLst.map((i) => {
if (i.code == 'payEndYear') {
if (i.payEndYear == '1000' && i.payEndYearFlag == 'Y') {
this.isEnterAddtionRiskListFunc()
}
//初始化时取交费期间的值
payEndYearVal = i.showContent
} }
if (item.mainRiskCode != 'GFRS_M0008') { })
item.calFactorLst.map((i) => { if (index == 0) {
// this.defalutAmt = i.displayAmount || 1 if (item.productTrialYearDTOS) {
if (i.code == 'inputPrem') { //初始化时取交费期间的值值再去对应productTrialYearDTOS中的第几条规则
this.mult = Math.ceil(Number(i.displayAmount) / Number(i.defaultValue)) item.productTrialYearDTOS.forEach((item, index) => {
if (payEndYearVal == item.yearWay + '年交') {
that.payEndYearColumnsIndex = index
} }
}) })
} }
if (item.mainRiskCode == 'GFRS_M0046') { }
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
this.isEnterAddtionRiskListFunc()
}
}
let payEndYearVal
//初始化时交费期间为一次性交清时,在就是中介渠道, 附加险GFRS_A0007GFRS_A0009GFRS_A0010去掉后附加险list就为空--隐藏icon
item.calFactorLst.map((i) => {
if (i.code == 'payEndYear') {
if (i.payEndYear == '1000' && i.payEndYearFlag == 'Y') {
this.isEnterAddtionRiskListFunc()
}
//初始化时取交费期间的值
payEndYearVal = i.showContent
}
})
if (index == 0) {
if (item.productTrialYearDTOS) {
//初始化时取交费期间的值值再去对应productTrialYearDTOS中的第几条规则
item.productTrialYearDTOS.forEach((item, index) => {
if (payEndYearVal == item.yearWay + '年交') {
that.payEndYearColumnsIndex = index
}
})
}
}
// if (item.productCode == 'GFRS_A0003') { // if (item.productCode == 'GFRS_A0003') {
// //该附加险的责任保额=主险的保费 // //该附加险的责任保额=主险的保费

View File

@@ -161,6 +161,12 @@ export default {
[Image.name]: Image [Image.name]: Image
}, },
mounted() { mounted() {
this.$jump({
flag: 'navigation',
extra: {
title: '已选产品列表'
},
})
if (localStorage.isFrom == 'sale') { if (localStorage.isFrom == 'sale') {
// 清除活动标志 // 清除活动标志
// localStorage.removeItem('active_type') // localStorage.removeItem('active_type')
@@ -172,6 +178,20 @@ export default {
}) })
}, 100) }, 100)
} }
//建议书--右上角为退出流程键(到建议书列表)×,并清除浏览记录
if (localStorage.isFrom == 'proposal') {
// eslint-disable-next-line no-undef
setTimeout(() => {
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/del-close.png',
route: { flag: '', extra: {} }
}
]
})
}, 500)
}
window.appCallBack = this.appCallBack window.appCallBack = this.appCallBack
document.body.style.backgroundColor = '#fff' document.body.style.backgroundColor = '#fff'
this.getProductList() this.getProductList()
@@ -232,6 +252,32 @@ export default {
.catch(() => { .catch(() => {
return return
}) })
}else if (data.trigger == 'right_button_click' && localStorage.isFrom == 'proposal') {
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '建议书列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
})
})
.catch(() => {
return
})
} }
}, },
//获取已选产品列表 //获取已选产品列表
@@ -380,6 +426,21 @@ export default {
this.$toast(resultData.resultMessage) this.$toast(resultData.resultMessage)
} }
}, },
//编辑
editInsure(index,insuanceId){
let isProposal = localStorage.isFrom == 'proposal' ? true : false
if (isProposal) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/common/calculatePremium?proposalOrderNo='+this.$route.query.proposalOrderNo+'&insuanceId='+insuanceId
},
routerInfo: {
path: '/common/calculatePremium?proposalOrderNo='+this.$route.query.proposalOrderNo+'&insuanceId='+insuanceId
}
})
}
},
//下一步 //下一步
async nextStep() { async nextStep() {
if (!this.$route.query.salePageFlag) { if (!this.$route.query.salePageFlag) {
@@ -584,7 +645,7 @@ export default {
showTipForDoubleRecord() { showTipForDoubleRecord() {
//判断投保人年龄是否大于等于60岁 //判断投保人年龄是否大于等于60岁
let showFlag = false let showFlag = false
let age = utilsAge.getAge(this.appntDTO.birthday, new Date()) let age = this.appntDTO.birthday?utilsAge.getAge(this.appntDTO.birthday, new Date()):this.appntDTO.age
if (age >= 60) { if (age >= 60) {
this.chooseProducts.map(item => { this.chooseProducts.map(item => {
if (item.insuYearFlag == 'A' || (item.insuYearFlag == 'Y' && item.insuYear != '1')) { if (item.insuYearFlag == 'A' || (item.insuYearFlag == 'Y' && item.insuYear != '1')) {