From 86157c005e4f00bcb86c93ca408b33f12cf8cea8 Mon Sep 17 00:00:00 2001 From: "li.yuetong" Date: Thu, 14 Jul 2022 13:24:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=9B=BD=E5=AF=8C=E6=83=A0=E6=A1=82?= =?UTF-8?q?=E4=BF=9D=E5=9B=A2=E4=BD=93=E5=8C=BB=E7=96=97=E4=BF=9D=E9=99=A9?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E4=B8=8A=E7=BA=BF=E9=87=91=E6=8E=8C=E6=A1=82?= =?UTF-8?q?=E6=8A=95=E4=BF=9D=E5=BC=80=E5=8F=91=E9=9C=80=E6=B1=82=E3=80=91?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=A2=AB=E4=BF=9D=E4=BA=BA=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=20=E6=80=BB=E4=BF=9D=E8=B4=B9=E6=B2=A1=E6=9C=89=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=B0=8F=E6=95=B0=EF=BC=8C=E4=B8=94=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=A2=AB=E4=BF=9D=E4=BA=BA=E5=90=8E=EF=BC=8C=E6=80=BB=E4=BF=9D?= =?UTF-8?q?=E8=B4=B9=E4=B8=8D=E4=BC=9A=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/cardList/GroupInsuredList.vue | 132 ++++++++++--------- 1 file changed, 68 insertions(+), 64 deletions(-) diff --git a/src/views/ebiz/cardList/GroupInsuredList.vue b/src/views/ebiz/cardList/GroupInsuredList.vue index 8e2436573..1bb1ac375 100644 --- a/src/views/ebiz/cardList/GroupInsuredList.vue +++ b/src/views/ebiz/cardList/GroupInsuredList.vue @@ -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) } })