mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 11:16:43 +08:00
Compare commits
9 Commits
hotfix/【20
...
feature/GF
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7120cece1a | ||
|
|
b10a8b7610 | ||
|
|
6def3e66d1 | ||
|
|
9dee0c0f2f | ||
|
|
4e50e258d1 | ||
|
|
3b16e035e3 | ||
|
|
6fcdb664a0 | ||
|
|
86da12a344 | ||
|
|
183714a830 |
@@ -559,10 +559,7 @@ export default {
|
||||
)
|
||||
|
||||
if (insuredDTO) {
|
||||
let insuredPersonAge = insuredDTO.insuredAge ? insuredDTO.insuredAge : insuredDTO.age
|
||||
if(insuredDTO.birthday){
|
||||
insuredPersonAge = utilsAge.getAge(insuredDTO.birthday, new Date())
|
||||
}
|
||||
let insuredPersonAge = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
|
||||
CacheUtils.setLocItem('saleInsuredPersonInfo',
|
||||
JSON.stringify({
|
||||
birthday: insuredDTO.birthday,
|
||||
|
||||
@@ -3777,22 +3777,6 @@ export default {
|
||||
{
|
||||
code: "GFRS_M0073__cashValue",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "currentBonus_L",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "currentBonus_M",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "riskAC_L",
|
||||
label: "元"
|
||||
},
|
||||
{
|
||||
code: "riskAC_M",
|
||||
label: "元"
|
||||
}
|
||||
],
|
||||
// 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件,
|
||||
|
||||
@@ -653,6 +653,12 @@ export default {
|
||||
// return
|
||||
// }
|
||||
this.userInfo.effectiveDateType = false
|
||||
//如果录入日期早于当前日期
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
}
|
||||
break
|
||||
case '2':
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon, Collapse, CollapseItem, Dialog} from 'vant'
|
||||
import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon ,Collapse, CollapseItem} from 'vant'
|
||||
import {cardOrderDetail } from '@/api/ebiz/cardList/cardList.js'
|
||||
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
|
||||
import afterDate from '@/assets/js/utils/getAfterDate.js'
|
||||
@@ -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,37 +132,15 @@ 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{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
@@ -746,69 +742,58 @@ export default {
|
||||
支付之前要先保存银行账户信息
|
||||
*/
|
||||
let res = await saveOrUpdateAccount(data)
|
||||
// .then(res => {
|
||||
console.log('res', res)
|
||||
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',
|
||||
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()
|
||||
}
|
||||
|
||||
// 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)
|
||||
// }
|
||||
// }
|
||||
|
||||
this.acceptInsurance()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
this.isLoading = false
|
||||
}
|
||||
// })
|
||||
} else {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
|
||||
// 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)
|
||||
// }
|
||||
// }
|
||||
|
||||
this.acceptInsurance()
|
||||
}
|
||||
},
|
||||
// 选择微信支付校验身份证类型
|
||||
|
||||
@@ -353,17 +353,8 @@
|
||||
<van-dialog v-model="trialResultsShow" title="核保试算结果" :show-cancel-button="false">
|
||||
<div class="pl40 pr40 mt10">
|
||||
<div class="flex justify-content-s fs12" v-for="(item, index) in verifyResultList" :key="index">
|
||||
<div>
|
||||
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt="">
|
||||
<span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <span class="v-middle">{{item.status | approvedFilter}}</span>-->
|
||||
<img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:25px 0px 10px 10px;font-size: 10px;color: #999;">
|
||||
<p style="line-height: 20px;"><span style="width: 40px;display: inline-block;">说明:</span>绿色✔表示 未触发规则、红色×表示 触发规则</p>
|
||||
<div><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/ruleType0'+ item.ruleType +'.png')" alt=""><span class="v-middle">{{item.ruleType | ruleTypeFilter}}</span></div>
|
||||
<div><span class="v-middle">{{item.status | approvedFilter}}</span><img class="w20 h20 p10 v-middle" :src="require('@/assets/images/sale/approved'+ item.status +'.png')" alt=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</van-dialog>
|
||||
@@ -376,7 +367,6 @@ import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sal
|
||||
import { saveProposal, getTrialRecordInfo, saveOrUpdateTrialRecordInfo } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
import occupationList from '@/components/ebiz/occipation/data/occupation'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import riskRules from "./risk-rules";
|
||||
|
||||
//险种GFRS_M0016的责任的验证规则
|
||||
@@ -665,9 +655,6 @@ export default {
|
||||
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
|
||||
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
this.saleInsuredPersonInfo.insuredAge = this.saleInsuredPersonInfo.insuredAge ? this.saleInsuredPersonInfo.insuredAge : this.saleInsuredPersonInfo.age
|
||||
if(this.saleInsuredPersonInfo.birthday){
|
||||
this.saleInsuredPersonInfo.insuredAge = utilsAge.getAge(this.saleInsuredPersonInfo.birthday, new Date())
|
||||
}
|
||||
if (this.isFrom == 'proposal' && !this.saleInsuredPersonInfo.name) {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
let sex = this.saleInsuredPersonInfo.sex == '0'?'男':'女'
|
||||
@@ -2351,7 +2338,7 @@ export default {
|
||||
this.saleInsuredInfo.sex,
|
||||
this.saleInsuredInfo.occupationCode,
|
||||
this.saleInsuredInfo.occupationName,
|
||||
this.saleInsuredPersonInfo.insuredAge
|
||||
this.saleInsuredInfo.insuredAge?this.saleInsuredInfo.insuredAge:this.saleInsuredInfo.age,
|
||||
]
|
||||
} else {
|
||||
;[birthday, sex, occupationCode, occupationName, age] = [
|
||||
@@ -2359,7 +2346,7 @@ export default {
|
||||
this.saleInsuredPersonInfo.sex,
|
||||
this.saleInsuredPersonInfo.occupationCode,
|
||||
this.saleInsuredPersonInfo.occupationName,
|
||||
this.saleInsuredPersonInfo.insuredAge
|
||||
this.saleInsuredPersonInfo.insuredAge?this.saleInsuredPersonInfo.insuredAge:this.saleInsuredPersonInfo.age
|
||||
]
|
||||
}
|
||||
trialInfo = Object.assign(trialInfo, {
|
||||
@@ -2417,161 +2404,25 @@ export default {
|
||||
},
|
||||
//保额份数变化
|
||||
stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) {
|
||||
let currentEle = ''
|
||||
let params = this.getParams()
|
||||
if(localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'){
|
||||
// params[productIndex].payEndYear == '1000' 交费期间为一次性交清
|
||||
this.chooseProducts[productIndex].productTrialYearDTOS.forEach(item=>{
|
||||
if(params.trialInfos[productIndex].payEndYear == '1000') {
|
||||
if(item.yearWay == '一次性交清'){
|
||||
currentEle = item
|
||||
}
|
||||
} else {
|
||||
if(item.yearWay == params.trialInfos[productIndex].payEndYear){
|
||||
currentEle = item
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
|
||||
}
|
||||
//改动原因:孝心保产品有对年龄的特殊要求
|
||||
//添加判断,是否是孝心保产品
|
||||
let showHint = this.chooseProducts[productIndex].hint
|
||||
let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode
|
||||
if (productCode == 'GFRS_M0014') {
|
||||
//被保险人年龄如果在50-65区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 50 && this.saleInsuredPersonInfo.insuredAge <= 65) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
//被保险人年龄如果在66-75之间
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 66 && this.saleInsuredPersonInfo.insuredAge <= 75) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
}
|
||||
else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044'
|
||||
|| productCode == 'GFRS_M0056' || productCode == 'GFRS_M0057' || productCode == 'GFRS_M0060') {
|
||||
console.log('defalutValue==', defalutValue)
|
||||
console.log("currentEle['amt']==", currentEle['amt'])
|
||||
console.log('riskFactor.rules', riskFactor.rules)
|
||||
console.log('this.saleInsuredPersonInfo.insuredAge ', this.saleInsuredPersonInfo.insuredAge)
|
||||
//被保险人年龄如果在50-65区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 56 && this.saleInsuredPersonInfo.insuredAge <= 60) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
// 年龄在56周岁及以上被保险人,投保本险种时,最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
//年龄在0-55周岁被保险人,投保本险种时,最低基本保险金额为50000元,超过最低基本保险金额为10000元整数倍。
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 55) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
}
|
||||
else if (productCode == 'GFRS_M0040') {
|
||||
// 惠企保保额限制
|
||||
//被保险人年龄如果在41-60区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 41) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast('年龄在41周岁至60周岁被保险人,投保本险种时,最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('年龄在41周岁至60周岁被保险人,投保本险种时,最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 40) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast('年龄在0-40周岁被保险人,投保本险种时,最低基本保险金额为100000元,超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('年龄在0-40周岁被保险人,投保本险种时,最低基本保险金额为100000元,超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
}
|
||||
else if (productCode == 'GFRS_M0046') {
|
||||
//被保险人年龄如果在50-65区间
|
||||
if(this.branchTypeVal == 'Z'){ //中介渠道规则
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 51 && this.saleInsuredPersonInfo.insuredAge <= 60) {
|
||||
let currentEle =
|
||||
localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'
|
||||
? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex]
|
||||
: this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
|
||||
//改动原因:孝心保产品有对年龄的特殊要求
|
||||
//添加判断,是否是孝心保产品
|
||||
let showHint = this.chooseProducts[productIndex].hint
|
||||
let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode
|
||||
if (productCode == 'GFRS_M0014') {
|
||||
//被保险人年龄如果在50-65区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 50 && this.saleInsuredPersonInfo.insuredAge <= 65) {
|
||||
//使用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].limit) * 10000) +'元整数倍。')
|
||||
this.$toast(showHint)
|
||||
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].limit) * 10000) +'元整数倍。')
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
@@ -2579,15 +2430,16 @@ export default {
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
//年龄在0-50周岁被保险人,投保本险种时,最低基本保险金额为50000元,超过最低基本保险金额为10000元整数倍。
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 50) {
|
||||
//被保险人年龄如果在66-75之间
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 66 && this.saleInsuredPersonInfo.insuredAge <= 75) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
@@ -2596,11 +2448,17 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(this.branchTypeVal == 'G' || this.branchTypeVal == 'T'|| this.branchTypeVal == 'Y' ){ //世纪无忧中介渠道规则(银销个,健销个投保规则同个险规则)
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
} else if (productCode == 'GFRS_M0035' || productCode == 'GFRS_M0044'
|
||||
|| productCode == 'GFRS_M0056' || productCode == 'GFRS_M0057' || productCode == 'GFRS_M0060') {
|
||||
console.log('defalutValue==', defalutValue)
|
||||
console.log("currentEle['amt']==", currentEle['amt'])
|
||||
console.log('riskFactor.rules', riskFactor.rules)
|
||||
console.log('this.saleInsuredPersonInfo.insuredAge ', this.saleInsuredPersonInfo.insuredAge)
|
||||
//被保险人年龄如果在50-65区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 56 && this.saleInsuredPersonInfo.insuredAge <= 60) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
// 年龄在51周岁及以上被保险人,投保本险种时,最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
|
||||
// 年龄在56周岁及以上被保险人,投保本险种时,最低基本保险金额为10000元。超过最低基本保险金额为10000元整数倍。
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
@@ -2615,7 +2473,7 @@ export default {
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
//年龄在0-50周岁被保险人,投保本险种时,最低基本保险金额为50000元,超过最低基本保险金额为10000元整数倍。
|
||||
//年龄在0-55周岁被保险人,投保本险种时,最低基本保险金额为50000元,超过最低基本保险金额为10000元整数倍。
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 55) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
@@ -2623,6 +2481,7 @@ export default {
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
@@ -2632,83 +2491,190 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 国富人寿富桂金生养老年金保险(GFRS_M0053)中介渠道鑫享金生养老年金保险(GFRS_M0061)
|
||||
}
|
||||
else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') {
|
||||
if (Number(defalutValue) < Number(min)) {
|
||||
if (riskFactor.yearWay == "一次性交清") {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
} else {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
} else if (productCode == 'GFRS_M0040') {
|
||||
// 惠企保保额限制
|
||||
//被保险人年龄如果在41-60区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 41) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[1].minPrem) || Number(defalutValue) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast('年龄在41周岁至60周岁被保险人,投保本险种时,最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('年龄在41周岁至60周岁被保险人,投保本险种时,最低基本保险金额为50000元。超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
} else if (this.saleInsuredPersonInfo.insuredAge >= 0 && this.saleInsuredPersonInfo.insuredAge <= 40) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast('年龄在0-40周岁被保险人,投保本险种时,最低基本保险金额为100000元,超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('年龄在0-40周岁被保险人,投保本险种时,最低基本保险金额为100000元,超过最低基本保险金额为10000元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
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 == '0') {
|
||||
if (Number(defalutValue) < Number(min)) {
|
||||
if (riskFactor.yearWay == "一次性交清") {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
} else {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
} else if (productCode == 'GFRS_M0046') {
|
||||
//被保险人年龄如果在50-65区间
|
||||
if(this.branchTypeVal == 'Z'){ //中介渠道规则
|
||||
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].limit) * 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].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('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
this.$toast('0周岁-50周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 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.branchTypeVal == 'G' || this.branchTypeVal == 'T'|| this.branchTypeVal == 'Y' ){ //世纪无忧中介渠道规则(银销个,健销个投保规则同个险规则)
|
||||
//被保险人年龄如果在50-65区间
|
||||
if (this.saleInsuredPersonInfo.insuredAge >= 56 && 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('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[1].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast('56周岁-60周岁最低基本保险金额为'+ (Number(riskFactor.rules[1].minPrem) * 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 <= 55) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(defalutValue) < Number(riskFactor.rules[0].minPrem) || Number(defalutValue) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
this.$toast('0周岁-55周岁最低基本保险金额为'+ (Number(riskFactor.rules[0].minPrem) * 10000) +'元。超过最低基本保险金额为'+ (Number(riskFactor.rules[0].limit) * 10000) +'元整数倍。')
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(`超过最低保费部分金额需为1000元整数倍`)
|
||||
// 国富人寿富桂金生养老年金保险(GFRS_M0053)中介渠道鑫享金生养老年金保险(GFRS_M0061)
|
||||
} else if (productCode == 'GFRS_M0053' || productCode == 'GFRS_M0061') {
|
||||
if (Number(defalutValue) < Number(min)) {
|
||||
if (riskFactor.yearWay == "一次性交清") {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
} else {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
}
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
}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
|
||||
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
|
||||
if (Number(defalutValue) < Number(min)) {
|
||||
if (riskFactor.yearWay == "一次性交清") {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
} else {
|
||||
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 {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
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(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// defalutValue = currentEle.rules[productIndex].displayAmount
|
||||
if (Number(defalutValue) < Number(min) || Number(defalutValue) > Number(max)) {
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
if ((Number(defalutValue) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// defalutValue = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(showHint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(defalutValue) * Number(currentEle.moneyUnit)
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex]
|
||||
// defalutValue = value
|
||||
console.log('进来几次')
|
||||
this.mult = Math.ceil(Number(defalutValue) / Number(riskFactor.defaultValue))
|
||||
},
|
||||
// let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex]
|
||||
// defalutValue = value
|
||||
console.log('进来几次')
|
||||
this.mult = Math.ceil(Number(defalutValue) / Number(riskFactor.defaultValue))
|
||||
},
|
||||
//下一步
|
||||
async nextStep(isFrom) {
|
||||
//GFRS_M0016需要验证责任
|
||||
@@ -2879,7 +2845,7 @@ export default {
|
||||
//建议书需要添加全部投保人信息,电投只需要投保人ID
|
||||
let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst })
|
||||
if (!insuredDTOItem.insuredAge) {
|
||||
insuredDTOItem.insuredAge = insuredDTOItem.birthday ? utilsAge.getAge(insuredDTOItem.birthday, new Date()) : insuredDTOItem.age
|
||||
insuredDTOItem.insuredAge = insuredDTOItem.age
|
||||
}
|
||||
let orderNo = localStorage.isFrom == 'proposal'?this.$route.query.proposalOrderNo:this.$route.query.orderNo
|
||||
let params = {
|
||||
@@ -2990,7 +2956,7 @@ export default {
|
||||
}
|
||||
})
|
||||
let data = {
|
||||
serialNo:this.$route.query.proposalOrderNo,
|
||||
serialNo:this.$CacheUtils.getLocItem('proposalNo'),
|
||||
mainRiskId:insuanceId+'',
|
||||
trialJsonStr:localStorage.chooseProducts
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)">
|
||||
@@ -199,11 +199,7 @@
|
||||
<div class="text-left" style="width: 75%;">
|
||||
<span>{{ moneyItem.contentLabel }}</span>
|
||||
</div>
|
||||
<div class="text-right" v-if="moneyItem.content == 'currentBonus_M'">
|
||||
<span class="color_3A81F6">{{ moneyItem.value | numFormat2 }}</span
|
||||
>{{ moneyItem.content | productRateUnit }}
|
||||
</div>
|
||||
<div class="text-right" v-else>
|
||||
<div class="text-right">
|
||||
<span class="color_3A81F6">{{ moneyItem.value | numFormatNo }}</span
|
||||
>{{ moneyItem.content | productRateUnit }}
|
||||
</div>
|
||||
@@ -283,7 +279,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 +382,6 @@ export default {
|
||||
mainRiskCodes: [],
|
||||
time: 5,
|
||||
proposalNo:'',
|
||||
mainRiskName: ''
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@@ -400,13 +395,6 @@ export default {
|
||||
numFormat(str) {
|
||||
return str.replace(/\.00/, '')
|
||||
},
|
||||
numFormat2(str) {
|
||||
if (str) {
|
||||
return Number(str.replace(/,/g, '')).toFixed(2)
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
},
|
||||
numFormatNo(str) {
|
||||
if (str) {
|
||||
return Number(str.replace(/,/g, '')).toFixed(0)
|
||||
@@ -449,7 +437,6 @@ export default {
|
||||
})
|
||||
}, 1000)
|
||||
window['appCallBack'] = this.appCallBack*/
|
||||
// init方法在微信端存储token,接口请求用此token,所以init方法前不要请求接口,会影响分享微信功能,接口会报token为空
|
||||
this.init()
|
||||
//校验当前用户权限
|
||||
funcPermCheck({}).then(res => {
|
||||
@@ -609,7 +596,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 +608,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 +637,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 +691,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 +880,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: {
|
||||
|
||||
@@ -958,11 +958,6 @@ export default {
|
||||
}
|
||||
//证件止期
|
||||
let val = this.userInfo.certiexpiredate
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
<template>
|
||||
<div style="width: 100%;margin: auto;display: flex;flex-direction: column;align-items: center;">
|
||||
<div style="display: none;">
|
||||
<canvas v-for="item in totalPage" :key="item" :id='"the-canvas" + item' class="pdf-content"></canvas>
|
||||
</div>
|
||||
<img @click="isPrevShowFunc(item)" v-for="item in imgArrayNew" :src="item.url" style="width: 100vw;"/>
|
||||
<van-image-preview id="preview" v-model="isPrevShow" :images="images"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ImagePreview } from 'vant'
|
||||
import * as pdfjsLib from 'pdfjs-dist'
|
||||
import pdfjsWorker from 'pdfjs-dist/build/pdf.worker.entry'
|
||||
import Vue from 'vue'
|
||||
|
||||
Vue.use(ImagePreview)
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
totalPage: [],
|
||||
isPrevShow:false,
|
||||
images: [],
|
||||
imgArray:[],
|
||||
imgArrayNew: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.pdfToimg()
|
||||
},
|
||||
methods:{
|
||||
isPrevShowFunc(data){
|
||||
this.isPrevShow = true
|
||||
this.images = [data.url]
|
||||
},
|
||||
pdfToimg(){
|
||||
let that = this
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = pdfjsWorker;
|
||||
let pdfUrl = 'https://iagentsales-test2.e-guofu.com/opt/ebiz/webapps/ebiz-epolicy/pdf/2023/08/09/1000001078372351/1000001078372351.pdf';
|
||||
let loadingTask = pdfjsLib.getDocument(pdfUrl);
|
||||
loadingTask.promise.then((pdf) => {
|
||||
let pageNum = pdf.numPages
|
||||
this.totalPage = pageNum;
|
||||
for (let i = 1; i <= pageNum; i++) {
|
||||
pdf.getPage(i).then((page) => {
|
||||
const canvas = document.getElementById('the-canvas' + i);
|
||||
const ctx = canvas.getContext('2d')
|
||||
const viewport = page.getViewport({ scale: 4 })
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
const destWidth = document.body.clientWidth;
|
||||
canvas.style.width = destWidth + 'px';
|
||||
canvas.style.height = destWidth * (viewport.height / viewport.width) + 'px';
|
||||
page.render({
|
||||
canvasContext: ctx,
|
||||
viewport,
|
||||
}).promise.then(function() {
|
||||
// 将画布上的内容转换为图像
|
||||
var imageData = canvas.toDataURL('image/png');
|
||||
that.imgArray.push({
|
||||
index:i,
|
||||
url:imageData
|
||||
})
|
||||
// 这里可以将图像存储到服务器或本地计算机上
|
||||
});
|
||||
})
|
||||
}
|
||||
}, function (reason) {
|
||||
console.error(reason)
|
||||
})
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
imgArray(val){
|
||||
let aaa = JSON.parse(JSON.stringify(val))
|
||||
let asd = aaa.sort(function(a, b){return a.index - b.index});
|
||||
this.imgArrayNew = asd
|
||||
console.log(asd)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<!--<template>-->
|
||||
<!-- <div id="pdf">-->
|
||||
<!-- <div id="demo"></div>-->
|
||||
<!-- </div>-->
|
||||
<!--</template>-->
|
||||
<!--<script>-->
|
||||
|
||||
<!-- import Pdfh5 from "pdfh5";-->
|
||||
|
||||
<!-- export default {-->
|
||||
<!-- name: 'pdf',-->
|
||||
<!-- data() {-->
|
||||
<!-- return {-->
|
||||
<!-- pdfh5: null-->
|
||||
<!-- };-->
|
||||
<!-- },-->
|
||||
|
||||
<!-- mounted() {-->
|
||||
<!-- //实例化-->
|
||||
<!-- this.pdfh5 = new Pdfh5("#demo", {-->
|
||||
<!-- pdfurl: 'https://iagentsales-test2.e-guofu.com/opt/ebiz/webapps/ebiz-epolicy/pdf/2023/08/09/1000001078372351/1000001078372351.pdf',-->
|
||||
<!-- lazy:true,-->
|
||||
<!-- scale:1-->
|
||||
<!-- }).on("complete", function (status, msg, time) { //监听完成事件-->
|
||||
<!-- console.log("状态:" + status + ",信息:" + msg + ",耗时:" + time + "毫秒,总页数:" + this.totalNum)-->
|
||||
<!-- })-->
|
||||
<!-- }-->
|
||||
<!-- }-->
|
||||
<!--</script>-->
|
||||
|
||||
<!--<style lang="scss" scoped>-->
|
||||
<!-- #demo{-->
|
||||
<!-- width: 100vw;-->
|
||||
<!-- }-->
|
||||
<!-- /deep/.viewerContainer{-->
|
||||
<!-- width: 100vw;-->
|
||||
<!-- overflow: inherit;-->
|
||||
<!-- }-->
|
||||
<!-- /deep/ .pageNum{-->
|
||||
<!-- display: none!important;-->
|
||||
<!-- }-->
|
||||
<!-- /deep/ .pageContainer{-->
|
||||
<!-- img{-->
|
||||
<!-- width: 100vw;-->
|
||||
<!-- }-->
|
||||
<!-- }-->
|
||||
<!--</style>-->
|
||||
@@ -1110,12 +1110,7 @@ export default {
|
||||
|
||||
//身份证证件类型的判断
|
||||
//证件止期
|
||||
let val = this.userInfo.certiexpiredate
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
let val = this.userInfo.certiexpiredate
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
|
||||
@@ -1469,11 +1469,6 @@ export default {
|
||||
|
||||
//证件止期
|
||||
let val = this.userInfo.certiexpiredate
|
||||
if (Date.parse(val) < Date.parse(new Date())) {
|
||||
this.userInfo.certiexpiredate = ''
|
||||
this.$refs.certiexpiredate.date = ''
|
||||
return this.$toast('您的证件已过期')
|
||||
}
|
||||
//年龄在16周岁以下
|
||||
if (age < 16) {
|
||||
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
|
||||
|
||||
@@ -98,6 +98,7 @@ import { Cell, CellGroup, RadioGroup, Radio, Dialog } from 'vant'
|
||||
import { acceptInsurance, getBankCardSignState,payFlag, underWrite, getOrderDetail,signConfirm} from '@/api/ebiz/sale/sale'
|
||||
import Loading from '@/components/ebiz/Loading'
|
||||
import config from '@/config'
|
||||
import { wxShare } from '@/api/ebiz/common/common.js'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
@@ -202,6 +203,25 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getOpenid(){
|
||||
wxShare({ url: location.href }).then(response => {
|
||||
if (response.result == '0') {
|
||||
let orderNo = this.$route.query.orderNo
|
||||
let code = this.getUrlParam('code')
|
||||
if(!code){
|
||||
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + response.content.appid + '&redirect_uri=' + encodeURIComponent(location.href + '?orderNo=' + orderNo) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
|
||||
}else{
|
||||
window.location.href = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' + response.content.appid + '&secret=' + response.content.appsecret + '&code=' + code + '&grant_type=authorization_code'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取地址上的参数
|
||||
getUrlParam(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) return unescape(r[2]); return null;
|
||||
},
|
||||
async payMentWx(orderNo){
|
||||
const res = await payFlag({ orderNo: orderNo })
|
||||
console.dir(res)
|
||||
@@ -225,6 +245,9 @@ export default {
|
||||
orderNo: this.orderNo,
|
||||
payType: this.radio
|
||||
}
|
||||
if(that.isWeixin){
|
||||
data.payType = 'WXJSAPI'
|
||||
}
|
||||
acceptInsurance(data).then(res => {
|
||||
console.log('----取支付参数结果:', JSON.stringify(res))
|
||||
// res = {'result':'0','resultMessage':'','content':null,'prtNo':'8186270000000008','payStatus':'4','amnt':'63700.00','appntName':'投保人','message':null,'brPayReturnData':{'result':'','resultMessage':'','content':null,'businessId':'1569125393518','businessNo':'8186270000000008','tradeSubType':'COMM','businessType':'SALE','systemType':'GF','money':63700,'businessSubType':'XDCB','thirdType':'0002','thirdName':null,'bankCode':'ABC','epayOrderNo':'1909221209536259999900','companyAccount':null,'tradeState':'TRADING','standardCode':'DEALING','standardMsg':null,'thirdOrderNo':null,'respRemark':null,'tradeTime':'2019-09-22T04:09:53.518+0000','description':'','version':'1','sourceNotecode':'8186270000000008','payType':'MIT01','expireDate':'20191010101010','transSeq':'20190922120953782','transSource':'MIT','applyEntity':'11860000','paymentCode':'8186270000000008','transDate':'20190922','rdSeq':'1909221209536259999900','settleMode':null,'cur':'CNY','transTime':'120953','ourAmount':63700,'fixUser':'1','insurer':'投保人','certType':'0','certNum':'110101199009210011','oppBank':'ABC','oppAct':'6228481200290317812','oppActName':'投保人','cellPhone':null,'purpose':null,'memo':null,'returnURL':'http://139.199.50.151/#/sale/payResult','notifyURL':'http://139.199.50.151:7000/api/v1/epay/epay/payResult','s3Sign':'e3f0581ec6b751337e8eca360a0746bc'}}
|
||||
@@ -432,7 +455,7 @@ export default {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: `国富人寿电子投保单(${shareName})付款`,
|
||||
content: '付款进行',
|
||||
content: '投保单号:'+ localStorage.orderNo + '\n' + '支付金额:' + this.underWriteData.orderAmount + '元',
|
||||
url: location.origin + '/#/sale/payMent?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
|
||||
@@ -21,13 +21,21 @@
|
||||
<!-- <div v-if="payStatus != '2' && payStatus != '1'" class=" p10 pb250 bg-white">
|
||||
<span class="pt150 fs14"> 如有相关问题,请联系信息技术部运维人员</span>
|
||||
</div> -->
|
||||
<div v-if="payStatus == '1'" class=" p10 pb250 bg-white">
|
||||
<span class="pt150 fs14"> 核心承保中,请您稍后查看</span>
|
||||
<div class="mt15" v-if="this.manageComCode == '45'">
|
||||
<span class="pt150 fs14 green fwb">
|
||||
温馨提示:为维护您的合法权益,广西保险行业协会将向您发送满意度调查短信,欢迎回复短信对我们的销售和服务进行监督。
|
||||
</span>
|
||||
<!-- <div v-if="payStatus == '1'" class=" p10 pb250 bg-white">-->
|
||||
<!-- <span class="pt150 fs14"> 核心承保中,请您稍后查看</span>-->
|
||||
<!-- <div class="mt15" v-if="this.manageComCode == '45'">-->
|
||||
<!-- <span class="pt150 fs14 green fwb">-->
|
||||
<!-- 温馨提示:为维护您的合法权益,广西保险行业协会将向您发送满意度调查短信,欢迎回复短信对我们的销售和服务进行监督。-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div v-if="payStatus == '1'" class="p10 pb250 bg-white" style="text-align: center;padding-top: 50px!important;">
|
||||
<p style="text-align: center;font-weight: bold;">温馨提示</p>
|
||||
<p style="text-align: center;">您可识别下方官方微信"国富人寿"二维码关注工号,查询您的保单信息和服务</p>
|
||||
<div style="padding: 20px;">
|
||||
<img :src="erweima" style="width: 60vw;"/>
|
||||
</div>
|
||||
<p style="text-align: center;font-weight: bold;">长按识别二维码</p>
|
||||
</div>
|
||||
<div v-if="payStatus == '2' || payStatus == '4' || payStatus == '8'" class=" p10 pb250 bg-white">
|
||||
<span v-html="resMessage"></span>
|
||||
@@ -51,161 +59,161 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Cell, CellGroup } from 'vant'
|
||||
import { getPayState } from '@/api/ebiz/sale/sale'
|
||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
isWeixin,
|
||||
// 保融收银台返回的支付流水号
|
||||
paySeqNo: '',
|
||||
// 接口返回数据前,不做页面渲染
|
||||
isReady: true,
|
||||
// 是否已重新获取支付状态。(首次进入本页,立即查询支付结果。如果是‘支付中’,两秒后再次(最后一次)再次获取一次支付状态。)
|
||||
isReloaded: false,
|
||||
// 结果原因
|
||||
resMessage: '',
|
||||
// 支付结果
|
||||
payStatus: '',
|
||||
// 支付信息
|
||||
payInfo: {
|
||||
appntName: '', // 投保人
|
||||
prtNo: '', // 投保单号
|
||||
amnt: '' // 支付金额
|
||||
import { Cell, CellGroup } from 'vant'
|
||||
import { getPayState } from '@/api/ebiz/sale/sale'
|
||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
isWeixin,
|
||||
// 保融收银台返回的支付流水号
|
||||
paySeqNo: '',
|
||||
// 接口返回数据前,不做页面渲染
|
||||
isReady: true,
|
||||
// 是否已重新获取支付状态。(首次进入本页,立即查询支付结果。如果是‘支付中’,两秒后再次(最后一次)再次获取一次支付状态。)
|
||||
isReloaded: false,
|
||||
// 结果原因
|
||||
resMessage: '',
|
||||
// 支付结果
|
||||
payStatus: '',
|
||||
// 支付信息
|
||||
payInfo: {
|
||||
appntName: '', // 投保人
|
||||
prtNo: '', // 投保单号
|
||||
amnt: '' // 支付金额
|
||||
},
|
||||
// 图片
|
||||
srcSuccess: this.$assetsUrl + 'images/success.png',
|
||||
srcPending: this.$assetsUrl + 'images/pending.png',
|
||||
srcFail: this.$assetsUrl + 'images/fail.png',
|
||||
erweima: this.$assetsUrl + 'images/share.jpg',
|
||||
manageComCode:''//代理人管理机构 52贵州 45广西
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup
|
||||
},
|
||||
methods: {
|
||||
// 返回列表页
|
||||
next() {
|
||||
if(this.isWeixin){
|
||||
WeixinJSBridge.call("closeWindow");
|
||||
}else{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/list'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/list'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 图片
|
||||
srcSuccess: this.$assetsUrl + 'images/success.png',
|
||||
srcPending: this.$assetsUrl + 'images/pending.png',
|
||||
srcFail: this.$assetsUrl + 'images/fail.png',
|
||||
manageComCode:''//代理人管理机构 52贵州 45广西
|
||||
}
|
||||
},
|
||||
components: {
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup
|
||||
},
|
||||
methods: {
|
||||
// 返回列表页
|
||||
next() {
|
||||
if(this.isWeixin){
|
||||
WeixinJSBridge.call("closeWindow");
|
||||
}else{
|
||||
// 查询支付状态
|
||||
queryPayState() {
|
||||
this.$toast.clear()
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let data = { orderNo: this.paySeqNo }
|
||||
getPayState(data).then(res => {
|
||||
this.$toast.clear()
|
||||
this.isReady = true
|
||||
console.log('----支付结果查询', JSON.stringify(res))
|
||||
if (res.result == '0') {
|
||||
this.payStatus = res.payStatus
|
||||
this.payInfo = { appntName: res.appntName, prtNo: res.prtNo, amnt: res.amnt }
|
||||
this.resMessage = res.message
|
||||
// 如果是支付中,2秒后,重新获取一次支付状态
|
||||
if (this.payStatus == '4' && !this.isReloaded) {
|
||||
this.isReloaded = true
|
||||
setTimeout(() => {
|
||||
this.queryPayState()
|
||||
}, 2000)
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重新支付
|
||||
rePayMent() {
|
||||
// localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
// 再次支付 salelist为 0
|
||||
localStorage.salelist = '0'
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/list'
|
||||
url: location.origin + '/#/sale/payMent'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/list'
|
||||
path: '/sale/payMent'
|
||||
}
|
||||
})
|
||||
},
|
||||
//更换卡号
|
||||
changeCard() {
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询支付状态
|
||||
queryPayState() {
|
||||
this.$toast.clear()
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let data = { orderNo: this.paySeqNo }
|
||||
getPayState(data).then(res => {
|
||||
this.$toast.clear()
|
||||
this.isReady = true
|
||||
console.log('----支付结果查询', JSON.stringify(res))
|
||||
if (res.result == '0') {
|
||||
this.payStatus = res.payStatus
|
||||
this.payInfo = { appntName: res.appntName, prtNo: res.prtNo, amnt: res.amnt }
|
||||
this.resMessage = res.message
|
||||
// 如果是支付中,2秒后,重新获取一次支付状态
|
||||
if (this.payStatus == '4' && !this.isReloaded) {
|
||||
this.isReloaded = true
|
||||
setTimeout(() => {
|
||||
this.queryPayState()
|
||||
}, 2000)
|
||||
}
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
created() {
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
},
|
||||
// 重新支付
|
||||
rePayMent() {
|
||||
// localStorage.orderNo = order.orderInfoDTO.orderNo
|
||||
// 再次支付 salelist为 0
|
||||
localStorage.salelist = '0'
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/payMent'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/payMent'
|
||||
}
|
||||
})
|
||||
},
|
||||
//更换卡号
|
||||
changeCard() {
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/AccountInformation'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/AccountInformation'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
},
|
||||
async mounted() {
|
||||
let that = this
|
||||
// document.body.style.backgroundColor = '#fff'
|
||||
that.payStatus = window.localStorage.getItem('payStatus')
|
||||
that.payInfo = JSON.parse(window.localStorage.getItem('payInfo'))
|
||||
if (window.localStorage.getItem('resMessage') != null) {
|
||||
that.resMessage = window.localStorage.getItem('resMessage').replace(/\\n/g, '<br>')
|
||||
}
|
||||
async mounted() {
|
||||
let that = this
|
||||
// document.body.style.backgroundColor = '#fff'
|
||||
that.payStatus = window.localStorage.getItem('payStatus')
|
||||
that.payInfo = JSON.parse(window.localStorage.getItem('payInfo'))
|
||||
if (window.localStorage.getItem('resMessage') != null) {
|
||||
that.resMessage = window.localStorage.getItem('resMessage').replace(/\\n/g, '<br>')
|
||||
}
|
||||
|
||||
this.paySeqNo = this.$route.query.RdSeq
|
||||
if (!this.paySeqNo) {
|
||||
this.$toast({ message: '参数错误,缺少支付流水号‘RdSeq’查询参数', duration: 5000 })
|
||||
} else {
|
||||
this.queryPayState()
|
||||
this.paySeqNo = this.$route.query.RdSeq
|
||||
if (!this.paySeqNo) {
|
||||
this.$toast({ message: '参数错误,缺少支付流水号‘RdSeq’查询参数', duration: 5000 })
|
||||
} else {
|
||||
this.queryPayState()
|
||||
}
|
||||
//获取代理人管理机构 52贵州 45广西
|
||||
let dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.manageComCode = dataReturn.manageComCode
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
}
|
||||
//获取代理人管理机构 52贵州 45广西
|
||||
let dataReturn = await riskRules.getAgentInfoFunc(this)
|
||||
this.manageComCode = dataReturn.manageComCode
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.payResult-container {
|
||||
.payResult-header {
|
||||
width: 345px;
|
||||
// height: 143px;
|
||||
.payResult-img {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
.payResult-container {
|
||||
.payResult-header {
|
||||
width: 345px;
|
||||
// height: 143px;
|
||||
.payResult-img {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// /deep/ .van-cell__value {
|
||||
// text-align: left;
|
||||
// }
|
||||
// /deep/ .van-cell__value {
|
||||
// text-align: left;
|
||||
// }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user