Compare commits

..

8 Commits

Author SHA1 Message Date
liu.xiaofeng@ebiz-digits.com
676224a7b4 一年期产品责任总保额不想加 2023-09-22 17:11:52 +08:00
liu.xiaofeng@ebiz-digits.com
ce15304cdb 一年期产品基本责任与可选责任保额联动功能编写 2023-09-21 14:58:24 +08:00
liu.xiaofeng@ebiz-digits.com
bd007cdccc feature【GFRS-3784】放开一年期产品责任输入保额的输入框 2023-09-01 14:00:17 +08:00
liu.xiaofeng@ebiz-digits.com
4149903e13 feature【GFRS-3784】一年期产品设置基础责任不可取消勾选代码逻辑 2023-08-23 14:13:11 +08:00
liu.xiaofeng@ebiz-digits.com
e15ccaa279 feature【GFRS-3784】修改保额根据不同被保人信息以及输入的保额数值给出不同的提示语 2023-08-22 16:03:25 +08:00
liu.xiaofeng@ebiz-digits.com
5e5e660a3d 【GFRS-3784】一年期产品的责任根据被保人信息动态设置是否可选代码逻辑 2023-08-16 10:40:16 +08:00
liu.xiaofeng@ebiz-digits.com
dbaa918f30 【GFRS-3784】利益展示页面展示的字段增加单位”元“相关字段的映射 2023-08-14 17:22:59 +08:00
liu.xiaofeng@ebiz-digits.com
cf7427ad1d 【GFRS-3784】保费试算页面 责任步进器 增加判断 产品GFRS_M0077 隐藏输入框
【GFRS-3784】保费试算页面 责任步进器 增加判断 产品GFRS_M0077 根据被保人年龄以及性别设置默认选中得责任判断逻辑
2023-08-14 16:35:17 +08:00
6 changed files with 219 additions and 356 deletions

View File

@@ -3793,6 +3793,26 @@ export default {
{
code: "riskAC_M",
label: "元"
},
{
code: "CardiovascularCerebrovascularDiseasesInsurance",
label: "元"
},
{
code: "childrenSpecificDiseaseInsurance",
label: "元"
},
{
code: "maleSpecificDiseaseInsurance",
label: "元"
},
{
code: "femaleSpecificDiseaseInsurance",
label: "元"
},
{
code: "supplementarySpecificDiseaseInsurance",
label: "元"
}
],
// 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件,

View File

@@ -79,8 +79,7 @@ export default {
riskDTO: {},
productDate: '',
orderInfoDTO:{},
isGroupCard:'',
mainRiskCode: ''
isGroupCard:''
// isLessEighteen: true // 被保人手机号和邮箱默认展示
}
},
@@ -102,11 +101,6 @@ export default {
this.orderInfoDTO = res.orderDTO.orderInfoDTO
this.insuredInfo = res.orderDTO.insuredDTOs
this.insuredInfo.forEach(item => {
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
this.mainRiskCode = ii.mainRiskCode
}
})
item.homeName = getAreaName([{ code: item.homeProvince }, { code: item.homeCity }, { code: item.homeArea }])
})
// this.riskDTO = res.orderDTO.insuredDTOs[0].riskDTOLst[0]
@@ -138,27 +132,13 @@ export default {
},
methods: {
nextStep() {
if(this.mainRiskCode == 'GFRS_M0058'){
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
},
routerInfo: {
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
}
})
})
.catch(() => {
})
}else{
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
@@ -168,7 +148,9 @@ export default {
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
}
})
}
})
.catch(() => {
})
}
}
}

View File

