Merge branch 'feature/GFRS-502_【0206】国富人寿富娃娃两全保险(万能型)' into release/【0210】

# Conflicts:
#	src/views/ebiz/common/CalculatePremium.vue
This commit is contained in:
yuweiqi
2020-02-10 17:26:11 +08:00
14 changed files with 506 additions and 153 deletions

View File

@@ -27,3 +27,12 @@ export function getPosterInfo(data) {
data
})
}
// 获取分享图片
export function shareUrl(data) {
return request({
url: getUrl('/media/pster/shareUrl', 1),
method: 'post',
data
})
}

View File

@@ -22,6 +22,8 @@ const backShow = () => import('@/views/ebiz/sale/BackShow')
const Test = () => import('@/views/ebiz/sale/test')
const detail = () => import('@/views/ebiz/sale/Detail')
const productTip = () => import('@/views/ebiz/sale/productTip')
let riskName = localStorage.riskName
console.log('sale/riskName==', riskName)
export default [
{
path: '/sale/list',
@@ -137,7 +139,7 @@ export default [
name: 'productTip',
component: productTip,
meta: {
title: '金管家养老年金保险(万能型)产品说明书'
title: `${riskName}产品说明书`
}
},
{

View File

@@ -73,6 +73,9 @@ export default {
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
if (resultData.result == 0) {
resultData = resultData.trialDTOS[0]
localStorage.isAutoPay = localStorage.isAutoPay == '0' ? '0' : resultData.isAutoPay //自动垫交
localStorage.isRenew = localStorage.isRenew == '0' ? '0' : resultData.isRenew //自动续保
localStorage.isForceRenew = localStorage.isForceRenew == '0' ? '0' : resultData.isForceRenew //自动续保默认是否选中 0-是 1-否
/********start 附加险选择限制 start******/
//豁免险与其他附加险年龄险种
if (resultData.productTrialInfoDTO.isRemit == '0' && resultData.productTrialInfoDTO.remitType == '0') {

View File

@@ -18,15 +18,17 @@
<van-icon name="delete" size="22" @click="deleteRisk(index)" class="green" />
</div>
<!-- 险种条件-->
<div v-if="item.isRemit == 1">
<div v-if="(item.isRemit == 1 && isTrial == '1') || (item.isRemit == 1 && isTrial != '1' && item.isMainRisk == 1)">
<!-- <div v-if="item.isRemit == 1 && isTrial == '1'"> -->
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
<div class="flex justify-content-s pv10 border-bottom" v-if="riskFactor.type == 1">
<div class="flex align-items-c">
<span v-if="riskFactor.suffix" class="fs14">{{ riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
<span v-else class="fs14">{{ riskFactor.name }} &nbsp;&nbsp; &nbsp;&nbsp;</span>
<!-- {{riskFactorIndex}} -->
<!-- {{defalutAmt}} -->
<van-stepper
v-model="defalutAmt"
v-model="item.calFactorLst[riskFactorIndex].displayAmount"
:min="riskFactor.minAmt || riskFactor.minPrem"
:max="riskFactor.maxAmt || riskFactor.maxPrem"
:show-plus="false"
@@ -34,7 +36,7 @@
class="ml30"
@change="
stepperChange(
item.calFactorLst[riskFactorIndex].defaultValue,
item.calFactorLst[riskFactorIndex].displayAmount,
index,
riskFactorIndex,
riskFactor.minAmt || riskFactor.minPrem,
@@ -102,6 +104,93 @@
</div>
</div>
</div>
<!-- 为富娃娃两全保险万能型专写 -->
<div v-if="item.isRemit == 1 && isTrial != '1' && item.isMainRisk == 0">
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
<div class="flex justify-content-s pv10 border-bottom" v-if="riskFactor.type == 1">
<div class="flex align-items-c">
<span v-if="item.productTrialYearDTOS[payEndYearColumnsIndex].suffix" class="fs14">{{
riskFactor.name + '(' + item.productTrialYearDTOS[payEndYearColumnsIndex]['suffix'] + ')'
}}</span>
<span v-else class="fs14">{{ riskFactor.name }} &nbsp;&nbsp; &nbsp;&nbsp;</span>
<van-stepper
v-model="item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount"
:min="item.productTrialYearDTOS[payEndYearColumnsIndex].minAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].minPrem"
:max="item.productTrialYearDTOS[payEndYearColumnsIndex].maxAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].maxPrem"
:show-plus="false"
:show-minus="false"
class="ml30"
@change="
stepperChange(
item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount,
index,
riskFactorIndex,
item.productTrialYearDTOS[payEndYearColumnsIndex].minAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].minPrem,
item.productTrialYearDTOS[payEndYearColumnsIndex].maxAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].maxPrem,
item.productTrialYearDTOS[payEndYearColumnsIndex]
)
"
input-width="100"
:integer="false"
/>
</div>
</div>
<div
class="flex justify-content-s pv10 border-bottom"
v-if="riskFactor.type == 0"
:class="{ hidden: riskFactor.code == 'payEndYear' && item.isHidden }"
>
<van-field
v-model="riskFactor.showContent"
readonly
:label="riskFactor.name"
right-icon="arrow"
placeholder="请选择"
@click="toSelect(index, riskFactorIndex, riskFactor.columns)"
/>
</div>
<div class="border-bottom" v-if="riskFactor.type == 3">
<div class="pv12 border-bd">{{ riskFactor.name }}</div>
<div class="duty">
<div class="flex justify-content-s border-bd pv10 align-items-c" v-for="(dutyItem, dutyItemIndex) in riskFactor.rules" :key="dutyItemIndex">
<span class="fs14 w100">{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span>
<div class="flex">
<van-stepper
v-model="dutyItem.defaultDutyAmt"
:min="dutyItem.minDutyAmt"
:max="dutyItem.maxDutyAmt"
:show-plus="false"
:show-minus="false"
class="ml10 mr10"
@focus="focusStep"
@blur="blurStep"
@change="
dutyStepperChange(
item.calFactorLst[riskFactorIndex].rules[dutyItemIndex].defaultDutyAmt,
index,
riskFactorIndex,
dutyItemIndex,
dutyItem.necess,
dutyItem.minDutyAmt,
dutyItem.maxDutyAmt
)
"
input-width="200"
:integer="false"
/>
<van-checkbox
v-model="dutyItem.necess"
:disabled="dutyItem.defaultValue == '0'"
shape="square"
@change="changeChecked(index, riskFactorIndex, dutyItemIndex)"
></van-checkbox>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 豁免险条件 -->
<div v-if="item.isRemit == 0">
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
@@ -121,10 +210,10 @@
<div class="flex justify-content-s pv10 border-bottom prem">
<span
style="font-weight:bold"
v-if="(trialList.length > 0 && trialList[index].trialType == 0) || (trialList.length > 0 && trialList[index].trialType == 2)"
>首期保费(</span
v-if="(trialList.length > 0 && trialList[index].trialType == 0) || (trialList.length > 0 && trialList[index].trialType == 2) || isTrial === '0'"
>首期保费</span
>
<span style="font-weight:bold" v-else>保额(</span>
<span style="font-weight:bold" v-else>保额</span>
<span class="fee red" v-if="trialList && trialList.length > 0">{{ trialList[index].prem.toFixed(2) | moneyFormat }}</span>
</div>
</div>
@@ -182,7 +271,11 @@ export default {
mult: '',
isFrom: '',
// 默认钱数
defalutAmt: ''
defalutAmt: '',
//是否需存在特殊配置 0-是 1-否
isTrial: localStorage.isTrial,
//缴费期间对应index索引
payEndYearColumnsIndex: 0
}
},
mounted() {
@@ -220,16 +313,14 @@ export default {
}
if (item.mainRiskCode != 'GFRS_M0008') {
item.calFactorLst.map(i => {
this.defalutAmt = i.displayAmount || 1
console.log(i.displayAmount)
console.log(i.defaultValue)
// this.defalutAmt = i.displayAmount || 1
// console.log('i.displayAmount ==', i.displayAmount)
// console.log('i.defaultValue ==', i.defaultValue)
this.mult = Number(i.displayAmount) / Number(i.defaultValue)
})
}
})
// this.influenceAddRiskCodes
if (this.chooseProducts[0].influences && this.chooseProducts[0].influences.length > 0) {
this.influences = this.chooseProducts[0].influences
this.chooseProducts[0].influences.forEach(item => {
@@ -238,7 +329,6 @@ export default {
}
this.mainRiskInfluenceAddRisk()
//初始化数据试算
this.getTrial()
},
@@ -258,7 +348,7 @@ export default {
// this.$toast(localStorage.hint)
} else {
// this.mainRiskInfluenceAddRisk()
// currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
// currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
// this.getTrial()
if (isChecked) {
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
@@ -278,9 +368,11 @@ export default {
}
}
},
// blur(value) {
// console.log('哈哈哈',value)
// },
//弹框选择
toSelect(index, index1, columns) {
console.log(index, index1, columns)
;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, index, index1]
this.columns = columns
},
@@ -297,6 +389,18 @@ export default {
console.log('value', value)
console.log('currentFactor', currentFactor)
console.log('currentEle', currentEle)
//特殊设置:如果需要填写的保费/保额校验规则跟缴费期间挂钩当改变缴费期间时将输入框的值恢复默认值1
if (currentEle.code == 'payEndYear' && this.isTrial == '0') {
currentEle['columns'].forEach((item, index) => {
if (item.value == value.value) {
this.payEndYearColumnsIndex = index
}
})
this.defalutAmt = 1
}
console.log('payEndYearColumnsIndex == ', this.payEndYearColumnsIndex)
if (currentEle.showContent != value.text) {
//通用规则校验
if (this.payExceedInsured(currentEle, currentFactor, value.value)) {
@@ -605,6 +709,7 @@ export default {
path: '/common/selectedProduct'
}
})
localStorage.trialList = ''
} else {
this.chooseProducts.splice(index, 1)
}
@@ -653,14 +758,17 @@ export default {
}
} else if (factor.type == 1) {
if (factor.code == 'inputPrem') {
trialInfo['prem'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
trialInfo['prem'] =
this.isTrial == '0'
? Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].displayAmount) *
Number(item.productTrialYearDTOS[this.payEndYearColumnsIndex].moneyUnit)
: Number(factor.displayAmount) * Number(factor.moneyUnit)
} else {
if (item.isRemit == 0) {
trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit)
trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit)
} else {
trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
trialInfo['amt'] = Number(factor.displayAmount) * Number(factor.moneyUnit)
}
// trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
}
} else if (factor.type == 2) {
trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code]
@@ -683,6 +791,7 @@ export default {
console.log('trialInfo == ', trialInfo)
//通用规则1交费方式为一次交情无交费期限
if (trialInfo['payIntv'] == '0') {
console.log(11111)
trialInfo['payEndYear'] = '1000'
trialInfo['payEndYearFlag'] = 'Y'
// 福宝宝和万能险传A
@@ -747,69 +856,103 @@ export default {
console.log(defalutValue, productIndex, calFactorIndex, min, max)
console.log(this.saleInsuredPersonInfo.age)
console.log(riskFactor)
console.log(JSON.parse(localStorage.trialList)[0].productCode)
// debugger
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
let currentEle =
localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'
? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex]
: this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
//改动原因:孝心保产品有对年龄的特殊要求
//添加判断,是否是孝心保产品
if (JSON.parse(localStorage.trialList)[0].productCode == 'GFRS_M0014') {
let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode
if (productCode == 'GFRS_M0014') {
//被保人年龄如果在50-65区间
if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) {
//使用rules规则里的第二条控制保额份数
if (Number(this.defalutAmt) < Number(riskFactor.rules[1].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[1].maxPrem)) {
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
//被保人年龄如果在66-75之间
} else if (this.saleInsuredPersonInfo.age >= 66 && this.saleInsuredPersonInfo.age <= 75) {
//使用rules规则里的第一条控制保额份数
if (Number(this.defalutAmt) < Number(riskFactor.rules[0].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[0].maxPrem)) {
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
if (Number(defalutValue) < Number(min)) {
console.log('校验 == ', Number(defalutValue), Number(min), Number(min) * Number(riskFactor.moneyUnit))
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}`)
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
this.$toast(`超过最低保费部分金额需为1000元整数倍`)
this.nextStepFlag = true
} else {
this.nextStepFlag = false
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(riskFactor.moneyUnit)
this.getTrial()
}
}
//其他产品按照原先的逻辑判断
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '1') {
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
this.$toast('投保本险种最低基本保险金额为10000元超过最低基本保险金额为1000元整数倍')
this.nextStepFlag = true
} else {
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// defalutValue = currentEle.rules[productIndex].displayAmount
this.$toast('投保本险种最低基本保险金额为10000元超过最低基本保险金额为1000元整数倍')
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
} else {
if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) {
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
// defalutValue = currentEle.rules[productIndex].displayAmount
this.$toast(localStorage.hint)
this.nextStepFlag = true
} else {
this.mainRiskInfluenceAddRisk()
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
this.getTrial()
}
}
}
// let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex]
// currentEle.defaultValue = value
// defalutValue = value
console.log('进来几次')
this.mult = Number(this.defalutAmt) / Number(defalutValue)
this.mult = Number(defalutValue) / Number(defalutValue)
},
//下一步
async nextStep() {
@@ -817,65 +960,67 @@ export default {
let [mainRiskCode, riskDTOLst] = ['', []]
let rollInResult = '' //校验预计转入保费结果
this.chooseProducts.forEach((item, index) => {
if (item.isMainRisk == 0) {
mainRiskCode = item.productCode
}
// this.trialInfos.map(trial=>{
// trial.duty.map(dutylist=> {
// dutylist.dutyname
// })
// })
let riskItem = {
isMainRisk: item.isMainRisk,
riskName: item.riskName,
riskType: item.riskType,
riskCode: item.productCode,
mainRiskCode: mainRiskCode,
prem: this.trialList[index] && this.trialList[index].prem,
standPrem: this.trialList[index] && this.trialList[index].standPrem,
predictTransferPrem: item.predictTransferPrem,
thirdInsuraceNo: this.policyNo,
mult: this.mult
}
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
}
//保费算保额
console.log('this.trialList', this.trialList[index].trialType)
// debugger
if (this.trialList[index].trialType == '1' || this.trialList[index].trialType == '2') {
// console.log('11111111111111111')
// console.log(this.trialList[index].amt)
riskItem['amt'] = this.trialList[index].amt
}
// console.log(riskItem)
//万能型产品保费赋值给保额
//增加判断是否是从建议书跳转过来了的
if (localStorage.isFrom != 'proposal') {
if (this.trialList[index].productCode == 'GFRS_M0003') {
// console.log('2222222222')
riskItem['amt'] = this.trialList[index].prem
if (localStorage.trialList != '') {
if (item.isMainRisk == 0) {
mainRiskCode = item.productCode
}
// this.trialInfos.map(trial=>{
// trial.duty.map(dutylist=> {
// dutylist.dutyname
// })
// })
let riskItem = {
isMainRisk: item.isMainRisk,
riskName: item.riskName,
riskType: item.riskType,
riskCode: item.productCode,
mainRiskCode: mainRiskCode,
prem: this.trialList[index] && this.trialList[index].prem,
standPrem: this.trialList[index] && this.trialList[index].standPrem,
predictTransferPrem: item.predictTransferPrem,
thirdInsuraceNo: this.policyNo,
mult: this.mult
}
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
}
//保费算保额
console.log('this.trialList', this.trialList[index].trialType)
// debugger
if (this.trialList[index].trialType == '1' || this.trialList[index].trialType == '2') {
// console.log('11111111111111111')
// console.log(this.trialList[index].amt)
riskItem['amt'] = this.trialList[index].amt
}
// console.log(riskItem)
//万能型产品保费赋值给保额
//增加判断是否是从建议书跳转过来了的
if (localStorage.isFrom != 'proposal') {
if (this.trialList[index].productCode == 'GFRS_M0003' || this.trialList[index].productCode == 'GFRS_M0015') {
riskItem['amt'] = this.trialList[index].prem
}
}
//豁免险保额处理
if (item.isRemit == '0') {
// console.log('33333333')
this.trialInfos[index].amt = this.trialList[0].prem
}
// console.log(riskItem)
console.log(this.trialInfos[index])
riskItem = Object.assign(riskItem, this.trialInfos[index])
// console.log(riskItem)
riskDTOLst.push(riskItem)
}
//豁免险保额处理
if (item.isRemit == '0') {
// console.log('33333333')
this.trialInfos[index].amt = this.trialList[0].prem
}
// console.log(riskItem)
console.log(this.trialInfos[index])
riskItem = Object.assign(riskItem, this.trialInfos[index])
// console.log(riskItem)
riskDTOLst.push(riskItem)
})
if (!rollInResult) {
return

View File

@@ -94,10 +94,12 @@ export default {
},
//储存主险
async addMainRisk() {
localStorage.setItem('isTrial', '1')
let riskProductCode = this.result.riskProductCode
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
if (resultData.result == 0) {
resultData = resultData.trialDTOS[0]
localStorage.isTrial = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? '0' : '1'
localStorage.hint = resultData.hint
if (resultData.productTrialInfoDTO.dutyGroup != null) {
resultData.productTrialInfoDTO.dutyGroup.map(item => {
@@ -132,26 +134,44 @@ export default {
//保存附加险
localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst)
// console.log('resultData', resultData)
localStorage.isAutoPay = resultData.isAutoPay
localStorage.isRenew = resultData.isRenew
localStorage.isForceRenew = resultData.isForceRenew
localStorage.isRelated = resultData.isRelated
let calFactorLst = this.getFactorList(resultData)
let productTrialYearDTOS = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? resultData.productTrialInfoDTO.productTrialYearDTOS : null
let hasAddtionRisk = resultData.productTrialInfoDTO.addtionRiskLst ? true : false
let currentProductInfo = {
calFactorLst,
hasAddtionRisk,
isMainRisk: 0,
riskType: resultData.riskType,
riskName: this.result.riskName,
productCode: this.result.riskProductCode,
mainRiskCode: this.result.riskProductCode,
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
influences: resultData.productTrialInfoDTO.influences,
isRemit: resultData.productTrialInfoDTO.isRemit,
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
predictTransferPrem: null //建议书使用 预计转入保费字段
}
let currentProductInfo =
localStorage.isTrial == '1'
? {
calFactorLst,
hasAddtionRisk,
isMainRisk: 0,
riskType: resultData.riskType,
riskName: this.result.riskName,
productCode: this.result.riskProductCode,
mainRiskCode: this.result.riskProductCode,
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
influences: resultData.productTrialInfoDTO.influences,
isRemit: resultData.productTrialInfoDTO.isRemit,
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
predictTransferPrem: null //建议书使用 预计转入保费字段
}
: {
productTrialYearDTOS,
calFactorLst,
hasAddtionRisk,
isMainRisk: 0,
riskType: resultData.riskType,
riskName: this.result.riskName,
productCode: this.result.riskProductCode,
mainRiskCode: this.result.riskProductCode,
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
influences: resultData.productTrialInfoDTO.influences,
isRemit: resultData.productTrialInfoDTO.isRemit,
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
predictTransferPrem: null //建议书使用 预计转入保费字段
}
//构建险种数组
let productsData
@@ -194,13 +214,15 @@ export default {
})
} else if (item.type == 1) {
//按年龄选择
productTrialInfoDTO[item.code].forEach(factor => {
item = Object.assign(item, factor)
})
if (item.code == 'inputPrem') {
item['inputPrem'] = Number(item.minPrem) * Number(item.moneyUnit)
} else {
item['amt'] = Number(item.minAmt) * Number(item.moneyUnit)
if (productTrialInfoDTO[item.code] != null) {
productTrialInfoDTO[item.code].forEach(factor => {
item = Object.assign(item, factor)
})
if (item.code == 'inputPrem') {
item['inputPrem'] = Number(item.minPrem) * Number(item.moneyUnit)
} else {
item['amt'] = Number(item.minAmt) * Number(item.moneyUnit)
}
}
}
//规则储存

View File

@@ -1,7 +1,7 @@
<template>
<div class="poster-preview-container">
<div class="flex align-items-c justify-content-c top30 relative">
<img class="w300" :src="posterInfo.posterUrl | urlFormat" alt="" />
<img class="w300" :src="imgPath | urlFormat" alt="" />
<div class="poster-info w300 white absolute fs14 bottom0" style="background:rgba(0,0,0,.5)">
<p class="p5 mt5 ml5">{{ manageComName || '国富人寿保险股份有限公司' }}</p>
<p class="p5 ml5">{{ userName }}</p>
@@ -13,7 +13,7 @@
</template>
<script>
import { getPosterInfo } from '@/api/ebiz/poster/poster'
import { getPosterInfo, shareUrl } from '@/api/ebiz/poster/poster'
import { getAgentInfo } from '@/api/ebiz/my/my'
import config from '@/config'
export default {
@@ -27,10 +27,142 @@ export default {
posterInfo: {},
userName: '', // 代理人姓名
userMobile: '', // 用户手机号
manageComName: '' // 公司名称
manageComName: '', // 公司名称
imgUrl: '', // 分享的图片
base64: '', // 分享的base64
imgPath: '',
isShow: false
}
},
async created() {
this.id = this.$route.query.id
if (this.isWeixin) {
localStorage.token = this.$route.query.token
}
await this.getAgentInfo()
await this.getPosterDetail()
await this.getShareImg()
},
methods: {
shareFriends() {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
extra: {
shareType: '1',
img: this.imgUrl
}
})
},
async getPosterDetail() {
return new Promise((resolve, reject) => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
getPosterInfo({
posterInfoDTO: {
posterId: this.id
}
}).then(res => {
this.$toast.clear()
if (res.result == 0) {
this.posterInfo = res.infoDTOList[0]
resolve()
} else {
reject()
}
})
})
},
// 获取代理人信息
async getAgentInfo() {
return new Promise((resolve, reject) => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
getAgentInfo({}).then(res => {
this.$toast.clear()
if (res.result == 0) {
this.userName = res.name
this.userMobile = res.phoneNo
this.manageComName = res.manageComName
resolve()
} else {
reject()
}
})
})
},
// 获取分享图片
async getShareImg() {
return new Promise((resolve, reject) => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let params = {
posterInfoDTO: {
posterName: this.posterInfo.posterName
},
agentMobile: this.userMobile,
agentName: this.userName,
companyName: this.manageComName || '国富人寿保险有限责任公司'
}
shareUrl(params).then(res => {
this.$toast.clear()
if (res.result == 0) {
this.imgUrl = config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${res.content.path}`
this.imgPath = res.content.path
this.isShow = true
// this.getBase64(this.imgUrl)
resolve()
} else {
reject()
}
})
})
},
// 获取base64
getBase64(imgUrl) {
let that = this
window.URL = window.URL || window.webkitURL
var xhr = new XMLHttpRequest()
xhr.open('get', imgUrl, true)
// 至关重要
xhr.responseType = 'blob'
xhr.onload = function() {
if (this.status == 200) {
//得到一个blob对象
var blob = this.response
// 至关重要
let oFileReader = new FileReader()
oFileReader.onloadend = function(e) {
// 此处拿到的已经是 base64的图片了
// let base64 = e.target.result
that.base64 = e.target.result.split(',')[1]
console.log(that.base64)
}
oFileReader.readAsDataURL(blob)
}
}
xhr.send()
}
},
filters: {
urlFormat(url) {
return (config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${url}`).replace(/\+/g, '%2B')
}
}
/*async created() {
if (this.isWeixin) {
localStorage.token = this.$route.query.token
}
@@ -73,7 +205,7 @@ export default {
urlFormat(url) {
return (config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${url}`).replace(/\+/g, '%2B')
}
}
}*/
}
</script>

View File

@@ -356,12 +356,15 @@ export default {
}
if (risk.payEndYearFlag == 'Y') {
console.log(111)
if (risk.payEndYear == '1000') {
risk.payName = '一次交清'
} else {
console.log(222)
risk.payName = risk.payEndYear + '年'
}
} else {
console.log(333)
risk.payName = risk.payEndYear + '岁'
}
// risk.demoValue[demoLabel.content] == dutyLst.dutyCode

View File

@@ -51,7 +51,10 @@
placeholder="被保人职业"
/>
<select-radio class="border-bottom" :radios="medicalRadio" label="有无社保" :value.sync="insured.medical"></select-radio>
<div class="border-bottom"><van-field :readonly="disabled" v-model="insured.age" clearable label="年龄" placeholder="被保人年龄" /></div>
<div class="border-bottom">
<van-field :readonly="disabled" :value="ageShow" @input="changeAgeInput($event)" clearable label="年龄" placeholder="被保人年龄" />
</div>
<!-- <div class="border-bottom"><van-field :readonly="disabled" v-model="insured.age" clearable label="年龄" placeholder="被保人年龄" /></div> -->
<van-field v-model="insured.mobile" :readonly="disabled" clearable label="手机号码" name="手机号码" placeholder="被保人手机号码" v-validate="'mobile'" />
<van-button type="danger" @click="nextStep" class="bottom-btn fs16">下一步</van-button>
@@ -69,6 +72,7 @@ import { CellGroup, Field, Dialog, Toast } from 'vant'
import getAge from '@/assets/js/utils/age.js'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import { checkSex, checkRelation } from './rule'
export default {
data() {
return {
@@ -111,7 +115,8 @@ export default {
customerShowPicker: false,
occupationShowPicker: false,
currentPopupIndex: '',
disabled: false
disabled: false,
ageShow: '' //被保人显示年龄
}
},
@@ -121,6 +126,15 @@ export default {
this.init()
},
mounted() {},
watch: {
'insured.age': {
handler(newVal) {
this.ageShow = newVal == '-1' ? '' : newVal
},
deep: true,
immediate: true
}
},
methods: {
init() {
window.appCallBack = this.appCallBack
@@ -135,6 +149,12 @@ export default {
this.insured.age = getAge.getAge(this.insured.birthday, new Date())
this.insured.medical = '0'
}
this.ageShow = this.insured.age == '-1' ? '0' : this.insured.age
},
//设置被保人年龄显示 如果this.insured.age为 -1时显示为空不为1时显示为正常输入值
changeAgeInput(val) {
// this.ageShow = val == '-1' ? '0' : val
this.insured.age = val
},
selectClick(index) {
this.currentPopupIndex = index
@@ -304,20 +324,24 @@ export default {
hiddenRight: '1'
}
})
let { customerName, customerSex, birthday, customerPhone, age, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data
console.log('data == ', data)
let { customerName, customerSex, birthday, customerPhone, occupationName, occupationCode, lifeGrade, healthGrade, socialSecurity } = data
let age = getAge.getAge(data['birthday'], new Date())
let insured = {
mobile: customerPhone,
birthday,
sex: String(customerSex),
name: customerName,
occupationName,
age: age ? age : '',
age: age,
occupationCode,
lifeGrade,
healthGrade,
medical: socialSecurity ? socialSecurity : '0'
}
console.log('insured.age', insured.age)
Object.assign(this.insured, insured)
console.log('insured == ', insured)
}
},

View File

@@ -42,7 +42,7 @@
/>
</van-cell-group>
<van-cell-group class="flex align-items-c" v-if="isRenew == '0' && !changeCard">
<van-switch-cell v-model="isChecked" title="自动续保" active-color="#E9332E" inactive-color="#fff" class="ml15 pr30" />
<van-switch-cell v-model="isChecked" title="自动续保" :disabled="isForceRenew" active-color="#E9332E" inactive-color="#fff" class="ml15 pr30" />
</van-cell-group>
<div class="fs12 mt10 ml20 w250 h15">
<span>温馨提示该账户将用于首期续期保费缴费</span>
@@ -143,6 +143,8 @@ export default {
isAutoPay: '',
// 是否显示自动续保
isRenew: '',
//自动续保按钮是否不允许更改
isForceRenew: false,
changeCard: localStorage.changeCard
}
},
@@ -408,6 +410,9 @@ export default {
this.isAutoPay = localStorage.isAutoPay
// 是否显示自动续保
this.isRenew = localStorage.isRenew
//自动续保按钮是否禁用
this.isForceRenew = localStorage.isForceRenew == '0' ? true : false
this.isChecked = localStorage.isForceRenew == '0' ? true : false
},
mounted() {
document.body.style.backgroundColor = '#F5F5F5'

View File

@@ -60,7 +60,8 @@
<van-cell title="险种名称" :value="it.riskName" />
<van-cell title="保险期间" :value="it.insuYear" />
<van-cell title="交费方式" :value="it.payIntv" />
<van-cell title="交费期间" :value="it.payEndYearFlag == 'Y' ? `${it.payEndYear}年` : `至${it.payEndYear}岁`" v-if="!it.payIntv != '一次性交清'" />
<van-cell title="交费期间" :value="it.payEndYearFlag == 'Y' ? `${it.payEndYear}年` : `至${it.payEndYear}岁`" v-if="it.payEndYear != '1000'" />
<van-cell title="交费期间" v-if="it.payEndYear == '1000'" value="一次性交清" />
<!-- isYear == true ? `${it.insuYear}` : it.insuYear" -->
<van-cell title="险种保额()" :value="it.amt | moneyFormat" />
<van-cell title="险种保费()" :value="it.mainPremDetail | moneyFormat" />
@@ -72,8 +73,8 @@
<van-cell title="保险期间" :value="i.insuYear" />
<!-- item.payEndYearFlag == 'Y' ? `${it.payEndYear}年` : `至${it.payEndYear}岁` -->
<van-cell title="交费方式" :value="i.payIntv" />
<van-cell title="交费期间" :value="i.payEndYearFlag == 'Y' ? `${i.payEndYear}` : `${i.payEndYear}`" v-if="!i.payIntv != '一次性交清'" />
<van-cell title="交费期间" :value="i.payEndYearFlag == 'Y' ? `${i.payEndYear}` : `${i.payEndYear}`" v-if="i.payEndYear != '1000'" />
<van-cell title="交费期间" v-if="i.payEndYear == '1000'" value="一次性交清" />
<van-cell title="险种保额()" :value="i.planCodeLabel" v-if="i.amt == null && i.planCode != ''" />
<van-cell title="险种保额()" :value="i.amt | moneyFormat" v-else />
<van-cell title="险种保费()" :value="i.prem | moneyFormat" />

View File

@@ -273,7 +273,7 @@ export default {
}
})
} else {
url = this.productCode == 'GFRS_M0003' ? 'productTip' : 'insuranceTip'
url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' ? 'productTip' : 'insuranceTip'
this.$jump({
flag: 'h5',
extra: {
@@ -406,7 +406,7 @@ export default {
if (that.changeCard) {
url = 'SignatureConfirmation'
} else {
url = this.productCode == 'GFRS_M0003' ? 'productTip' : 'insuranceTip'
url = this.productCode == 'GFRS_M0003' || this.productCode == 'GFRS_M0015' ? 'productTip' : 'insuranceTip'
}
this.$jump({
flag: 'h5',

View File

@@ -230,6 +230,8 @@ export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
//保险产品名称
riskName: '',
// 员工信息
recmd: {},
// 投保时间
@@ -319,11 +321,6 @@ export default {
this.relationToAppnt = this.$route.query.relationToAppnt
this.isShow = false
this.getOrderDetail().then(() => {
// console.log('this.appntSignStatus', this.appntSignStatus)
// console.log('this.appntSignStatus', this.appntSignStatus)
console.log('this.appntSignStatus', this.appntSignStatus)
console.log('this.shareCode', this.shareCode)
console.log('this.changeCard', this.changeCard)
if (
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '0') ||
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '2')
@@ -371,8 +368,9 @@ export default {
window.localStorage.setItem('sign-val', val)
window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign))
if (val == '0' || val == '2') {
//idtype不为身份证或年纪小于18岁跳过人脸识别
if (JSON.parse(this.$route.query.saleInsuredInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredInfo).age < '18') {
//idtype不为身份证跳过人脸识别
// if (JSON.parse(this.$route.query.saleInsuredInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredInfo).age < '18') {
if (JSON.parse(this.$route.query.saleInsuredInfo).idType != '1') {
that.goUrl()
} else {
this.idcardData.typeface = !this.idcardData.typeface
@@ -382,7 +380,8 @@ export default {
} else {
window.localStorage.setItem('sign-val', val)
window.localStorage.setItem('sign-insured', JSON.stringify(that.insuredSign))
if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredPersonInfo).age < '18') {
// if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1' || JSON.parse(this.$route.query.saleInsuredPersonInfo).age < '18') {
if (JSON.parse(this.$route.query.saleInsuredPersonInfo).idType != '1') {
that.insuredUrl()
} else {
this.idcardData.typeface = !this.idcardData.typeface
@@ -394,7 +393,8 @@ export default {
if (val == '0' || val == '2') {
window.localStorage.setItem('sign-val', val)
window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign))
if (this.saleInsuredInfo.idType != '1' || this.saleInsuredInfo.age < '18') {
if (this.saleInsuredInfo.idType != '1') {
// if (this.saleInsuredInfo.idType != '1' || this.saleInsuredInfo.age < '18') {
that.goUrl()
} else {
// 原人脸识别
@@ -412,7 +412,8 @@ export default {
} else {
window.localStorage.setItem('sign-val', val)
window.localStorage.setItem('sign-insured', JSON.stringify(that.insuredSign))
if (this.saleInsuredPersonInfo.idType != '1' || this.saleInsuredPersonInfo.age < '18') {
if (this.saleInsuredPersonInfo.idType != '1') {
// if (this.saleInsuredPersonInfo.idType != '1' || this.saleInsuredPersonInfo.age < '18') {
that.insuredUrl()
} else {
// 调原生人脸识别
@@ -436,7 +437,7 @@ export default {
if (that.changeCard) {
path = 'insuranceInformation'
} else {
if (localStorage.productCode == 'GFRS_M0003') {
if (localStorage.productCode == 'GFRS_M0003' || localStorage.productCode == 'GFRS_M0015') {
if (that.appntSign[0].documentStatus == 0) {
path = 'insuranceInformation'
} else if (that.appntSign[1].documentStatus == 2) {
@@ -697,6 +698,7 @@ export default {
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
localStorage.setItem('riskName', '')
return new Promise((resolve, reject) => {
getOrderDetail(data).then(res => {
if (res.result == '0') {
@@ -707,6 +709,8 @@ export default {
// 获取投保人信息
this.saleInsuredInfo = JSON.parse(window.localStorage.getItem('saleInsuredInfo'))
this.relationToAppnt = this.saleInsuredPersonInfo.relationToAppnt //将缓存中的与被保人关系赋值给页面
this.riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName
localStorage.riskName = this.riskName
that.recmd = res.orderDTO.recmdDTO
that.orderInfo = res.orderDTO.orderInfoDTO
that.insured = res.orderDTO.insuredDTOs

View File

@@ -15,7 +15,7 @@
<div class="pt30 pl30 flex align-items-c">
<span class="mr10">投保人签名 :</span>
<div>
<!-- <van-button type="danger" size="small" @click="chaolu('0')" v-no-more-click="1000"></van-button> -->
<!-- <van-button type="danger" size="small" @click="chaolu('0')" v-no-more-click="1000"></van-button> -->
<van-button type="danger" size="small" @click="sign('0')" :disabled="isSure" v-no-more-click="1000">{{ isSign ? '签名' : '已签名' }}</van-button>
</div>
</div>
@@ -27,13 +27,13 @@
<!-- <van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14" v-if="!dayShow && chooseProductCodes[0] == 'GFRS_M0011'">
<van-radio name="1" @click="click" class="ml-25 pl10 pr10">
本人确认已阅读
<span>{{`${pdfName}并指定本保险合同生效日为2020年1月1日`}}</span>
<span>{{ `${pdfName}并指定本保险合同生效日为2020年1月1日` }}</span>
</van-radio>
</van-radio-group> -->
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1" @click="click">
本人确认已阅读
<span>{{`${pdfName}`}}</span>
<span>{{ `${pdfName}` }}</span>
</van-radio>
</van-radio-group>
<div class="pt20 pl30 flex align-items-c">
@@ -460,7 +460,7 @@ export default {
pageNo: '1',
index: '1',
offset: this.caOffset,
pos: '3'
pos: '3' //设置偏移量 3表示右侧
}).then(data => {
let temp = JSON.parse(data)
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt},CA_state:${temp.state}`)
@@ -491,7 +491,7 @@ export default {
pageNo: '1',
index: '1',
offset: '-250',
pos: '3'
pos: '3' //设置偏移量 3表示右侧
}).then(data => {
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`, JSON.stringify(data))
this.$toast.clear()
@@ -581,7 +581,7 @@ export default {
pageNo: '1',
index: '1',
offset: '50',
pos: '3'
pos: '3' //设置偏移量 3表示右侧
}).then(data => {
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`, JSON.stringify(data))
this.$toast.clear()
@@ -610,7 +610,7 @@ export default {
)
window.location.href = this.$mainUrl + '/sign/index.html'
},
//
//
chaolu() {
// 再微信
if (this.isWeixin) {
@@ -678,7 +678,7 @@ export default {
pageNo: '1',
index: '1',
offset: '10',
pos: '3',
pos: '3', //设置偏移量 3表示右侧
commentKeyword: '认真',
commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性',
commentOffset: '28',
@@ -708,7 +708,7 @@ export default {
pageNo: '1',
index: '1',
offset: this.caOffset,
pos: '3',
pos: '3', //设置偏移量 3表示右侧
commentKeyword: '认真',
commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性',
commentOffset: '28',
@@ -751,7 +751,8 @@ export default {
// 判断是不是万能险
let comment = window.localStorage.getItem('productCode')
if (comment == 'GFRS_M0003') {
// if (comment == 'GFRS_M0003') {
if (comment == 'GFRS_M0003' || comment == 'GFRS_M0015') {
this.isComment = true
}

View File

@@ -5,7 +5,7 @@
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio name="1" @click="click">
本人确认已阅读
<span>国富人寿金管家养老年金保险万能型产品说明书</span>
<span>{{ riskName }}产品说明书</span>
</van-radio>
</van-radio-group>
<div class="pt10 pb10 pl30 flex align-items-c">
@@ -60,7 +60,9 @@ export default {
saleInsuredInfo: {},
// 是否从详情跳过来 如果为1 是
detailJump: '',
src: location.origin + '/pdfjs/web/viewer.html?file='
src: location.origin + '/pdfjs/web/viewer.html?file=',
//保险产品名称
riskName: localStorage.riskName
}
},
components: {