mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-23 00:36:43 +08:00
feature/GFRS-2301【需求】健康险渠道国富无忧卡金掌桂开发的需求--修改地址信息添加市辖区字段,有效期修改,投保信息确认页-保险责任-保费期间-有效期显示修改--提交人庞兴月
This commit is contained in:
@@ -2587,6 +2587,7 @@ export default {
|
|||||||
445321: '新兴县',
|
445321: '新兴县',
|
||||||
445322: '郁南县',
|
445322: '郁南县',
|
||||||
445381: '罗定市',
|
445381: '罗定市',
|
||||||
|
450101: '市辖区',
|
||||||
450102: '兴宁区',
|
450102: '兴宁区',
|
||||||
450103: '青秀区',
|
450103: '青秀区',
|
||||||
450105: '江南区',
|
450105: '江南区',
|
||||||
|
|||||||
@@ -13,5 +13,19 @@ export default {
|
|||||||
//获取“多少天数”之后的时间 例如28天后 即days=28
|
//获取“多少天数”之后的时间 例如28天后 即days=28
|
||||||
let currentTime = new Date().getTime()
|
let currentTime = new Date().getTime()
|
||||||
return new Date(Number(currentTime) + 1000 * 60 * 60 * 24 * days)
|
return new Date(Number(currentTime) + 1000 * 60 * 60 * 24 * days)
|
||||||
|
},
|
||||||
|
isLeapYear: function(year) {
|
||||||
|
var cond1 = year % 4 == 0 //条件1:年份必须要能被4整除
|
||||||
|
var cond2 = year % 100 != 0 //条件2:年份不能是整百数
|
||||||
|
var cond3 = year % 400 == 0 //条件3:年份是400的倍数
|
||||||
|
//当条件1和条件2同时成立时,就肯定是闰年,所以条件1和条件2之间为“与”的关系。
|
||||||
|
//如果条件1和条件2不能同时成立,但如果条件3能成立,则仍然是闰年。所以条件3与前2项为“或”的关系。
|
||||||
|
//所以得出判断闰年的表达式:
|
||||||
|
var cond = (cond1 && cond2) || cond3
|
||||||
|
if (cond) {
|
||||||
|
return 366
|
||||||
|
} else {
|
||||||
|
return 365
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,15 @@
|
|||||||
</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.riskName" label="保障方案" name="保障方案" readonly />
|
<van-field :value="riskDTO.proScheme" label="保障方案" name="保障方案" readonly />
|
||||||
|
<div class="duty">
|
||||||
<van-field value="保额" label="保险责任" name="保险责任" readonly />
|
<van-field value="保额" label="保险责任" name="保险责任" readonly />
|
||||||
|
</div>
|
||||||
|
<div class="duty" v-for="(item, index) in riskDTO.dutyLst" :key="index">
|
||||||
|
<van-field :value="item.prem" :label="item.dutyName" :name="item.dutyName" readonly />
|
||||||
|
</div>
|
||||||
<van-field :value="riskDTO.prem" label="保费" name="保费" readonly />
|
<van-field :value="riskDTO.prem" label="保费" name="保费" readonly />
|
||||||
<van-field :value="'1年'" label="保险期间" name="保险期间" readonly />
|
<van-field :value="riskDTO.insuYear + riskDTO.dateCN" label="保险期间" name="保险期间" readonly />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div class="tips">注:{{productDate}}</div>
|
<div class="tips">注:{{productDate}}</div>
|
||||||
<van-goods-action style="z-index: 99">
|
<van-goods-action style="z-index: 99">
|
||||||
@@ -44,6 +49,7 @@
|
|||||||
import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon } from 'vant'
|
import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon } from 'vant'
|
||||||
import { getOrderDetail, information, underWrite } from '@/api/ebiz/sale/sale'
|
import { getOrderDetail, information, underWrite } from '@/api/ebiz/sale/sale'
|
||||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||||
|
import afterDate from '@/assets/js/utils/getAfterDate.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'cardDetail',
|
name: 'cardDetail',
|
||||||
components: {
|
components: {
|
||||||
@@ -79,29 +85,24 @@ export default {
|
|||||||
let insuYear = (this.riskDTO = this.orderDTO.insuredDTOs[0].riskDTOLst[0])
|
let insuYear = (this.riskDTO = this.orderDTO.insuredDTOs[0].riskDTOLst[0])
|
||||||
let currentDataArr = insuYear.cvaliDate.split('-')
|
let currentDataArr = insuYear.cvaliDate.split('-')
|
||||||
let currentData = currentDataArr[0] + '年' + currentDataArr[1] + '月' + currentDataArr[2] + '日'
|
let currentData = currentDataArr[0] + '年' + currentDataArr[1] + '月' + currentDataArr[2] + '日'
|
||||||
let insuYearM, productDate, productDateTime,insuYearD;
|
let insuYearM, productDate, productDateTime, insuYearD, hoDate
|
||||||
|
|
||||||
switch (insuYear.insuYearFlag) {
|
switch (insuYear.insuYearFlag) {
|
||||||
case 'D':
|
case 'D':
|
||||||
let hoDate = Date.parse(insuYear.cvaliDate) / 1000 + insuYear['insuYear'] * 24 * 3600
|
this.riskDTO.dateCN = '天'
|
||||||
|
hoDate = Date.parse(insuYear.cvaliDate) / 1000 + (insuYear['insuYear'] - 1) * 24 * 3600
|
||||||
|
break
|
||||||
|
case 'Y':
|
||||||
|
this.riskDTO.dateCN = '年'
|
||||||
|
hoDate = Date.parse(insuYear.cvaliDate) / 1000 + insuYear['insuYear'] * 24 * 3600 * (afterDate.isLeapYear(new Date(insuYear.cvaliDate).getFullYear()) - 1)
|
||||||
|
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时止'
|
||||||
break
|
|
||||||
case 'Y':
|
|
||||||
productDate = new Date(insuYear.cvaliDate)
|
|
||||||
insuYearM = productDate.getMonth() + 1 < 10 ? '0' + (productDate.getMonth() + 1) : productDate.getMonth() + 1
|
|
||||||
insuYearD = productDate.getDate() < 10 ? '0' + productDate.getDate() : productDate.getDate()
|
|
||||||
productDateTime = parseInt(productDate.getFullYear()) + parseInt(insuYear['insuYear']) + '年' + insuYearM + '月' + insuYearD + '日'
|
|
||||||
this.productDate = currentData + '0时至' + productDateTime + '24时止'
|
|
||||||
break
|
|
||||||
case 'M':
|
|
||||||
productDateTime = this.GetNextMonthDay(insuYear.cvaliDate, insuYear['insuYear'])
|
|
||||||
this.productDate = currentData + '0时至' + productDateTime + '24时止'
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
nextStep() {
|
nextStep() {
|
||||||
@@ -128,4 +129,12 @@ export default {
|
|||||||
color: #333;
|
color: #333;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
.duty{
|
||||||
|
.van-field__label{
|
||||||
|
width: 60vw;
|
||||||
|
}
|
||||||
|
.van-field__control{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -419,7 +419,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
underWrite(data).then(res => {
|
underWrite(data).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
this.$toast.clear()
|
this.$toast.clear()
|
||||||
if (res.uwResult == '33') {
|
if (res.uwResult == '33') {
|
||||||
@@ -441,8 +440,8 @@ export default {
|
|||||||
})
|
})
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -728,7 +727,7 @@ export default {
|
|||||||
hoDate = Date.parse(val) / 1000 + (insuYear['insuYear'] - 1) * 24 * 3600
|
hoDate = Date.parse(val) / 1000 + (insuYear['insuYear'] - 1) * 24 * 3600
|
||||||
break
|
break
|
||||||
case 'Y':
|
case 'Y':
|
||||||
hoDate = Date.parse(val) / 1000 + insuYear['insuYear'] * 24 * 3600 * 364
|
hoDate = Date.parse(val) / 1000 + insuYear['insuYear'] * 24 * 3600 * (afterDate.isLeapYear(new Date(val).getFullYear())-1)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
productDate = new Date(parseInt(hoDate) * 1000)
|
productDate = new Date(parseInt(hoDate) * 1000)
|
||||||
@@ -740,20 +739,6 @@ export default {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isLeapYear(year) {
|
|
||||||
var cond1 = year % 4 == 0 //条件1:年份必须要能被4整除
|
|
||||||
var cond2 = year % 100 != 0 //条件2:年份不能是整百数
|
|
||||||
var cond3 = year % 400 == 0 //条件3:年份是400的倍数
|
|
||||||
//当条件1和条件2同时成立时,就肯定是闰年,所以条件1和条件2之间为“与”的关系。
|
|
||||||
//如果条件1和条件2不能同时成立,但如果条件3能成立,则仍然是闰年。所以条件3与前2项为“或”的关系。
|
|
||||||
//所以得出判断闰年的表达式:
|
|
||||||
var cond = (cond1 && cond2) || cond3
|
|
||||||
if (cond) {
|
|
||||||
return 366
|
|
||||||
} else {
|
|
||||||
return 365
|
|
||||||
}
|
|
||||||
},
|
|
||||||
GetNextMonthDay(date, monthNum) {
|
GetNextMonthDay(date, monthNum) {
|
||||||
var dateArr = date.split('-')
|
var dateArr = date.split('-')
|
||||||
var year = dateArr[0] //获取当前日期的年份
|
var year = dateArr[0] //获取当前日期的年份
|
||||||
|
|||||||
Reference in New Issue
Block a user