@@ -290,7 +290,6 @@ export default {
accBankProvince: '',
accBankCity: '',
areaStr: '',
mainRiskCode: '',
isGroupCard:'' //1 团险标识
}
},
@@ -311,13 +310,17 @@ export default {
this.bankListName = orderDetail.orderAccountDTO.bankName
this.orderStatus = orderDetail.orderInfoDTO.orderStatus
localStorage.orderNo = orderDetail.orderInfoDTO.orderNo
orderDetail.insuredDTOs.forEach(item=>{
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
this.mainRiskCode = ii.mainRiskCode
}
})
})
// this.radio = '3'
// this.isLoading = true
// this.$toast.loading({
// duration: 0, // 持续展示 toast
// forbidClick: true, // 禁用背景点击
// loadingType: 'spinner',
// message: '加载中……'
// })
// setTimeout(() => {
// this.pay()
// }, 500)
} else {
document.title = '支付分享'
// 再次支付 调详情 获取信息
@@ -510,13 +513,6 @@ export default {
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => {
if (res.result == '0') {
this.insuredDTOs = res.orderDTO.insuredDTOs
res.orderDTO.insuredDTOs.forEach(item=>{
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
this.mainRiskCode = ii.mainRiskCode
}
})
})
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
try {
if (this.noEdit) {
@@ -748,40 +744,6 @@ export default {
let res = await saveOrUpdateAccount(data)
this.$toast.clear()
if (res.result == '0') {
if(this.mainRiskCode == 'GFRS_M0058'){
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
})
.catch(() => {
})
}else{
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
}
} else {
this.$toast(res.resultMessage)
this.isLoading = false
}
} else {
if(this.mainRiskCode == 'GFRS_M0058'){
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
@@ -799,7 +761,32 @@ export default {
})
.catch(() => {
})
}else{
} else {
this.$toast(res.resultMessage)
this.isLoading = false
}
// })
} else {
// if (!flag) {
// let rs = await this.underWrite()
// if (rs.result != '0') {
// this.$toast.clear()
// return this.$toast(rs.resultMessage)
// }
// if (rs.uwResult != '02') {
// return this.$toast(rs.message)
// }
// }
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
@@ -807,8 +794,9 @@ export default {
message: '加载中……'
})
this.acceptInsurance()
}
})
.catch(() => {
})
}
},
// 选择微信支付校验身份证类型

View File

