diff --git a/src/api/ebiz/common/common.js b/src/api/ebiz/common/common.js index 5cd00508a..d554da983 100644 --- a/src/api/ebiz/common/common.js +++ b/src/api/ebiz/common/common.js @@ -27,6 +27,15 @@ export function trial(data) { }) } +//产品售卖权限校验 +export function productCheck(data) { + return request({ + url: getUrl('/sale/product/check', 1), + method: 'post', + data + }) +} + //订单详情 export function orderDetail(data) { return request({ diff --git a/src/api/ebiz/sale/sale.js b/src/api/ebiz/sale/sale.js index 63f2621fa..458665a0d 100644 --- a/src/api/ebiz/sale/sale.js +++ b/src/api/ebiz/sale/sale.js @@ -222,3 +222,11 @@ export function revokeOrder(data) { data }) } +// 获取产品允许投保人单位列表 +export function getCompany(data) { + return request({ + url: getUrl('/sale/product/company', 1), + method: 'post', + data + }) +} diff --git a/src/assets/js/business-common.js b/src/assets/js/business-common.js index 84c3ee530..67045bc54 100644 --- a/src/assets/js/business-common.js +++ b/src/assets/js/business-common.js @@ -504,6 +504,7 @@ export default { } let age = utilsAge.getAge(appntDTO.birthday, new Date()) localStorage.saleInsuredInfo = JSON.stringify({ + workcompany: appntDTO.workcompany, birthday: appntDTO.birthday, name: appntDTO.name, sex: appntDTO.sex, diff --git a/src/assets/js/utils/age.js b/src/assets/js/utils/age.js index 373a426ee..69eb43fbd 100644 --- a/src/assets/js/utils/age.js +++ b/src/assets/js/utils/age.js @@ -1,12 +1,12 @@ export default { - getAge: function (name, today) { + getAge: function(name, today) { return this.getAgeByValue(name, today) }, - getAgeByBirth: function (value, today) { + getAgeByBirth: function(value, today) { return this.getAgeByValue(value, today) }, - getAgeByValue: function (value, today) { + getAgeByValue: function(value, today) { var b = value.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/) if (b == null) { return null @@ -33,7 +33,7 @@ export default { /** * 取得两个日期的时间差 */ - getDateDiff: function (date1, date2) { + getDateDiff: function(date1, date2) { var dt1, dt2 if (date1 instanceof Date) { dt1 = date1 @@ -45,13 +45,14 @@ export default { } else { dt2 = this.stringToDate(date2) } - return (dt2.getTime() - dt1.getTime()) / (1000 * 3600 * 24) + 1 + return (dt2.getTime() - dt1.getTime()) / (1000 * 3600 * 24) + // return (dt2.getTime() - dt1.getTime()) / (1000 * 3600 * 24) + 1 }, /** * 字符串转日期 */ - stringToDate: function (string) { + stringToDate: function(string) { return new Date(Date.parse(string.replace(/-/g, '/'))) } } diff --git a/src/assets/js/utils/data-dictionary.js b/src/assets/js/utils/data-dictionary.js index da546690b..b0f42d823 100644 --- a/src/assets/js/utils/data-dictionary.js +++ b/src/assets/js/utils/data-dictionary.js @@ -949,6 +949,11 @@ export default { shortName: '两全险', name: '国富人寿安行无忧两全保险', code: 'GFRS_M0023' + }, + { + shortName: '重疾险', + name: '国富人寿桂企保重大疾病保险', + code: 'GFRS_M0024' } ], // 职级 diff --git a/src/views/ebiz/common/CalculatePremium.vue b/src/views/ebiz/common/CalculatePremium.vue index 77ceb1a74..578758999 100644 --- a/src/views/ebiz/common/CalculatePremium.vue +++ b/src/views/ebiz/common/CalculatePremium.vue @@ -63,13 +63,16 @@ @click="toSelect(index, riskFactorIndex, riskFactor.columns)" /> +
{{ riskFactor.name }}
- {{ dutyItem.dutyName }}({{ dutyItem.suffix }}) + {{ dutyItem.dutyName }}({{ dutyItem.suffix }}) + {{ dutyItem.dutyName }}
{ if (item.code == 'payIntv') { for (let key in mainRiskInfo.payIntv) { @@ -1294,7 +1297,6 @@ export default { medical: JSON.parse(localStorage.getItem('saleInsuredPersonInfo')).medical }) params.trialInfos.push(trialInfo) - }) this.trialInfos = params.trialInfos return params @@ -1512,6 +1514,11 @@ export default { riskItem['dutyLst'] = this.trialList[index].duty //930折中方案,责任险分档 riskItem['amt'] = this.trialList[index].amt + } else { + //国富人寿桂企保重大疾病保险产品专写 + if (this.trialList[index].productCode == 'GFRS_M0024') { + riskItem['dutyLst'] = this.trialInfos[index].duty + } } //保费算保额 console.log('this.trialList', this.trialList[index].trialType) @@ -1545,7 +1552,6 @@ export default { } // console.log(riskItem) - console.log(this.trialInfos[index]) riskItem = Object.assign(riskItem, this.trialInfos[index]) // console.log(riskItem) riskDTOLst.push(riskItem) @@ -1554,6 +1560,14 @@ export default { if (!rollInResult) { return } + + //国富人寿桂企保重大疾病保险产品专写 + this.trialInfos.map((v, i) => { + if (v.productCode == 'GFRS_M0024') { + delete riskDTOLst[i].duty + } + }) + // console.log('riskDTOLst', riskDTOLst) //建议书需要添加全部投保人信息,电投只需要投保人ID let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst }) diff --git a/src/views/ebiz/common/MainRiskList.vue b/src/views/ebiz/common/MainRiskList.vue index a99e48afb..517553ce5 100644 --- a/src/views/ebiz/common/MainRiskList.vue +++ b/src/views/ebiz/common/MainRiskList.vue @@ -20,6 +20,8 @@