fix: 修复添加附加险异常的问题

This commit is contained in:
hz
2025-10-29 16:58:17 +08:00
parent 1e9ac89ce9
commit 7885abaa2d
2 changed files with 15 additions and 12 deletions

View File

@@ -327,6 +327,7 @@ export default {
} }
productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况 productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况
localStorage.chooseProducts = JSON.stringify(productsData) localStorage.chooseProducts = JSON.stringify(productsData)
this.$emit('changeProducts', productsData)
// this.jumpTo() // this.jumpTo()
} else { } else {
this.$toast(resultData.resultMessage) this.$toast(resultData.resultMessage)

View File

@@ -390,7 +390,7 @@
<van-popup v-model="showAdditionRiskPopup" round position="bottom" class="addtion-risk"> <van-popup v-model="showAdditionRiskPopup" round position="bottom" class="addtion-risk">
<van-picker show-toolbar @confirm="handleSubmitAddAdditionRisk" @cancel="handleSubmitAddAdditionRisk({ submit: false })"> <van-picker show-toolbar @confirm="handleSubmitAddAdditionRisk" @cancel="handleSubmitAddAdditionRisk({ submit: false })">
<template #columns-top> <template #columns-top>
<addtion-risk-list ref="additionRiskList" :show-next="false" :trial-test="false" /> <addtion-risk-list ref="additionRiskList" :show-next="false" :trial-test="false" @changeProducts="handleChoosedProductsChange"/>
</template> </template>
</van-picker> </van-picker>
</van-popup> </van-popup>
@@ -592,7 +592,6 @@ export default {
// 当组件挂载之后开始创建订单 // 当组件挂载之后开始创建订单
// todo :后续如果不创建订单需要删除订单 // todo :后续如果不创建订单需要删除订单
this.submitOrder() this.submitOrder()
this.isFrom = window.localStorage.isFrom this.isFrom = window.localStorage.isFrom
this.$jump({ this.$jump({
flag: 'navigation', flag: 'navigation',
@@ -1375,7 +1374,7 @@ export default {
currentEle[name + 'Flag'] = value.flag currentEle[name + 'Flag'] = value.flag
} }
if (!this.passUserInfoCheck)return if (!this.passUserInfoCheck) return
// this.hiddenPayEndYear(currentEle) // this.hiddenPayEndYear(currentEle)
//特殊规则:设置豁免险 //特殊规则:设置豁免险
@@ -2680,10 +2679,8 @@ export default {
let birthday, sex, occupationCode, occupationName, age let birthday, sex, occupationCode, occupationName, age
if (item.isRemit == '0' && item.remitType == '0') { if (item.isRemit == '0' && item.remitType == '0') {
;[birthday, sex, occupationCode, occupationName, age] = [ ;[birthday, sex, occupationCode, occupationName, age] = [
this.userInfo.birthday, this.saleInsuredInfo.birthday,
// this.saleInsuredInfo.birthday, this.saleInsuredInfo.sex,
this.userInfo.sex,
// this.saleInsuredInfo.sex,
this.saleInsuredInfo.occupationCode, this.saleInsuredInfo.occupationCode,
this.saleInsuredInfo.occupationName, this.saleInsuredInfo.occupationName,
this.saleInsuredInfo.age ? this.saleInsuredInfo.age : this.saleInsuredInfo.insuredAge this.saleInsuredInfo.age ? this.saleInsuredInfo.age : this.saleInsuredInfo.insuredAge
@@ -2760,7 +2757,7 @@ export default {
}, },
//保额份数变化 //保额份数变化
stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) { stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) {
// debugger if (!this.passUserInfoCheck) return
let currentEle = '' let currentEle = ''
let params = this.getParams() let params = this.getParams()
@@ -3495,7 +3492,6 @@ export default {
// 保存被保人的相关信息 // 保存被保人的相关信息
this.submitOrder([insuredDTOItem]) this.submitOrder([insuredDTOItem])
// debugger
this.jumpTo() this.jumpTo()
}, },
//建议书试算记录保存更新--编辑功能 //建议书试算记录保存更新--编辑功能
@@ -3569,7 +3565,7 @@ export default {
const ele = this.$refs.additionRiskList const ele = this.$refs.additionRiskList
if (submit) { if (submit) {
const error = ele.nextStep() const error = ele.nextStep()
if (!error) return if (error) return
} }
ele.result = '' ele.result = ''
this.showAdditionRiskPopup = false this.showAdditionRiskPopup = false
@@ -3599,7 +3595,11 @@ export default {
query: { orderNo } query: { orderNo }
}) })
}) })
} },
handleChoosedProductsChange(){
this.chooseProducts = JSON.parse(localStorage.getItem("chooseProducts"))
this.selectAddtionRisk()
},
}, },
watch: { watch: {
saleInsuredPersonInfo: { saleInsuredPersonInfo: {
@@ -3607,6 +3607,7 @@ export default {
handler: function(obj) { handler: function(obj) {
const { birthday } = obj const { birthday } = obj
this.saleInsuredPersonInfo.insuredAge = utilsAge.getAge(birthday, new Date()) this.saleInsuredPersonInfo.insuredAge = utilsAge.getAge(birthday, new Date())
console.log(`saleInsuredPersonInfo value change` , this.saleInsuredPersonInfo)
if (this.passUserInfoCheck) this.getTrial() if (this.passUserInfoCheck) this.getTrial()
} }
}, },
@@ -3615,7 +3616,8 @@ export default {
handler: function(obj) { handler: function(obj) {
const { birthday } = obj const { birthday } = obj
this.saleInsuredInfo.insuredAge = utilsAge.getAge(birthday, new Date()) this.saleInsuredInfo.insuredAge = utilsAge.getAge(birthday, new Date())
if (this.passUserInfoCheck)this.getTrial() console.log(`saleInsuredInfo value change` , this.saleInsuredInfo)
if (this.passUserInfoCheck) this.getTrial()
} }
} }
} }