【国富惠桂保团体医疗保险产品上线金掌桂投保开发需求】核对投被保人信息页面反显多个被保人信息

This commit is contained in:
li.yuetong
2022-04-26 13:39:04 +08:00
parent 72dd619740
commit 04f6760efb

View File

@@ -12,24 +12,23 @@
</van-cell-group> </van-cell-group>
<van-cell-group class='mt10'> <van-cell-group class='mt10'>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>产品信息</p> <p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>产品信息</p>
<van-field :value='riskDTO.proScheme' label='保障方案' name='保障方案' readonly /> <van-field :value='riskDTO.riskName' label='保障方案' name='保障方案' readonly />
<div class='duty'> <van-field value='保额' label='保险责任' name='保险责任' readonly />
<van-field value='保额' label='保险责任' name='保险责任' readonly />
</div>
<div v-if='riskDTO.dutyLst && riskDTO.dutyLst.length>0'> <div v-if='riskDTO.dutyLst && riskDTO.dutyLst.length>0'>
<div class='duty' v-for='(item, index) in riskDTO.dutyLst' :key='index'> <div class='duty' v-for='(item, index) in riskDTO.dutyLst' :key='index'>
<van-field :value='item.amtContain' :label='item.dutyName' :name='item.dutyName' readonly /> <van-field :value='item.amtContain' :label='item.dutyName' :name='item.dutyName' readonly />
</div> </div>
</div> </div>
<van-field :value="riskDTO.prem+''" label='保费' name='保费' readonly /> <van-field :value="riskDTO.prem+''" label='保费' name='保费' readonly />
<van-field :value='riskDTO.insuYear + riskDTO.dateCN' label='保险期间' name='保险期间' readonly /> <van-field :value='productDate' type="textarea" rows="1" label='保险期间' name='保险期间' readonly />
</van-cell-group> </van-cell-group>
<!-- <div class='tips'>注:{{ productDate }}</div> -->
<van-cell-group class='mt10'> <van-cell-group class='mt10'>
<p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>被保人信息</p> <p style='border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 pv12'>被保人信息</p>
<van-collapse v-model="activeNames" :border="false"> <van-collapse v-model="activeNames" :border="false">
<van-collapse-item :name="index" v-for="(item, index) in insuredInfo" :key="index" :border="false"> <van-collapse-item :name="index" v-for="(item, index) in insuredInfo" :key="index" :border="false">
<van-field :value='item.name' label='姓名' name='姓名' readonly /> <template #title>
<div>被保险人姓名<span class="ml20">{{item.name}}</span></div>
</template>
<van-field :value="item.idType | idToText('insuredIdType')" label='证件类型' name='证件类型' readonly /> <van-field :value="item.idType | idToText('insuredIdType')" label='证件类型' name='证件类型' readonly />
<van-field :value='item.idNo' label='证件号码' name='证件号码' readonly /> <van-field :value='item.idNo' label='证件号码' name='证件号码' readonly />
<!-- <van-field v-if='item.isLessEighteen' :value='item.mobile' label='手机号码' name='手机号码' readonly /> --> <!-- <van-field v-if='item.isLessEighteen' :value='item.mobile' label='手机号码' name='手机号码' readonly /> -->
@@ -47,7 +46,7 @@
<van-goods-action style='z-index: 99'> <van-goods-action style='z-index: 99'>
<van-button type='default' style='width: 50%; font-size: 14px; height: 40px; background: white'>总保费:<span <van-button type='default' style='width: 50%; font-size: 14px; height: 40px; background: white'>总保费:<span
style='color: red; font-weight: bold; font-size: 18px; font-weight: 400'>{{ style='color: red; font-weight: bold; font-size: 18px; font-weight: 400'>{{
riskDTO.prem }}</span>元 orderInfoDTO.orderAmount }}</span>元
</van-button> </van-button>
<van-goods-action-button type='danger' text='确认' @click='nextStep' v-no-more-click='1000' <van-goods-action-button type='danger' text='确认' @click='nextStep' v-no-more-click='1000'
style='border-radius: 0em; width: 50%; height: 40px' /> style='border-radius: 0em; width: 50%; height: 40px' />
@@ -60,7 +59,6 @@ import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon ,Collapse,
import {cardOrderDetail } from '@/api/ebiz/cardList/cardList.js' import {cardOrderDetail } from '@/api/ebiz/cardList/cardList.js'
import getAreaName from '@/assets/js/utils/getAreaNameForSale' import getAreaName from '@/assets/js/utils/getAreaNameForSale'
import afterDate from '@/assets/js/utils/getAfterDate.js' import afterDate from '@/assets/js/utils/getAfterDate.js'
import utilsAge from '@/assets/js/utils/age'
export default { export default {
name: 'cardDetail', name: 'cardDetail',
@@ -80,7 +78,8 @@ export default {
insuredInfo: {}, insuredInfo: {},
bnfTypeVal: '法定受益人', //受益人类型文字展示 bnfTypeVal: '法定受益人', //受益人类型文字展示
riskDTO: {}, riskDTO: {},
// productDate: '', productDate: '',
orderInfoDTO:{}
// isLessEighteen: true // 被保人手机号和邮箱默认展示 // isLessEighteen: true // 被保人手机号和邮箱默认展示
} }
}, },
@@ -88,6 +87,9 @@ export default {
if (this.$route.query.cardOrderNo) { if (this.$route.query.cardOrderNo) {
this.cardOrderNo = this.$route.query.cardOrderNo this.cardOrderNo = this.$route.query.cardOrderNo
} }
},
mounted() {
//根据后台数据来展示 //根据后台数据来展示
let cardInfoDTO = { let cardInfoDTO = {
orderNo: this.cardOrderNo orderNo: this.cardOrderNo
@@ -96,44 +98,34 @@ export default {
if (res.result == '0') { if (res.result == '0') {
this.appntInfo = res.orderDTO.appntDTO this.appntInfo = res.orderDTO.appntDTO
this.appntInfo.homeName = getAreaName([{ code: this.appntInfo.homeProvince }, { code: this.appntInfo.homeCity }, { code: this.appntInfo.homeArea }]) this.appntInfo.homeName = getAreaName([{ code: this.appntInfo.homeProvince }, { code: this.appntInfo.homeCity }, { code: this.appntInfo.homeArea }])
this.orderInfoDTO = res.orderDTO.orderInfoDTO
this.insuredInfo = res.orderDTO.insuredDTOs this.insuredInfo = res.orderDTO.insuredDTOs
this.insuredInfo.forEach(item => { this.insuredInfo.forEach(item => {
item.homeName = getAreaName([{ code: item.homeProvince }, { code: item.homeCity }, { code: item.homeArea }]) item.homeName = getAreaName([{ code: item.homeProvince }, { code: item.homeCity }, { code: item.homeArea }])
}) })
this.riskDTO = res.orderDTO.insuredDTOs[0].riskDTOLst[0] // this.riskDTO = res.orderDTO.insuredDTOs[0].riskDTOLst[0]
} let insuYear = (this.riskDTO = res.orderDTO.insuredDTOs[0].riskDTOLst[0])
}) let currentDataArr = insuYear.cvaliDate.split('-')
let currentData = currentDataArr[0] + '' + currentDataArr[1] + '' + currentDataArr[2] + ''
let insuYearM, productDate, productDateTime, insuYearD, hoDate
// let insuYear = (this.riskDTO = this.orderDTO.insuredDTOs[0].riskDTOLst[0])
// if (this.riskDTO.dutyLst && this.riskDTO.dutyLst.length > 0) {
// this.riskDTO.dutyLst.forEach(val => {
// if (val.dutyCode === 'C006') {
// val.amtContain = val.amt + '/'
// } else {
// val.amtContain = val.amt + ''
// }
// })
// }
// let currentDataArr = insuYear.cvaliDate.split('-')
// let currentData = currentDataArr[0] + '' + currentDataArr[1] + '' + currentDataArr[2] + ''
// let insuYearM, productDate, productDateTime, insuYearD, hoDate
// switch (insuYear.insuYearFlag) { switch (insuYear.insuYearFlag) {
// case 'D': case 'D':
// this.riskDTO.dateCN = '' this.riskDTO.dateCN = ''
// hoDate = Date.parse(insuYear.cvaliDate) / 1000 + (insuYear['insuYear'] - 1) * 24 * 3600 hoDate = Date.parse(insuYear.cvaliDate) / 1000 + (insuYear['insuYear'] - 1) * 24 * 3600
// break break
// case 'Y': case 'Y':
// this.riskDTO.dateCN = '' this.riskDTO.dateCN = ''
// hoDate = Date.parse(insuYear.cvaliDate) / 1000 + insuYear['insuYear'] * 24 * 3600 * (afterDate.isLeapYear(new Date(insuYear.cvaliDate).getFullYear()) - 1) hoDate = Date.parse(insuYear.cvaliDate) / 1000 + insuYear['insuYear'] * 24 * 3600 * (afterDate.isLeapYear(new Date(insuYear.cvaliDate).getFullYear()) - 1)
// break break
// } }
// productDate = new Date(parseInt(hoDate) * 1000) productDate = new Date(parseInt(hoDate) * 1000)
// insuYearM = productDate.getMonth() + 1 < 10 ? '0' + (productDate.getMonth() + 1) : productDate.getMonth() + 1 insuYearM = productDate.getMonth() + 1 < 10 ? '0' + (productDate.getMonth() + 1) : productDate.getMonth() + 1
// insuYearD = productDate.getDate() < 10 ? '0' + productDate.getDate() : productDate.getDate() insuYearD = productDate.getDate() < 10 ? '0' + productDate.getDate() : productDate.getDate()
// productDateTime = productDate.getFullYear() + '' + insuYearM + '' + insuYearD + '' productDateTime = productDate.getFullYear() + '' + insuYearM + '' + insuYearD + ''
// this.productDate = currentData + '0时至' + productDateTime + '24时止' this.productDate = currentData + '0时至' + productDateTime + '24时止'+ this.riskDTO.insuYear + this.riskDTO.dateCN
}
})
}, },
methods: { methods: {
nextStep() { nextStep() {