mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 22:36:43 +08:00
【关于官微、金掌桂卡单产品生效日规则调整的申请】金掌桂无忧卡,少儿安康卡两款卡单产品关闭指定生效日功能--保险期间计算逻辑
This commit is contained in:
@@ -798,6 +798,29 @@ export default {
|
|||||||
//GFRS_M0052 国富人寿少儿安康保险产品组合、GFRS_M0041 国富无忧卡-国富人寿综合意外伤害保险计划
|
//GFRS_M0052 国富人寿少儿安康保险产品组合、GFRS_M0041 国富无忧卡-国富人寿综合意外伤害保险计划
|
||||||
if (this.itemProductDTOS.productCode === 'GFRS_M0052' || this.itemProductDTOS.productCode === 'GFRS_M0041') {
|
if (this.itemProductDTOS.productCode === 'GFRS_M0052' || this.itemProductDTOS.productCode === 'GFRS_M0041') {
|
||||||
this.cvaliDate = dateUtils.formatDate(afterDate.getAfterDays(Number(this.trialList[0].timeliness)), 'yyyy-MM-dd')
|
this.cvaliDate = dateUtils.formatDate(afterDate.getAfterDays(Number(this.trialList[0].timeliness)), 'yyyy-MM-dd')
|
||||||
|
//保险期间计算逻辑
|
||||||
|
let val = this.cvaliDate
|
||||||
|
if (Date.parse(val) < Date.parse(new Date())) {
|
||||||
|
return this.$toast('当前日期早于当日')
|
||||||
|
}
|
||||||
|
let currentDataArr = val.split('-')
|
||||||
|
let currentData = currentDataArr[0] + '年' + currentDataArr[1] + '月' + currentDataArr[2] + '日'
|
||||||
|
let insuYear = JSON.parse(localStorage.insuYear)
|
||||||
|
let insuYearM, productDate, productDateTime
|
||||||
|
let insuYearD, hoDate
|
||||||
|
switch (insuYear.insuYearFlag) {
|
||||||
|
case 'D':
|
||||||
|
hoDate = Date.parse(val) / 1000 + (insuYear['insuYear'] - 1) * 24 * 3600
|
||||||
|
break
|
||||||
|
case 'Y':
|
||||||
|
hoDate = Date.parse(val) / 1000 + insuYear['insuYear'] * 24 * 3600 * (afterDate.isLeapYear(new Date(val).getFullYear()) - 1)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
productDate = new Date(parseInt(hoDate) * 1000)
|
||||||
|
insuYearM = productDate.getMonth() + 1 < 10 ? '0' + (productDate.getMonth() + 1) : productDate.getMonth() + 1
|
||||||
|
insuYearD = productDate.getDate() < 10 ? '0' + productDate.getDate() : productDate.getDate()
|
||||||
|
productDateTime = productDate.getFullYear() + '年' + insuYearM + '月' + insuYearD + '日'
|
||||||
|
this.productDate = currentData + '0时至' + productDateTime + '24时止'
|
||||||
}
|
}
|
||||||
//GFRS-2641 少儿安康
|
//GFRS-2641 少儿安康
|
||||||
if (this.itemProductDTOS.productCode === 'GFRS_M0052') {
|
if (this.itemProductDTOS.productCode === 'GFRS_M0052') {
|
||||||
|
|||||||
Reference in New Issue
Block a user