From 93e742b7eb823689c1863064fe8ef76d2ce358e5 Mon Sep 17 00:00:00 2001
From: "li.yuetong"
Date: Tue, 22 Mar 2022 17:43:02 +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?GFRS=5FM0058=20=E5=9B=A2=E4=BD=93=E5=8C=BB=E7=96=97=E4=BF=9D?=
=?UTF-8?q?=E9=99=A9=20=E7=BB=9F=E4=B8=80=E7=94=9F=E6=95=88=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E4=B8=BA=E6=8A=95=E4=BF=9D=E6=AC=A1=E6=9C=881?=
=?UTF-8?q?=E6=97=A50=E6=97=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/js/utils/getAfterDate.js | 28 ++
src/views/ebiz/cardList/GroupInsuredInfo.vue | 223 ++++-------
src/views/ebiz/cardList/GroupInsuredList.vue | 397 +++++++++++++++++++
3 files changed, 503 insertions(+), 145 deletions(-)
diff --git a/src/assets/js/utils/getAfterDate.js b/src/assets/js/utils/getAfterDate.js
index eae0b5e01..6a90add75 100644
--- a/src/assets/js/utils/getAfterDate.js
+++ b/src/assets/js/utils/getAfterDate.js
@@ -38,5 +38,33 @@ export default {
const diff = date1.getTime() - date2.getTime(); //目标时间减去当前时间
const diffDate = diff / (24 * 60 * 60 * 1000); //计算当前时间与结束时间之间相差天数
return diffDate
+ },
+ //获取次月1日0时
+ getNextMonth : function(date){
+ var arr = date.split('-');
+ var year = arr[0]; //获取当前日期的年份
+ var month = arr[1]; //获取当前日期的月份
+ // var day = arr[2]; //获取当前日期的日
+ // var days = new Date(year, month, 0);
+ // days = days.getDate(); //获取当前日期中的月的天数
+ var year2 = year;
+ var month2 = parseInt(month) + 1;
+ if (month2 == 13) {
+ year2 = parseInt(year2) + 1;
+ month2 = 1;
+ }
+ // var day2 = day;
+ // var days2 = new Date(year2, month2, 0);
+ // days2 = days2.getDate();
+ // if (day2 > days2) {
+ // day2 = days2;
+ // }
+ if (month2 < 10) {
+ month2 = '0' + month2;
+ }
+
+ // var t2 = year2 + '-' + month2 + '-' + day2;
+ var t2 = year2 + '-' + month2 + '-' + '01';
+ return t2;
}
}
diff --git a/src/views/ebiz/cardList/GroupInsuredInfo.vue b/src/views/ebiz/cardList/GroupInsuredInfo.vue
index 77d6f729a..e2d130f27 100644
--- a/src/views/ebiz/cardList/GroupInsuredInfo.vue
+++ b/src/views/ebiz/cardList/GroupInsuredInfo.vue
@@ -306,7 +306,7 @@
placeholder='请选择'
@click="toSelect('10')"
/>
-
+
= 6 && currentDataArr[1] <= 8) {
- this.cvaliDate = currentDataArr[0] + '-09-01'
- this.onDateConfirm(this.cvaliDate, '6')
- } else {
- this.cvaliDate = dateUtils.formatDate(afterDate.getAfterDays(1), 'yyyy-MM-dd')
- this.onDateConfirm(this.cvaliDate, '6')
- }
- }
+ // if (this.itemProductDTOS.productCode === 'GFRS_M0048' || this.itemProductDTOS.productCode === 'GFRS_M0049' || this.itemProductDTOS.productCode === 'GFRS_M0050') {
+ // //金掌桂学平险产品指定生效日规则调整的申请,学平险+60
+ // this.filterMaxDate = afterDate.getAfterDays(60)
+ // this.userInfo.relationToInsured = ''
+ // this.showField = true
+ // let currentTime = dateUtils.formatDate(new Date(), 'yyyy-MM-dd')
+ // let currentDataArr = currentTime.split('-')
+ // if (currentDataArr[1] >= 6 && currentDataArr[1] <= 8) {
+ // this.cvaliDate = currentDataArr[0] + '-09-01'
+ // this.onDateConfirm(this.cvaliDate, '6')
+ // } else {
+ // this.cvaliDate = dateUtils.formatDate(afterDate.getAfterDays(1), 'yyyy-MM-dd')
+ // this.onDateConfirm(this.cvaliDate, '6')
+ // }
+ // }
//金掌桂无忧卡,少儿安康卡两款卡单产品关闭指定生效日功能,默认自承保之日起第四日零时生效
//GFRS_M0052 国富人寿少儿安康保险产品组合、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')
+ // 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')
+ // //保险期间计算逻辑
+ // 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 少儿安康
+ // if (this.itemProductDTOS.productCode === 'GFRS_M0052') {
+ // this.userInfo.relationToInsured = '3'
+ // //GFRS-2641 保留首次投保、保险期间届满重新投保,默认首次投保
+ // this.showFirstOr = true
+ // //GFRS-2641 被保险人去掉电子邮箱、手机号码字段
+ // this.isLessEighteen = false
+ // }
+ // this.userInfo.homeName = getAreaName([{ code: 450000 }, { code: 450100 }, { code: 450101 }]) //家庭地址
+
+ //GFRS_M0058 团体医疗保险 统一生效时间为投保次月1日0时
+ if (this.itemProductDTOS.productCode === 'GFRS_M0058') {
+ let currentTime = dateUtils.formatDate(new Date(), 'yyyy-MM-dd')
+ this.cvaliDate = afterDate.getNextMonth(currentTime)
//保险期间计算逻辑
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时止'
+ 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 少儿安康
- if (this.itemProductDTOS.productCode === 'GFRS_M0052') {
- this.userInfo.relationToInsured = '3'
- //GFRS-2641 保留首次投保、保险期间届满重新投保,默认首次投保
- this.showFirstOr = true
- //GFRS-2641 被保险人去掉电子邮箱、手机号码字段
- this.isLessEighteen = false
- }
- this.userInfo.homeName = getAreaName([{ code: 450000 }, { code: 450100 }, { code: 450101 }]) //家庭地址
},
mounted() {
// 2516--除万福卡,投保人、被保险人年收入,默认为0,允许修改
if (this.itemProductDTOS.productCode != 'GFRS_M0032') {
this.userInfo.averageAnnualIncome = '0'
}
- // 筛选按钮的点击事件
- window.appCallBack = this.appCallBack
- if (this.itemProductDTOS.productCode === 'GFRS_M0022') {
- this.proScheme = '畅行无忧'
- this.proSchemeCode = ''
- this.allPrice = this.trialList[0].prem
- } else if (this.itemProductDTOS.productCode === 'GFRS_M0052'){
- this.proScheme = this.trialList[0].proScheme,
- this.proSchemeCode = this.trialList[0].proSchemeCode,
- this.chooseKind = this.trialList[0].chooseKind
- this.allPrice = this.trialList[0].prem
- this.now = afterDate.getAfterDays(Number(this.trialList[0].timeliness))
- }else {
- // this.proScheme = this.trialList[0].proScheme
- // this.proSchemeCode = this.trialList[0].proSchemeCode
- // this.allPrice = this.trialList[0].prem
- this.now = afterDate.getAfterDays(Number(this.trialList[0].timeliness))
- }
},
methods: {
//长期状态改变时
@@ -1019,6 +1029,7 @@ export default {
this.chooseKind = value.label
for (let item of this.trialList) {
if (item.proSchemeCode === this.proSchemeCode) {
+ //todo
this.allPrice = item.prem
break
}
@@ -1745,92 +1756,14 @@ export default {
supportBank: '0'
},
appntDTO: this.userInfo,
- insuredDTOs: [this.insuredInfo]
+ // insuredDTOs: [this.insuredInfo]
}
}
- //组装险种提交数据
- let [mainRiskCode, riskDTOLst] = ['', []]
- let rollInResult = '' //校验预计转入保费结果
- this.chooseProducts.forEach((item, index) => {
- console.log('itemssss', item)
- if (item.isMainRisk == 0) {
- mainRiskCode = item.productCode
- }
- let insuYearDate = JSON.parse(localStorage.insuYear)
- let riskItem = {
- cvaliDate: this.cvaliDate,
- isMainRisk: item.isMainRisk,
- riskName: item.riskName,
- riskType: item.riskType,
- riskCode: item.productCode,
- mainRiskCode: mainRiskCode,
- prem: this.allPrice,
- standPrem: this.allPrice,
- predictTransferPrem: item.predictTransferPrem,
- thirdInsuraceNo: this.policyNo,
- mult: this.mult,
- proScheme: this.proScheme,
- proSchemeCode: this.proSchemeCode,
- insuYear: insuYearDate.insuYear,
- insuYearFlag: insuYearDate.insuYearFlag,
- firstOr: this.firstOr,
- medical: this.medical,
- chooseKind: this.chooseKind
- }
- if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') {
- //增加万能险 预计转入保费校验
- rollInResult = this.rollInCheck(item.predictTransferPrem)
- } else {
- rollInResult = true
- }
- //责任险保存参数构建
- if (this.trialList[index].duty) {
- riskItem['dutyLst'] = this.trialList[index].duty
- //930折中方案,责任险分档
- riskItem['amt'] = this.trialList[index].amt
- }
-
- //保费算保额
- if (this.trialList[index].trialType == '1') {
- riskItem['amt'] = this.trialList[index].amt
- }
- //万能型产品保费赋值给保额
- if (this.trialList[index].productCode == 'GFRS_M0003') {
- riskItem['amt'] = this.trialList[index].prem
- }
- // //豁免险保额处理
- // if (item.isRemit == '0') {
- // this.trialInfos[index].amt = this.trialList[0].prem
- // }
- // console.log()
- // riskItem = Object.assign(riskItem, this.trialInfos[index])
-
- riskDTOLst.push(riskItem)
- })
- if (!rollInResult) {
- return
- }
- params.orderDTO.insuredDTOs[0].riskDTOLst = riskDTOLst
-
let resultData = await saveOrUpdateCard(params)
if (resultData.result == 0) {
console.log('resultData.orderNo', resultData.content.object)
- //存储被保人信息
- // let age = utilsAge.getAge(this.userInfo.birthday, new Date())
- // localStorage.saleInsuredInfo = JSON.stringify({
- // birthday: this.userInfo.birthday,
- // name: this.userInfo.name,
- // sex: this.userInfo.sex,
- // idType: this.userInfo.idType,
- // age
- // })
- // this.userInfo.age = age
- // localStorage.saleInsuredInfo = JSON.stringify(this.userInfo)
- // console.log(this.userInfo)
-
let orderNo = (localStorage.orderNo = resultData.content.object)
-
this.underWrite(orderNo)
} else {
console.error(resultData.resultMessage)
diff --git a/src/views/ebiz/cardList/GroupInsuredList.vue b/src/views/ebiz/cardList/GroupInsuredList.vue
index e69de29bb..65365c4e8 100644
--- a/src/views/ebiz/cardList/GroupInsuredList.vue
+++ b/src/views/ebiz/cardList/GroupInsuredList.vue
@@ -0,0 +1,397 @@
+
+
+
+
被保人信息
+
+
+
+
{{ item.relationName }}
+
+
+
+ -
+
+ {{ choose.relationName }}
+
+
姓名: {{ choose.name }}
+
首期总保费(元): {{ choose.totalPrem | moneyFormat }}
+
+ 点击为他/她投保
+
+ 添加
+ 编辑
+ 删除
+
+
+
+
生成建议书
+
+
+
+