【国富惠桂保团体医疗保险产品上线金掌桂投保开发需求】选择被保人界面 总保费没有保留小数,且删除被保人后,总保费不会变化

This commit is contained in:
li.yuetong
2022-07-14 13:24:45 +08:00
parent 5976142066
commit 86157c005e

View File

@@ -109,70 +109,7 @@ export default {
// else if (this.$CacheUtils.getLocItem('orderNo')) {
// this.cardOrderNo = this.$CacheUtils.getLocItem('orderNo')
// }
//根据后台数据来展示
let cardInfoDTO = {
orderNo: this.cardOrderNo
}
cardOrderDetail(cardInfoDTO).then(res => {
if (res.result == '0') {
if (res.orderDTO.insuredDTOs.length > 0) {
this.chooseList = res.orderDTO.insuredDTOs
this.allPrice = res.orderDTO.orderInfoDTO.orderAmount
this.chooseList.forEach(v => {
relation.forEach(r => {
if (r.id == v.relationToAppnt) {
//根据关系id 获取关系name
v.relationName = r.text
// if (v.relationToAppnt == '3' && v.sex == '0') {
// //判断父亲和母亲
// v.relationName = '父亲'
// } else if (v.relationToAppnt == '3' && v.sex == '1') {
// v.relationName = '母亲'
// }
}
})
if (v.insuredId) {
//判断是否已经添加被保险人及险种
v.hasRisk = true
}
this.persons.forEach(p => {
if (v.relationToAppnt == p.relation) {
// v.icon = p.icon
v.code = p.code
if (v.sex == '0' && v.relationToAppnt == '3') {
// v.icon = icon3
v.code = 2
} else if (v.sex == '1' && v.relationToAppnt == '3') {
// v.icon = icon4
v.code = 3
}
}
})
})
this.chooseList.forEach(v => {
this.persons.forEach(p => {
if (v.code == p.code) {
p.check = true
}
})
})
// 做排序
this.sortarr(this.chooseList, 'code')
} else {
//初始化数据
this.chooseList = [
{
check: true,
code: 0,
hasRisk: false,
relation: 1,
relationName: "本人"
}
]
this.persons[0].check = true
}
}
})
this.cardOrderDetailFunc()
},
methods: {
// stepIn() {
@@ -187,6 +124,72 @@ export default {
// }
// })
// },
cardOrderDetailFunc(){
//根据后台数据来展示
let cardInfoDTO = {
orderNo: this.cardOrderNo
}
cardOrderDetail(cardInfoDTO).then(res => {
if (res.result == '0') {
if (res.orderDTO.insuredDTOs.length > 0) {
this.chooseList = res.orderDTO.insuredDTOs
this.allPrice = res.orderDTO.orderInfoDTO.orderAmount
this.chooseList.forEach(v => {
relation.forEach(r => {
if (r.id == v.relationToAppnt) {
//根据关系id 获取关系name
v.relationName = r.text
// if (v.relationToAppnt == '3' && v.sex == '0') {
// //判断父亲和母亲
// v.relationName = '父亲'
// } else if (v.relationToAppnt == '3' && v.sex == '1') {
// v.relationName = '母亲'
// }
}
})
if (v.insuredId) {
//判断是否已经添加被保险人及险种
v.hasRisk = true
}
this.persons.forEach(p => {
if (v.relationToAppnt == p.relation) {
// v.icon = p.icon
v.code = p.code
if (v.sex == '0' && v.relationToAppnt == '3') {
// v.icon = icon3
v.code = 2
} else if (v.sex == '1' && v.relationToAppnt == '3') {
// v.icon = icon4
v.code = 3
}
}
})
})
this.chooseList.forEach(v => {
this.persons.forEach(p => {
if (v.code == p.code) {
p.check = true
}
})
})
// 做排序
this.sortarr(this.chooseList, 'code')
} else {
//初始化数据
this.chooseList = [
{
check: true,
code: 0,
hasRisk: false,
relation: 1,
relationName: "本人"
}
]
this.persons[0].check = true
}
}
})
},
appCallBack(data) {
if (data.trigger == 'left_button_click') {
this.$jump({
@@ -336,6 +339,7 @@ export default {
if(choose.relationToAppnt == '1'){
this.persons[0].check = false
}
this.cardOrderDetailFunc()
// this.formatChoose(choose, index)
}
})