diff --git a/src/views/ebiz/cardList/cardDetail.vue b/src/views/ebiz/cardList/cardDetail.vue index 2491b826c..91a70865c 100644 --- a/src/views/ebiz/cardList/cardDetail.vue +++ b/src/views/ebiz/cardList/cardDetail.vue @@ -1,48 +1,52 @@ @@ -52,6 +56,8 @@ import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon } from 'va import { getOrderDetail, information, underWrite } from '@/api/ebiz/sale/sale' import getAreaName from '@/assets/js/utils/getAreaNameForSale' import afterDate from '@/assets/js/utils/getAfterDate.js' +import utilsAge from '@/assets/js/utils/age' + export default { name: 'cardDetail', components: { @@ -75,7 +81,8 @@ export default { insuredInfo: {}, bnfTypeVal: '法定受益人', //受益人类型文字展示 riskDTO: {}, - productDate: '' + productDate: '', + isLessEighteen: true // 被保人手机号和邮箱默认展示 } }, created() { @@ -83,16 +90,23 @@ export default { this.appntInfo.homeName = getAreaName([{ code: this.appntInfo.homeProvince }, { code: this.appntInfo.homeCity }, { code: this.appntInfo.homeArea }]) this.insuredInfo = this.orderDTO.insuredDTOs[0] this.insuredInfo.homeName = getAreaName([{ code: this.insuredInfo.homeProvince }, { code: this.insuredInfo.homeCity }, { code: this.insuredInfo.homeArea }]) - + if (this.insuredInfo.birthday) { + let age = utilsAge.getAge(this.insuredInfo.birthday, new Date()) + if (age <= 17) { + this.isLessEighteen = false //是否小于18周岁(不含) + } else { + this.isLessEighteen = true //是否小于18周岁(不含) + } + } let insuYear = (this.riskDTO = this.orderDTO.insuredDTOs[0].riskDTOLst[0]) - if (this.riskDTO.dutyLst && this.riskDTO.dutyLst.length>0) { + if (this.riskDTO.dutyLst && this.riskDTO.dutyLst.length > 0) { this.riskDTO.dutyLst.forEach(val => { - if(val.dutyCode === 'C006') { + 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] + '日' @@ -130,20 +144,23 @@ export default { } -