@@ -13,9 +13,9 @@
<van-tag type="primary" v-if="item.isMainRisk == 0" class="mr5 green" plain>主险</van-tag>
<van-tag type="primary" v-else class="mr5 green" plain>附加险</van-tag>
<span class="ml5 center fs13 flex1">{{ item.riskName }}</span>
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8"
></van-tag
>
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk && isEnterAddtionRisk" plain @click="selectAddtionRisk" class="green mr8">
</van-tag>
<van-icon name="search" size="20" v-if="item.documentDTOS && item.documentDTOS.length > 0" @click="seeDocument(index)" class="green mr5" />
<van-icon name="delete" size="22" @click="deleteRisk(index,item)" class="green" />
</div>
@@ -135,10 +135,10 @@
:max="dutyItem.maxDutyAmt"
:show-plus="false"
:show-minus="false"
:disabled="item.productCode == 'GFRS_A0012'"
:disabled="item.productCode == 'GFRS_A0012' || (item.productCode == 'GFRS_M0077' && !dutyItem.necess) || (item.productCode == 'GFRS_M0077' && dutyItem.duty == '311507')"
class="ml10 mr10"
@focus="focusStep"
@blur="blurStep(dutyItem, index)"
@blur="blurStep(dutyItem, index,item.productCode)"
@change="
dutyStepperChange(
item.calFactorLst[riskFactorIndex].rules[dutyItemIndex].defaultDutyAmt,
@@ -747,6 +747,42 @@ export default {
}
})
}
if (item.mainRiskCode == 'GFRS_M0077') {
item.calFactorLst.map((i) => {
if (i.code == 'dutyGroup') {
if(i.rules && i.rules.length != 0) {
i.rules.forEach(ii=>{
if(this.saleInsuredPersonInfo.insuredAge < 18) {
if(ii.duty == '311504'){
ii.necess = true
ii.defaultValue = '0'
} else {
ii.defaultValue = '0'
}
}else{
if(this.saleInsuredPersonInfo.sex == '0'){
if(ii.duty == '311505'){
ii.necess = true
ii.defaultValue = '0'
}
if(ii.duty == '311504' || ii.duty == '311506'){
ii.defaultValue = '0'
}
} else {
if(ii.duty == '311506'){
ii.defaultValue = '0'
ii.necess = true
}
if(ii.duty == '311504' || ii.duty == '311505'){
ii.defaultValue = '0'
}
}
}
})
}
}
})
}
if (item.mainRiskCode == 'GFRS_M0046') {
if (this.saleInsuredPersonInfo.relationToAppnt == 1) {
this.isEnterAddtionRiskListFunc()
@@ -774,25 +810,11 @@ export default {
}
}
// if (item.productCode == 'GFRS_A0003') {
// //该附加险的责任保额=主险的保费
// item.calFactorLst.map(v => {
// if (v.code == 'dutyGroup' && v.rules.length > 0) {
// v.rules.map(y => {
// if (y.defaultDutyAmt === null) {
// y.defaultDutyAmt = (JSON.parse(localStorage.trialList)[0].prem / 10000).toFixed(6)
// }
// y.moneyUnit = 10000
// y.changeWithMainRisk = true //责任险保额=主险保费,不允许用户手动更改
// })
// }
// })
// }
//保存主险险种编号
if (item.isMainRisk == 0) {
this.mainRiskCode = item.mainRiskCode
}
})
//保存主险险种编号
if (item.isMainRisk == 0) {
this.mainRiskCode = item.mainRiskCode
}
})
if (this.mainRiskCode == 'GFRS_M0005') {
this.chooseProducts.map((item) => {
if (item.productCode == 'GFRS_A0004') {
@@ -850,91 +872,6 @@ export default {
rules.forEach((item) => {
let config = ''
config = JSON.parse(item.ruleExpression)
// let errorMsg = item.errorMsg;
// config = {
// eventName: 'GFRS_M0020_payEndYear_insuYear',
// eventType: 'onConfirm',
// funBody: [
// 'let ageMap = {',
// ' "10Y":{"30Y": 55,"70A": 55,"88A": 55},',
// ' "20Y":{ "30Y": 55, "70A": 50, "88A": 55 }, ',
// ' "30Y":{ "30Y": 45, "70A": 40, "88A": 45 },',
// '};',
// 'let payEndYear = "";',
// 'let insuYear = "";',
// 'let age = this.saleInsuredPersonInfo.insuredAge;',
// 'let parObj = {};',
// 'par.map(item => {',
// ' parObj[item.code] = item;',
// '});',
// 'if(ParKey == "payEndYear"){',
// ' payEndYear = Par.value + Par.flag;',
// ' lintAgeObj = ageMap[payEndYear];',
// ' let flag = true, num = parObj.insuYear.columns.length;',
// ' parObj.insuYear.columns.forEach(item => {',
// ' let lintAge = lintAgeObj[ item.value + item.flag ];',
// ' if( age > lintAge ){',
// ' item.disabled = true;',
// ' num = num - 1 ;',
// ' }else{',
// ' if(flag){',
// ' parObj.insuYear.insuYear = item.value;',
// ' parObj.insuYear.insuYearFlag = item.flag;',
// ' parObj.insuYear.showContent = item.text;',
// ' flag = false;',
// ' };',
// ' item.disabled = false;',
// ' };',
// ' });',
// ' if(!num){',
// ' this.errorMsg.push("被保险人年龄不符合当前所选交费期间");',
// ' payEndYear = parObj.payEndYear.payEndYear + parObj.payEndYear.payEndYearFlag;',
// ' lintAgeObj = ageMap[payEndYear];',
// ' parObj.insuYear.columns.forEach(item => {',
// ' let lintAge = lintAgeObj[ item.value + item.flag ];',
// ' if( age > lintAge ){',
// ' item.disabled = true;',
// ' }else{',
// ' item.disabled = false;',
// ' };',
// ' });',
// ' return false;',
// ' };',
// ' return true;',
// '}'],
// funPar: ['par','ParKey','Par'],
// }
// config = {
// eventName: 'GFRS_A0003_noMainCode',
// eventType: 'init',
// initBody: [
// 'for(let item of that.chooseProducts){',
// ' if(item.productCode == "GFRS_A0003"){',
// ' for(let itemC of item.calFactorLst){',
// ' if(itemC.code == "dutyGroup"){',
// ' for(let itemR of itemC.rules){',
// ' that.$emit("GFRS_A0003_noMainCode", itemR, that.mainRiskCode)',
// ' }',
// ' }',
// ' }',
// ' }',
// ' }',
// ],
// funBody: [
// 'let noMainCode = {',
// ' "GFRS_M0004" : true,',
// ' "GFRS_M0011" : true',
// '};',
// 'let noduty = {',
// ' "310101" : true',
// '};',
// 'if(noMainCode[mainRiskCode] && noduty[dutyItem.duty]){',
// ' dutyItem.necess = false;',
// ' dutyItem.isDisabled = true;',
// '}',
// ],
// funPar:['dutyItem', 'mainRiskCode'],
// }
this.$on(config.eventName, new Function(...config.funPar, config.funBody.join('')))
if (config.eventType == 'init') {
let initFn = new Function('that', config.initBody.join(''))
@@ -1250,6 +1187,23 @@ export default {
})
}
}
if (validateRiskCode === 'GFRS_M0077'){
if(dutyItem.duty == '311507' && dutyItem.necess){
this.chooseProducts.forEach(item => {
item.calFactorLst.map((i) => {
if (i.code == 'dutyGroup') {
if(i.rules && i.rules.length != 0) {
i.rules.forEach(ii=>{
if(ii.duty != '311507' && ii.necess){
dutyItem.defaultDutyAmt = ii.defaultDutyAmt
}
})
}
}
})
})
}
}
this.valiAndSend(dutyItem, productIndex)
},
valiAndSend(dutyItem, productIndex) {
@@ -1279,15 +1233,31 @@ export default {
focusStep() {
this.nextStepFlag = true
},
blurStep(dutyItem, productIndex) {
blurStep(dutyItem, productIndex, productCode) {
this.nextStepFlag = false
//失去焦点时做验证
if (dutyItem.necess) {
//勾选时才做验证
this.valiAndSend(dutyItem, productIndex)
}
},
//失去焦点时做验证
if (dutyItem.necess) {
//勾选时才做验证
this.valiAndSend(dutyItem, productIndex)
}
if(productCode == 'GFRS_M0077'){
this.chooseProducts.forEach(item => {
if (item.mainRiskCode == 'GFRS_M0077') {
item.calFactorLst.map((i) => {
if (i.code == 'dutyGroup') {
if(i.rules && i.rules.length != 0) {
i.rules.forEach(ii=>{
if(ii.duty == '311507' && ii.necess){
ii.defaultDutyAmt = dutyItem.defaultDutyAmt
}
})
}
}
})
}
})
}
},
//险种GFRS_M0016\GFRS_M0070的责任的验证规则
valiDuty(value, duty) {
if (this.mainRiskCode === 'GFRS_M0016') {
@@ -2650,6 +2620,42 @@ export default {
this.getTrial()
}
}
else if (productCode == 'GFRS_M0076') {
if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) {
//使用rules规则里的第二条控制保额份数
// 年龄在51周岁及以上被保险人投保本险种时最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[1].maxPrem) * 10000) +'元。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast('51周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[1].maxPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
//年龄在0-50周岁被保险人投保本险种时最低基本保险金额为50000元超过最低基本保险金额为10000元整数倍。
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 50) {
//使用rules规则里的第一条控制保额份数
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast('出生满 28 天至 50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[0].maxPrem) * 10000) +'元。')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
this.$toast('出生满 28 天至 50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元,最高投保金额为'+ (Number(riskFactor.rules[0].maxPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
}
else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
if (Number(defalutValue) < Number(min)) {
if (riskFactor.yearWay == "一次性交清") {
@@ -2809,6 +2815,7 @@ export default {
this.trialList[index].productCode == 'GFRS_M0051' ||
this.trialList[index].productCode == 'GFRS_M0054' ||
this.trialList[index].productCode == 'GFRS_M0073' ||
this.trialList[index].productCode == 'GFRS_M0077' ||
this.trialList[index].productCode == 'GFRS_M0057'
) {
riskItem['dutyLst'] = this.trialInfos[index].duty
@@ -2845,7 +2852,7 @@ export default {
this.trialInfos[index].amt = this.trialList[index].amt
}
// GFRS_A0009,GFRS_A0010 这两款时,责任保额不相加
if(item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0013'|| item.productCode == 'GFRS_A0014'){
if(item.productCode == 'GFRS_A0009' || item.productCode == 'GFRS_A0010' || item.productCode == 'GFRS_A0013'|| item.productCode == 'GFRS_A0014' || item.productCode == 'GFRS_M0077'){
this.trialInfos[index].amt = this.trialList[index].duty[0].amt
}
// GFRS_A0011-附加两全 属于非豁免险 但附加两全保额=主险年交保费+其他不带豁免责任的长期期交附加险年交保费
@@ -2871,7 +2878,7 @@ export default {
//国富人寿桂企保重大疾病保险产品专写
this.trialInfos.map((v, i) => {
if (v.productCode == 'GFRS_M0024' || v.productCode == 'GFRS_M0040' || v.productCode == 'GFRS_M0044'
|| v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073') {
|| v.productCode == 'GFRS_M0046'|| v.productCode == 'GFRS_M0051'|| v.productCode == 'GFRS_M0057' || v.productCode == 'GFRS_M0073'|| v.productCode == 'GFRS_M0077') {
delete riskDTOLst[i].duty
}
})

View File

@@ -4,12 +4,11 @@
</div>
</template>
<script>
import { makePdf, share, getDemo } from '@/api/ebiz/proposal/proposal.js'
import { makePdf, share } from '@/api/ebiz/proposal/proposal.js'
import { Toast } from 'vant'
import config from '@/config'
import dataDictionary from '@/assets/js/utils/data-dictionary' //使用数据字典中的险种类型
import { weixinShare } from '@/assets/js/utils/wxShare.js'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
import { queryPersonal } from '@/api/ebiz/laurelClub/laurelClub'
export default {
data() {
@@ -17,8 +16,7 @@ export default {
return {
pdfUrl: '',
isWeixin,
title: '',
agent:{}
title: ''
}
},
components: {
@@ -33,7 +31,7 @@ export default {
this.init()
}
},
async mounted() {
mounted() {
let riskCode = localStorage.pdfShareCode
dataDictionary.riskType.some(item => {
if (item.code == riskCode) {
@@ -41,78 +39,10 @@ export default {
return true
}
})
if(this.$route.query.proposalOrderNo){
let params = {
proposalInfoDTO: {
proposalNo: this.$route.query.proposalOrderNo
}
}
let res = await getDemo(params)
if(res.result == 0){
let mainRiskNameList = []
res.content.orderDTO.insuredDTOs.forEach(item => {
item.riskDTOLst.forEach(item01 => {
if (item01.isMainRisk == '0') {
mainRiskNameList.push(item01.riskName)
}
})
})
// 一、单个被保险人
// 1、1个主险含附加险的情况直接显示“主险产品名称”
// 2、有2个及以上主险组合建议书名称显示“保险产品组合计划”
// 二、有多个被保险人
// 都显示“家庭保障计划”
if(mainRiskNameList.length == 1){
if (res.content.orderDTO.insuredDTOs.length > 1) {
this.title = '家庭保障计划'
} else {
this.title = mainRiskNameList[0]
}
}else{
if (res.content.orderDTO.insuredDTOs.length > 1) {
this.title = '家庭保障计划'
} else {
this.title = '保险产品组合计划'
}
}
}
}
let agentResult = await getAgentInfo({}) //调取代理人查询接口
if (agentResult.result == '0'){
let { agent } = this
let { name } = agentResult
agent.name = name
}
let date = new Date()
let month = date.getMonth() + 1
if (month <= 9) {
month = '0' + month
}
let reqData = {
mdType: 'm',
monthStr:date.getFullYear() + month
}
let shareContent;
let resData = await queryPersonal(reqData)
if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade) {
if(resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
}
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
let sgrade =this.memberConversion(resData.content[0].sgrade);
shareContent='国富双冠精英'+resData.content[0].slevel+'级'+sgrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
let ggrade =this.memberConversion(resData.content[0].ggrade);
shareContent='国富桂冠精英'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
} else {
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
}
weixinShare({
title: this.title,
imgUrl: this.$assetsUrl + 'images/logo.png',
desc: shareContent
desc: '国富为您量身定制的保险产品,请查收'
})
//重置左上角按钮,变成返回
window.EWebBridge.webCallAppInJs("webview_left_button",{
@@ -179,15 +109,10 @@ export default {
if(resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
}
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
let sgrade =this.memberConversion(resData.content[0].sgrade);
shareContent='国富双冠精英'+resData.content[0].slevel+'级'+sgrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
let ggrade =this.memberConversion(resData.content[0].ggrade);
shareContent='国富桂冠精英'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品请查收';
shareContent='国富桂冠人力'+resData.content[0].glevel+''+ggrade+resData.content[0].name+'为您量身定制的保险产品请查收';
} else {
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
shareContent='国富为您量身定制的保险产品,请查收';
}
if (data.trigger == 'right_button_click') {
// eslint-disable-next-line no-undef

View File

@@ -4,7 +4,7 @@
<div>
<div class="mb50">
<img class="w178 h41 div_1" src="@/assets/images/proposal/proposal_logo.png" />
<div class="white fw500 fs18 div_2">{{mainRiskName}}</div>
<div class="white fw500 fs18 div_2">家庭保障计划</div>
<van-sticky @scroll="testSticky">
<div class="pl15 pt15 flex justify-content-fs align-items-c sticky_div" :class="pageShowType.isFixed ? 'divbg_1' : 'divbg_2'">
<div class="mr9 title_item" v-for="(item, index) in pageShowInfo.insuredDTOs" :key="index" @click="checkInsure(item.insuredId)">
@@ -283,7 +283,7 @@
</div>
<div class="div_02">
<div class="text-center div_021">
<div class="text-center div_022">{{mainRiskName}}</div>
<div class="text-center div_022">家庭保障计划</div>
<!-- 如果没有姓名的话根据性别展示男士或女士 -->
<div class="text-center div_023">尊敬的<span v-if="pageShowInfo.appntDTO.name">{{ pageShowInfo.appntDTO.name.substr(0, 1) }}</span>{{ pageShowInfo.appntDTO.sex == '0' ? '先生' : '女士' }}</div>
</div>
@@ -386,7 +386,6 @@ export default {
mainRiskCodes: [],
time: 5,
proposalNo:'',
mainRiskName: ''
}
},
filters: {
@@ -449,7 +448,6 @@ export default {
})
}, 1000)
window['appCallBack'] = this.appCallBack*/
// init方法在微信端存储token接口请求用此token所以init方法前不要请求接口会影响分享微信功能接口会报token为空
this.init()
//校验当前用户权限
funcPermCheck({}).then(res => {
@@ -609,7 +607,7 @@ export default {
}
},
async sharePeople() {
console.log(this.pageShowInfo.insuredDTOs,'this.pageShowInfo.insuredDTOs')
console.log(this.agent,'this.agent.name')
let date = new Date()
let month = date.getMonth() + 1
if (month <= 9) {
@@ -621,34 +619,25 @@ export default {
}
let shareContent;
let resData = await queryPersonal(reqData)
// debugger
//准会员话术改为普通人话术
if(resData.content.length&&resData.content[0].slevel<3){
resData.content[0].sgrade='00'
}
if(resData.content.length&&resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
// if(resData.content[0].slevel<3){
// resData.content[0].sgrade='00'
// }
if(resData.content[0].slevel<3){
resData.content[0].sgrade='00'
}
let sgrade =this.memberConversion(resData.content[0].sgrade);
shareContent='国富双冠精英'+resData.content[0].slevel+''+sgrade+resData.content[0].name+'为您量身定制的保险产品请查收';
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
// if(resData.content[0].glevel<3){
// resData.content[0].ggrade='00'
// }
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&!resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
if(resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
let ggrade =this.memberConversion(resData.content[0].ggrade);
shareContent='国富桂冠精英'+resData.content[0].glevel+''+ggrade+resData.content[0].name+'为您量身定制的保险产品请查收';
} else {
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
shareContent = this.agent.name+'为您设计的专属保险计划书请查阅因为国富所以民安';
}
console.log(shareContent,'shareContent')
let title
let riskList = [] //所有险种
let riskCodeList = [] //所有险种code
this.pageShowInfo.insuredDTOs.map(item => {
this.pageShowInfo.insuredDTOs.map(item => {
item.mainRisk.map(item01 => {
if (item01.isMainRisk == '0') { //主险
riskList.push(item01)
@@ -659,23 +648,11 @@ export default {
riskCodeList.push(item.riskCode)
})
let sameRisk = isAllEqual(riskCodeList)
// 一、单个被保险人
// 1、1个主险含附加险的情况直接显示“主险产品名称”
// 2、有2个及以上主险组合建议书名称显示“保险产品组合计划”
// 二、有多个被保险人
// 都显示“家庭保障计划”
// 以主险为单位,一个主险,显示主险名称。 多个主险,显示“家庭综合保障计划”,跟被保人人数无关
if(sameRisk){
if(this.pageShowInfo.insuredDTOs.length > 1){
title='家庭保障计划'
}else{
title= riskList[0].riskName
}
title= riskList[0].riskName
}else{
if(this.pageShowInfo.insuredDTOs.length > 1){
title='家庭保障计划'
}else{
title= '保险产品组合计划'
}
title='家庭综合保障计划'
}
let res = await getSharingToken({ shareType: 'proposal_demonstrate' })
if (res.result == '0') {
@@ -725,32 +702,6 @@ export default {
this.pageShowInfo.appntDTO = res.content.orderDTO.appntDTO
this.pageShowInfo.insuredDTOs = res.content.orderDTO.insuredDTOs
this.pageShowInfo.showInsuredDTO = this.pageShowInfo.insuredDTOs[0]
let mainRiskNameList = []
that.pageShowInfo.insuredDTOs.forEach(item => {
item.riskDTOLst.forEach(item01 => {
if (item01.isMainRisk == '0') {
mainRiskNameList.push(item01.riskName)
}
})
})
// 一、单个被保险人
// 1、1个主险含附加险的情况直接显示“主险产品名称”
// 2、有2个及以上主险组合建议书名称显示“保险产品组合计划”
// 二、有多个被保险人
// 都显示“家庭保障计划”
if(mainRiskNameList.length == 1){
if (this.pageShowInfo.insuredDTOs.length > 1) {
that.mainRiskName = '家庭保障计划'
} else {
that.mainRiskName = mainRiskNameList[0]
}
}else{
if (this.pageShowInfo.insuredDTOs.length > 1) {
that.mainRiskName = '家庭保障计划'
} else {
that.mainRiskName = '保险产品组合计划'
}
}
//投保人年龄
// this.pageShowInfo.appntDTO.age = getAge.getAge(this.pageShowInfo.appntDTO.birthdayLabel, new Date())
let { insuredLabelResult, insuredResult, insuredInfoResult } = res.content.calculusResDTO
@@ -940,17 +891,7 @@ export default {
},
//跳转到pdf 进入建议书后 根据建议书编码来查找相应的pdf
async goPDF() {
if(this.$route.query.proposalOrderNo){
this.$router.push({
path: '/proposal/pdf',
query: {
proposalOrderNo:this.$route.query.proposalOrderNo
}
})
}else{
this.$router.push({ path: '/proposal/pdf' })
}
this.$router.push({ path: '/proposal/pdf' })
// this.$jump({
// flag: 'h5',
// extra: {