[FIX]【保全】退保-是否需要上传身份证件影像问题修复;受益人变更

This commit is contained in:
yuweiqi
2020-06-11 19:09:44 +08:00
parent 90a944866a
commit c85a38b262
16 changed files with 406 additions and 452 deletions

View File

@@ -1,29 +1,30 @@
//保全 定义相关组件 //保全 定义相关组件
//common公用页面
const Search = () => import('@/views/ebiz/preserve/common/Search') const Search = () => import('@/views/ebiz/preserve/common/Search')
const HandleResult = () => import('@/views/ebiz/preserve/common/HandleResult') const HandleResult = () => import('@/views/ebiz/preserve/common/HandleResult')
const SubmitResult = () => import('@/views/ebiz/preserve/common/SubmitResult') const SubmitResult = () => import('@/views/ebiz/preserve/common/SubmitResult')
const PolicyList = () => import('@/views/ebiz/preserve/common/PolicyList') const PolicyList = () => import('@/views/ebiz/preserve/common/PolicyList')
//PC 续期账户变更
const RenewalInfo = () => import('@/views/ebiz/preserve/pc/RenewalInfo') const RenewalInfo = () => import('@/views/ebiz/preserve/pc/RenewalInfo')
const PcImageUpload = () => import('@/views/ebiz/preserve/pc/ImageUpload') const PcImageUpload = () => import('@/views/ebiz/preserve/pc/ImageUpload')
const RenewalConfirmation = () => import('@/views/ebiz/preserve/pc/RenewalConfirmation') const RenewalConfirmation = () => import('@/views/ebiz/preserve/pc/RenewalConfirmation')
const AutopayAuthorization = () => import('@/views/ebiz/preserve/pc/AutopayAuthorization') const AutopayAuthorization = () => import('@/views/ebiz/preserve/pc/AutopayAuthorization')
//BB 联系方式变更
const contactInfo = () => import('@/views/ebiz/preserve/bb/ContactInfo') const contactInfo = () => import('@/views/ebiz/preserve/bb/ContactInfo')
const contacAgreement = () => import('@/views/ebiz/preserve/bb/ContacAgreement') const contacAgreement = () => import('@/views/ebiz/preserve/bb/ContacAgreement')
const contactConfirmation = () => import('@/views/ebiz/preserve/bb/ContactConfirmation') const contactConfirmation = () => import('@/views/ebiz/preserve/bb/ContactConfirmation')
//BC 受益人变更
const BeneficiaryInfo = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfo') const BeneficiaryInfo = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfo')
const bcImageUpload = () => import('@/views/ebiz/preserve/bc/ImageUpload') const BcImageUpload = () => import('@/views/ebiz/preserve/bc/ImageUpload')
const beneficiaryInfoAdd = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfoAdd') const BeneficiaryInfoAdd = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfoAdd')
const beneficiaryInfoDetail = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfoDetail') const beneficiaryInfoDetail = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfoDetail')
const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/bc/BeneficiaryConfirmation') const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/bc/BeneficiaryConfirmation')
//退保
const SurrenderInfo = () => import('@/views/ebiz/preserve/ct/SurrenderInfo') const SurrenderInfo = () => import('@/views/ebiz/preserve/ct/SurrenderInfo')
const SurrenderConfirmation = () => import('@/views/ebiz/preserve/ct/SurrenderConfirmation') const SurrenderConfirmation = () => import('@/views/ebiz/preserve/ct/SurrenderConfirmation')
const SurrenderTip = () => import('@/views/ebiz/preserve/ct/SurrenderTip') const SurrenderTip = () => import('@/views/ebiz/preserve/ct/SurrenderTip')
const CtImageUpload = () => import('@/views/ebiz/preserve/ct/ImageUpload') const CtImageUpload = () => import('@/views/ebiz/preserve/ct/ImageUpload')
//保全进度查询及详情页面
const Progress = () => import('@/views/ebiz/preserve/Progress') const Progress = () => import('@/views/ebiz/preserve/Progress')
const Contact = () => import('@/views/ebiz/preserve/detail/Contact') const Contact = () => import('@/views/ebiz/preserve/detail/Contact')
const Beneficiary = () => import('@/views/ebiz/preserve/detail/Beneficiary') const Beneficiary = () => import('@/views/ebiz/preserve/detail/Beneficiary')
@@ -98,8 +99,8 @@ export default [
}, },
{ {
path: '/preserve/bc/beneficiaryInfoAdd', path: '/preserve/bc/beneficiaryInfoAdd',
name: 'beneficiaryInfoAdd', name: 'BeneficiaryInfoAdd',
component: beneficiaryInfoAdd, component: BeneficiaryInfoAdd,
meta: { meta: {
title: '指定受益人信息', title: '指定受益人信息',
index: 105 index: 105
@@ -125,8 +126,8 @@ export default [
}, },
{ {
path: '/preserve/bc/imageUpload', path: '/preserve/bc/imageUpload',
name: 'bcImageUpload', name: 'BcImageUpload',
component: bcImageUpload, component: BcImageUpload,
meta: { meta: {
title: '上传影像资料', title: '上传影像资料',
index: 7 index: 7

View File

@@ -9,7 +9,7 @@
<div class="fs14 pv12 ph15 van-hairline--bottom flex"> <div class="fs14 pv12 ph15 van-hairline--bottom flex">
<label class="c-gray-dark">身故受益人</label> <label class="c-gray-dark">身故受益人</label>
<div class="ml20 c-gray-darker"> <div class="ml20 c-gray-darker">
<van-radio-group :disabled="isDisType" v-model="type" class="flex"> <van-radio-group disabled v-model="type" class="flex">
<van-radio name="1">法定受益人</van-radio> <van-radio name="1">法定受益人</van-radio>
<van-radio name="2" class="ml10">指定受益人</van-radio> <van-radio name="2" class="ml10">指定受益人</van-radio>
</van-radio-group> </van-radio-group>
@@ -38,18 +38,9 @@
</li> </li>
</ul> </ul>
</div> </div>
<van-dialog <van-dialog v-model="show" title="提示" show-cancel-button @confirm="authConfirm(authCode)" @cancel="clearTimer">
v-model="show"
title="短信确认"
show-cancel-button
class="dialog-delete"
cancelButtonColor="#4FC6B3"
confirmButtonColor="#FFFFFF"
@confirm="authConfirm(authCode)"
@cancel="clearTimer"
>
<p class="p10 fs14">向此手机发送验证码确认用户身份</p> <p class="p10 fs14">向此手机发送验证码确认用户身份</p>
<p class="p10 fs14" style="border-bottom: 1px solid #ebedf0;">{{ '15512341234' | Mask }}</p> <p class="p10 fs14" style="border-bottom: 1px solid #ebedf0;">{{ customerInfo.customerMobile | mask }}</p>
<van-cell-group class="flex align-items-c pr5 mb15"> <van-cell-group class="flex align-items-c pr5 mb15">
<van-field maxlength="6" placeholder="请输入手机验证码" v-model="authCode" clearable label-width="0" /> <van-field maxlength="6" placeholder="请输入手机验证码" v-model="authCode" clearable label-width="0" />
<van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000"> <van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">
@@ -58,13 +49,16 @@
</van-cell-group> </van-cell-group>
</van-dialog> </van-dialog>
<van-button type="danger" class="bottom-btn" @click="nextStep">提交申请</van-button> <van-button type="danger" class="bottom-btn" @click="show = true">提交申请</van-button>
</div> </div>
</template> </template>
<script> <script>
import { Field, CellGroup, RadioGroup, Radio, Icon, Dialog } from 'vant' import { Field, CellGroup, RadioGroup, Radio, Icon, Dialog } from 'vant'
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale' import { getAuthCode } from '@/api/ebiz/sale/sale'
import { queryConfirmDetail, changeEdor } from '@/api/ebiz/preserve/preserve'
import filters from '@/views/ebiz/preserve/filters'
export default { export default {
name: 'BeneficiaryConfirmation', name: 'BeneficiaryConfirmation',
components: { components: {
@@ -76,56 +70,55 @@ export default {
[Dialog.name]: Dialog [Dialog.name]: Dialog
}, },
filters: { filters: {
Mask: function(value) { mask: filters.mask
if (value) {
return value.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
} else {
return ''
}
}
}, },
data() { data() {
let feachData = { // let feachData = {
surrenderDTOList: [ // surrenderDTOList: [
{ // {
surrenderId: '', // surrenderId: '',
edorapplyNo: '', // edorapplyNo: '',
surrenderType: '2', // surrenderType: '2',
bnfDTOs: [] // bnfDTOs: []
} // }
] // ]
} // }
return { return {
show: false, // 获取短信验证码 show: false, // 获取短信验证码
codeDisabled: false, // 获取验证码按钮是否禁用 codeDisabled: false, // 获取验证码按钮是否禁用
timeId: null, // 计时器ID timeId: null, // 计时器ID
countDown: 60, // 倒计时 countDown: 60, // 倒计时
authCode: '', // 验证码 authCode: '', // 验证码
feachData: feachData, // feachData: feachData,
type: '', type: '',
isDisType: false, sessionId: '',
policy: null,
policy: JSON.parse(localStorage['preserve-policy']),
customerInfo: JSON.parse(localStorage['preserve-customerInfo']),
insuredName: '', //被保险人 insuredName: '', //被保险人
beneficiaries: [] // 指定受益人列表 beneficiaries: [] // 指定受益人列表
} }
}, },
created() { created() {
// 获取保单列表存储的数据 // 获取保单列表存储的数据
this.policy = JSON.parse(localStorage['preserve-policy'])
this.insuredName = this.policy.insuredName this.insuredName = this.policy.insuredName
this.type = this.policy.bnfDTOs[0].bnfType for (let i of this.policy.bnfDTOs) {
this.isDisType = true if (i.isNewInfo == '0') {
this.beneficiaries = this.policy.bnfDTOs return (this.type = i.isLegal == '0' ? '2' : '1')
}
}
},
async mounted() {
await this.init()
this.beneficiaries = this.policy.bnfDTOs.filter(v => {
return v.isNewInfo == '0' && v.isLegal == '0'
})
}, },
mounted() {},
methods: { methods: {
//告知信息 //详情
nextStep() {
this.showAuth()
},
detail(index) { detail(index) {
// edit=0 // edit=0
let path = '/preserve/BeneficiaryInfoDetail?edit=' + index let path = '/preserve/BC/BeneficiaryInfoDetail?edit=' + index
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
@@ -136,9 +129,26 @@ export default {
} }
}) })
}, },
// 显示验证码 van-dialog init() {
showAuth() { return new Promise((resolve, reject) => {
this.show = true queryConfirmDetail({
surrenderId: this.customerInfo.surrenderId,
edorType: 'BC'
}).then(
res => {
if (res.result == 0) {
console.log('res========', res)
this.beneficiaries = res.content.content
resolve()
} else {
reject(this.$toast(res.resultMessage))
}
},
error => {
reject(this.$toast(error))
}
)
})
}, },
// 获取短信验证码 // 获取短信验证码
getAuthCode() { getAuthCode() {
@@ -152,22 +162,18 @@ export default {
this.countDown = 60 this.countDown = 60
} }
}, 1000) }, 1000)
getAuthCode({ getAuthCode({
operateType: 'appntInfoEntry', operateType: 'appntInfoEntry',
sessionId: '', type: 'H5',
validateCode: '', operateCode: this.customerInfo.customerMobile,
operateCode: this.customerMobile, system: 'agentApp',
system: '',
operateCodeType: '0' operateCodeType: '0'
}).then(res => { }).then(res => {
console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.sessionId = res.sessionId this.sessionId = res.sessionId
} else { } else {
this.$toast({ this.$toast(res.resultMessage)
message: res.resultMessage,
onClose: this.showAuth
})
} }
}) })
}, },
@@ -175,7 +181,7 @@ export default {
async authConfirm() { async authConfirm() {
//清理计时器 //清理计时器
this.clearTimer() this.clearTimer()
this.changeSubmit() this.submit()
}, },
// 清理计时器 // 清理计时器
clearTimer() { clearTimer() {
@@ -184,42 +190,35 @@ export default {
this.countDown = 60 this.countDown = 60
this.codeDisabled = false this.codeDisabled = false
}, },
//提交变更申请 //确认变更
async changeSubmit() { submit() {
if (!this.sessionId) { let data = {
this.$toast({ platformType: 'APP',
message: '请先获取验证码', edorType: 'BC',
onClose: this.showAuth operateType: '04',
}) surrenderId: this.customerInfo.surrenderId,
return edorApplyNo: this.customerInfo.edorApplyNo,
checkCodeDTO: {
smsId: this.sessionId,
code: this.authCode
}
} }
let res = await autchCodeCheck({ changeEdor(data).then(res => {
smsId: this.sessionId, if (res.result == 0) {
code: this.authCode this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/common/submitResult`
},
routerInfo: {
path: `/preserve/common/submitResult`
}
})
} else {
this.$toast(res.resultMessage)
}
}) })
if (res.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/submitResult`,
backToFirst: '1'
},
routerInfo: {
path: `/preserve/submitResult`
}
})
} else {
this.show = false
this.$toast({
message: res.resultMessage,
onClose: this.showAuth
})
}
} }
},
beforeDestroy() {
//清理计时器
this.clearTimer()
} }
} }
</script> </script>

View File

@@ -32,7 +32,7 @@
</div> </div>
<p class="mt20"> <p class="mt20">
<span class="c-gray-dark">是被保险人的</span> <span class="c-gray-dark">是被保险人的</span>
<span class="ml20">{{ item.relationToInsured | idToText('relationToAppnt') }}</span> <span class="ml20">{{ item.relationToInsured | idToText('edorRelationToAppnt') }}</span>
</p> </p>
<p class="mt10"> <p class="mt10">
<span class="c-gray-dark">受益份额</span> <span class="c-gray-dark">受益份额</span>
@@ -44,12 +44,20 @@
<div class="add-btn mt20 text-center p15 c-gray-base" @click="add">+ 添加指定受益人</div> <div class="add-btn mt20 text-center p15 c-gray-base" @click="add">+ 添加指定受益人</div>
</div> </div>
<van-button type="danger" class="bottom-btn" @click="nextStep">下一步</van-button> <van-button type="danger" class="bottom-btn" @click="nextStep">下一步</van-button>
<!-- 错误提示弹窗 -->
<div class="dialog-container">
<van-dialog v-model="dialogShow" title="提示" @confirm="dialogShow = false" confirmButtonColor="#fff">
<p class="p15 pb20 fs14 text-center">当前顺位受益比例总和不等于100%</p>
</van-dialog>
</div>
</div> </div>
</template> </template>
<script> <script>
import { RadioGroup, Radio, Icon, Dialog } from 'vant' import { RadioGroup, Radio, Icon, Dialog } from 'vant'
import { changeEdor, policyInfo } from '@/api/ebiz/preserve/preserve' import { changeEdor, policyInfo } from '@/api/ebiz/preserve/preserve'
import filters from '@/views/ebiz/preserve/filters'
export default { export default {
name: 'BeneficiaryInfo', name: 'BeneficiaryInfo',
@@ -61,10 +69,14 @@ export default {
}, },
data() { data() {
return { return {
riskList: [],
dialogShow: false, //错误弹窗是否显示
type: '', type: '',
isDisType: false, isDisType: false,
policy: null, policy: null,
customerInfo: {}, //客户详情 customerInfo: {}, //客户详情
insuredInfo: {}, //被保险人信息
appntInfo: {}, //投保人信息
insuredName: '', //被保险人 insuredName: '', //被保险人
beneficiaries: [] // 指定受益人列表 beneficiaries: [] // 指定受益人列表
} }
@@ -110,6 +122,12 @@ export default {
res => { res => {
if (res.result == '0') { if (res.result == '0') {
this.beneficiaries = res.content.cont.bcBnfList this.beneficiaries = res.content.cont.bcBnfList
this.riskList = res.content.cont.riskList
this.insuredInfo = res.content.cont.insuredList[0]
this.appntInfo = res.content.cont.appnt
this.policy.appntInfo = this.appntInfo
this.policy.insuredInfo = this.insuredInfo
localStorage['preserve-policy'] = JSON.stringify(this.policy)
//isNewInfo 是否新信息 0-是 1-否 //isNewInfo 是否新信息 0-是 1-否
this.beneficiaries.forEach(item => { this.beneficiaries.forEach(item => {
item.isNewInfo = '1' item.isNewInfo = '1'
@@ -127,7 +145,7 @@ export default {
}, },
//下一步 //下一步
nextStep() { nextStep() {
if (this.type == 2 && this.beneficiaries.length == 0) { if (this.type == 2 && this.beneficiaries.length == 1) {
this.$toast('受益人列表不能为空') this.$toast('受益人列表不能为空')
return return
} }
@@ -136,20 +154,24 @@ export default {
beneRatio += Number(item.bnfLot) beneRatio += Number(item.bnfLot)
}) })
if (beneRatio != 100 && !(this.beneficiaries.length == 1 && this.beneficiaries[0].isLegal == '1')) { if (beneRatio != 100 && !(this.beneficiaries.length == 1 && this.beneficiaries[0].isLegal == '1')) {
return this.$toast('受益人受益比例不合法') return (this.dialogShow = true)
} }
let feachData = { let feachData = {
platformType: 'APP', platformType: 'app',
edorType: 'BC', edorType: 'BC',
operateType: '01', operateType: '01',
bcBnfDTOList: this.beneficiaries bcBnfDTOList: this.beneficiaries
} }
changeEdor(feachData) changeEdor(feachData).then(
.then(res => { res => {
if (res.result == 0) { if (res.result == 0) {
this.policy.bnfDTOs = this.beneficiaries this.policy.bnfDTOs = this.beneficiaries
localStorage['preserve-policy'] = JSON.stringify(this.policy) localStorage['preserve-policy'] = JSON.stringify(this.policy)
localStorage.removeItem('fromAddBC') localStorage.removeItem('fromAddBC')
this.customerInfo.surrenderId = res.content.surrenderId
this.customerInfo.edorApplyNo = res.content.edorApplyNo
localStorage.setItem('preserve-customerInfo', JSON.stringify(this.customerInfo))
localStorage.setItem('preserve-policy', JSON.stringify(this.policy))
let path = '' let path = ''
if (this.type != 2) { if (this.type != 2) {
path = '/preserve/common/HandleResult?entry=BC' path = '/preserve/common/HandleResult?entry=BC'
@@ -164,23 +186,26 @@ export default {
routerInfo: path routerInfo: path
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.content)
} }
}) },
.catch(err => { error => {
console.log(err) console.log(error)
}) }
)
}, },
//添加受益人 //添加受益人
add() { add() {
let beneRatio = 0 let beneRatio = 0
this.beneficiaries.forEach(item => { this.beneficiaries.forEach(item => {
beneRatio += parseFloat(item.bnfLot) beneRatio += parseFloat(item.bnfLot | 0)
}) })
console.log(beneRatio)
if (beneRatio >= 100) { if (beneRatio >= 100) {
return this.$toast('受益份额已满~') return this.$toast('受益份额已满~')
} }
this.policy.bnfDTOs = this.beneficiaries
this.checkIsDetail(this.riskList)
localStorage['preserve-policy'] = JSON.stringify(this.policy)
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
@@ -213,6 +238,7 @@ export default {
// 编辑受益人 // 编辑受益人
editBeneficiary(index) { editBeneficiary(index) {
this.policy.bnfDTOs = this.beneficiaries this.policy.bnfDTOs = this.beneficiaries
this.checkIsDetail(this.riskList)
localStorage['preserve-policy'] = JSON.stringify(this.policy) localStorage['preserve-policy'] = JSON.stringify(this.policy)
let path = '/preserve/bc/BeneficiaryInfoAdd?edit=' + index let path = '/preserve/bc/BeneficiaryInfoAdd?edit=' + index
this.$jump({ this.$jump({
@@ -224,9 +250,23 @@ export default {
path: path path: path
} }
}) })
},
/*判断是否需要填写手机号等详细信息
新增/编辑指定受益人页面——只有当趸交保费≥20万元或期交保费*总期数≥20万元时联系电话、联系地址、职业类别才可显示*/
checkIsDetail(arr) {
//TODO
let isDetailFlag = '0' //是否需要填写手机号等详细信息 0-是 1-否
let totalPrem = 0
arr.forEach(v => {
totalPrem += Number(v.payEndYear) == 1000 ? Number(v.prem) : Number(v.payEndYear) * Number(v.prem)
})
isDetailFlag = totalPrem >= 200000 ? '0' : '1'
this.policy.isDetailFlag = isDetailFlag
} }
}, },
filters: {} filters: {
idToText: filters.idToText
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -243,4 +283,16 @@ export default {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
} }
.dialog-container {
/deep/.van-dialog__confirm {
background-color: #e9332e !important;
}
/deep/.van-dialog__header {
color: #e9332e !important;
padding-bottom: 5px;
}
/deep/.van-dialog {
width: 77%;
}
}
</style> </style>

View File

@@ -1,9 +1,9 @@
<template> <template>
<div class="add-beneficiary-container pb50"> <div class="beneficiary-info-add-container pb50">
<!-- 基本信息 --> <!-- 基本信息 -->
<van-cell-group> <van-cell-group>
<van-field <van-field
:value="userInfo.relationToInsured | idToText('relationToAppnt')" :value="userInfo.relationToInsured | idToText('edorRelationToAppnt')"
required required
readonly readonly
label="是被保险人的" label="是被保险人的"
@@ -25,8 +25,31 @@
@on-click="selectClick('1')" @on-click="selectClick('1')"
:readonly="!!$route.query.edit" :readonly="!!$route.query.edit"
></customer-picker> ></customer-picker>
<select-radio :radios="sexRadio" required label="性别" :value.sync="userInfo.sex"></select-radio>
<van-field <van-field
:value="userInfo.idType | idToText('idType')" :value="userInfo.nativeplace | idToText('edorNativeplace')"
readonly
label="国家/地区"
name="国家/地区"
required
v-validate="'required'"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('1')"
/>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
required
:value.sync="userInfo.birthday"
type="date"
:flag="true"
ref="birthday"
@confirm="onDateConfirm($event, '2')"
></FieldDatePicter>
<van-field
:value="userInfo.idType | idToText('edorIdType')"
v-validate="'required'" v-validate="'required'"
readonly readonly
required required
@@ -66,28 +89,18 @@
name="证件截止日期" name="证件截止日期"
:required="isRequired" :required="isRequired"
:defaultDate="new Date()" :defaultDate="new Date()"
:value.sync="userInfo.idExpDate" :value.sync="userInfo.idExpDate == '9999-01-01' ? '' : userInfo.idExpDate"
type="date" type="date"
@confirm="onDateConfirm($event, '1')" @confirm="onDateConfirm($event, '1')"
ref="effectiveDate" ref="effectiveDate"
:flag="effectiveDateShow" :flag="effectiveDateShow"
:readonly="idLimit" :readonly="idLimit"
:disabled="userInfo.effectiveDateType"
></FieldDatePicter> ></FieldDatePicter>
<div class="border-bt relative fs14 p10 flex align-center"> <div class="border-bt relative fs14 p10 flex align-center">
<van-checkbox v-model="userInfo.effectiveDateType" class="fr" :disabled="effectiveDateTypeAble" @change="effectiveDataTypeChange">长期</van-checkbox> <van-checkbox v-model="userInfo.effectiveDateType" class="fr" :disabled="effectiveDateTypeAble" @change="effectiveDataTypeChange">长期</van-checkbox>
</div> </div>
<select-radio :radios="sexRadio" required label="性别" :value.sync="userInfo.sex"></select-radio>
<van-field
:value="userInfo.nationality | idToText('nativeplace')"
readonly
label="国家/地区"
name="国家/地区"
required
v-validate="'required'"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('1')"
/>
<van-field <van-field
v-model="userInfo.bnfOrder" v-model="userInfo.bnfOrder"
required required
@@ -104,14 +117,15 @@
name="受益比例" name="受益比例"
placeholder="请输入" placeholder="请输入"
required required
v-validate="'required|onlyInteger'" v-validate="'required|onlyNumber'"
maxlength="3" maxlength="3"
clearable clearable
/> />
<template v-if="false"> <!-- <template> -->
<template v-if="isDetailFlag == '0'">
<van-field <van-field
v-model="userInfo.mobile" v-model="userInfo.phone"
clearable clearable
label="联系电话" label="联系电话"
name="联系电话" name="联系电话"
@@ -131,7 +145,7 @@
v-validate="'required'" v-validate="'required'"
@click="chooseArea" @click="chooseArea"
/> />
<van-field v-model="userInfo.village" label="" name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" /> <van-field v-model="userInfo.postalAddress" label="" name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
<van-field v-model="userInfo.email" required label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable /> <van-field v-model="userInfo.email" required label="电子邮箱" name="电子邮箱" placeholder="请输入" v-validate="'required|email'" clearable />
<occupation-picker <occupation-picker
:value.sync="userInfo.occupationCode" :value.sync="userInfo.occupationCode"
@@ -158,6 +172,13 @@
<van-popup v-model="areaShow" position="bottom"> <van-popup v-model="areaShow" position="bottom">
<van-area :area-list="areaList" :value="areaValue" @confirm="sureArea($event, '1')" @cancel="areaShow = false" /> <van-area :area-list="areaList" :value="areaValue" @confirm="sureArea($event, '1')" @cancel="areaShow = false" />
</van-popup> </van-popup>
<!-- 错误提示弹窗 -->
<div class="dialog-container">
<van-dialog v-model="dialogShow" title="提示" @confirm="dialogShow = false" confirmButtonColor="#fff">
<p class="p15 pb20 fs14 text-center">当前顺位受益比例总和不能超过100%</p>
</van-dialog>
</div>
</div> </div>
</template> </template>
@@ -166,11 +187,10 @@ import { Field, CellGroup, Checkbox, Popup, Picker, Area } from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio' import SelectRadio from '@/components/ebiz/SelectRadio'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter' import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker' import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
// import DataDictionary from '@/assets/js/utils/data-dictionary'
import dataDic from '../js/data-dictionary.js' import dataDic from '../js/data-dictionary.js'
import getAreaName from '@/views/ebiz/preserve/js/utils/get-area-name'
import areaList from '@/views/ebiz/preserve/js/utils/area'
import areaList from '@/assets/js/utils/area'
import getAreaName from '@/assets/js/utils/get-area-name'
import utilsAge from '@/assets/js/utils/age' import utilsAge from '@/assets/js/utils/age'
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan' import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker' import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
@@ -179,10 +199,8 @@ import { idToData } from '../js/verification'
import { selectComp } from '../js/methods' import { selectComp } from '../js/methods'
import filters from '@/views/ebiz/preserve/filters' import filters from '@/views/ebiz/preserve/filters'
let relationToInsured = dataDic.edorRelationToAppnt
export default { export default {
name: 'beneficiaryInfoAdd', name: 'BeneficiaryInfoAdd',
components: { components: {
[SelectRadio.name]: SelectRadio, [SelectRadio.name]: SelectRadio,
[FieldDatePicter.name]: FieldDatePicter, [FieldDatePicter.name]: FieldDatePicter,
@@ -198,6 +216,8 @@ export default {
}, },
data() { data() {
return { return {
isDetailFlag: '0', //是否需要填写手机号等详细信息 0-是 1-否
dialogShow: false, //错误弹窗是否显示
effectiveDateTypeAble: true, //长期按钮是否禁用 effectiveDateTypeAble: true, //长期按钮是否禁用
isScan: false, //是否显示证件扫描组件 isScan: false, //是否显示证件扫描组件
sexRadio: [ sexRadio: [
@@ -217,7 +237,7 @@ export default {
pickerType: undefined, pickerType: undefined,
columns: [], columns: [],
valueKey: 'text', valueKey: 'text',
nationality: '', nativeplace: '',
idType: '居民身份证', idType: '居民身份证',
degree: '', degree: '',
socialSecurity: '', socialSecurity: '',
@@ -231,9 +251,9 @@ export default {
userInfo: { userInfo: {
bnfType: '1', //受益人类别 0-生存受益人 1-身故受益人 bnfType: '1', //受益人类别 0-生存受益人 1-身故受益人
isLegal: '0', //1-法定受益人 0-指定受益人 isLegal: '0', //1-法定受益人 0-指定受益人
bnfNo: '1', // bnfNo: '1',
relationToInsured: '', //受益人和被保人关系 relationToInsured: '', //受益人和被保人关系
bnfOrder: 1, bnfOrder: '1',
bnfGrade: '', bnfGrade: '',
name: '', name: '',
sex: '0', sex: '0',
@@ -243,7 +263,7 @@ export default {
idExpDate: '', //证件截止日期 idExpDate: '', //证件截止日期
phone: '', phone: '',
birthday: '', birthday: '',
nationality: '1', nativeplace: '1',
email: '', email: '',
province: '', province: '',
city: '', city: '',
@@ -268,6 +288,7 @@ export default {
created() { created() {
this.policy = JSON.parse(localStorage['preserve-policy']) this.policy = JSON.parse(localStorage['preserve-policy'])
this.bnfDTOs = this.policy.bnfDTOs this.bnfDTOs = this.policy.bnfDTOs
this.isDetailFlag = this.policy.isDetailFlag
this.bnfDTOs.map(i => { this.bnfDTOs.map(i => {
if (i.idExpDate == '9999-01-01') { if (i.idExpDate == '9999-01-01') {
i.effectiveDateType = true i.effectiveDateType = true
@@ -307,7 +328,7 @@ export default {
} else if (pickerType == '2') { } else if (pickerType == '2') {
this.columns = dataDic.edorIdType this.columns = dataDic.edorIdType
} else if (pickerType == '7') { } else if (pickerType == '7') {
this.columns = relationToInsured this.columns = dataDic.edorRelationToAppnt
} }
}, },
//确认选择字段 //确认选择字段
@@ -315,7 +336,7 @@ export default {
// console.log(value,this.pickerType) // console.log(value,this.pickerType)
this.popupShow = false this.popupShow = false
if (this.pickerType == '1') { if (this.pickerType == '1') {
;[this.userInfo.nationality, this.nationality] = [value.id, value.text] ;[this.userInfo.nativeplace, this.nativeplace] = [value.id, value.text]
} else if (this.pickerType == '2') { } else if (this.pickerType == '2') {
this.idLimit = false this.idLimit = false
this.userInfo.idNo = this.userInfo.idExpDate = this.userInfo.birthday = '' this.userInfo.idNo = this.userInfo.idExpDate = this.userInfo.birthday = ''
@@ -329,14 +350,6 @@ export default {
this.effectiveDateTypeAble = false this.effectiveDateTypeAble = false
} }
;[this.userInfo.idType, this.idType] = [value.id, value.text] ;[this.userInfo.idType, this.idType] = [value.id, value.text]
} else if (this.pickerType == '3') {
;[this.userInfo.degree, this.degree] = [value.id, value.text]
} else if (this.pickerType == '4') {
;[this.userInfo.socialSecurity, this.socialSecurity] = [value.id, value.text]
} else if (this.pickerType == '5') {
;[this.userInfo.taxIdentity, this.taxIdentity] = [value.id, value.text]
} else if (this.pickerType == '6') {
;[this.userInfo.marriage, this.marriage] = [value.id, value.text]
} else if (this.pickerType == '7') { } else if (this.pickerType == '7') {
;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text] ;[this.userInfo.relationToInsured, this.relationToAppnt] = [value.id, value.text]
} }
@@ -394,7 +407,7 @@ export default {
}) })
this.userInfo.name = data.customerName //用户名 this.userInfo.name = data.customerName //用户名
this.userInfo.sex = data.customerSex.toString() //性别 this.userInfo.sex = data.customerSex.toString() //性别
this.userInfo.nationality = data.country //国家地区 this.userInfo.nativeplace = data.country //国家地区
this.userInfo.birthday = data.birthday //出生日期 this.userInfo.birthday = data.birthday //出生日期
this.userInfo.idType = data.customerIdType //证件类型 this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件号码 this.userInfo.idNo = data.customerIdNumber //证件号码
@@ -421,8 +434,12 @@ export default {
// 页面跳转 // 页面跳转
this.$validator.validate().then(valid => { this.$validator.validate().then(valid => {
if (true === valid) { if (true === valid) {
//证件截止日期校验
if (!this.userInfo.idExpDate && !this.userInfo.effectiveDateType) {
return this.$toast('证件截止日期不能为空')
}
// 受益人是被保险人的配偶 // 受益人是被保险人的配偶
if (this.userInfo.relationToInsured == '2') { if (this.userInfo.relationToInsured == '01') {
//如果性别男小于22岁 或者 性别女小于20岁 //如果性别男小于22岁 或者 性别女小于20岁
if ((this.userInfo.sex == '0' && age < 22) || (this.userInfo.sex == '1' && age < 20)) { if ((this.userInfo.sex == '0' && age < 22) || (this.userInfo.sex == '1' && age < 20)) {
return this.$toast('年龄与婚姻状况不符') return this.$toast('年龄与婚姻状况不符')
@@ -496,10 +513,10 @@ export default {
// 收益份额不超过 100% // 收益份额不超过 100%
let ratio = 0 let ratio = 0
this.bnfDTOs.forEach(item => { this.bnfDTOs.forEach(item => {
ratio += parseFloat(item.bnfLot) ratio += parseFloat(item.bnfLot | 0)
}) })
if (!this.$route.query.edit) { if (!this.$route.query.edit) {
ratio += parseFloat(this.userInfo.bnfLot) ratio += parseFloat(this.userInfo.bnfLot | 0)
if (this.userInfo.idNo != '') { if (this.userInfo.idNo != '') {
// 受益人不能重复添加 (证件号码为基准) // 受益人不能重复添加 (证件号码为基准)
@@ -521,7 +538,7 @@ export default {
} }
} }
if (ratio > 100) { if (ratio > 100) {
return this.$toast('受益份额有误,请重新输入~') return (this.dialogShow = true)
} }
if (!this.$route.query.edit) { if (!this.$route.query.edit) {
@@ -627,7 +644,7 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.add-beneficiary-container { .beneficiary-info-add-container {
.title { .title {
font-weight: 600; font-weight: 600;
border-bottom: 1px solid #dadada; border-bottom: 1px solid #dadada;
@@ -635,5 +652,21 @@ export default {
/deep/.van-checkbox { /deep/.van-checkbox {
margin-left: auto; margin-left: auto;
} }
/deep/.van-field__label {
text-align: left;
width: 40%;
}
}
.dialog-container {
/deep/.van-dialog__confirm {
background-color: #e9332e !important;
}
/deep/.van-dialog__header {
color: #e9332e !important;
padding-bottom: 5px;
}
/deep/.van-dialog {
width: 77%;
}
} }
</style> </style>

View File

@@ -5,27 +5,28 @@
<div class="m20 bg-white"> <div class="m20 bg-white">
<div> <div>
<!-- 全部受益人身份证件正反面 --> <!-- 全部受益人身份证件正反面 -->
<div> <div v-for="(item, index) in fileList" :key="index">
<van-cell-group> <div v-if="item.isShow">
<van-field required label="全部受益人身份证件正反面" disabled /> <van-cell-group>
</van-cell-group> <van-field required :label="item.label" disabled />
<div @click="test('fileListIdFront', idType)" class="flex align-items-e"> </van-cell-group>
<van-uploader <div @click="test(item)">
name="fileListIdFront" <van-uploader
v-model="fileListIdFront" :name="item.name"
:after-read="afterRead" v-model="item.realFileList"
:before-delete="beforeDelete" :after-read="afterRead"
class="mt10 ml20" :before-delete="beforeDelete"
:max-count="2" class="mt10 ml20"
@delete="deleteImg" :max-count="item.max"
/> />
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="bg-white bottom-btn"> <div class="bg-white bottom-btn">
<van-button type="danger" size="large" :disabled="isDisabled" @click="nextStep" v-no-more-click="2000">下一步</van-button> <van-button type="danger" size="large" @click="nextStep" v-no-more-click="2000">下一步</van-button>
</div> </div>
</div> </div>
</template> </template>
@@ -33,8 +34,7 @@
<script> <script>
import { Cell, CellGroup, Field, Uploader, RadioGroup, Radio, Dialog, Picker, Popup } from 'vant' import { Cell, CellGroup, Field, Uploader, RadioGroup, Radio, Dialog, Picker, Popup } from 'vant'
import { uploadImg } from '@/api/ebiz/sale/sale' import { uploadImg } from '@/api/ebiz/sale/sale'
import config from '@/config' import { changeEdor } from '@/api/ebiz/preserve/preserve'
import { customerInfoChange, preserveHangUp } from '@/api/ebiz/preserve/preserve'
export default { export default {
components: { components: {
[Cell.name]: Cell, [Cell.name]: Cell,
@@ -53,152 +53,47 @@ export default {
id: '', id: '',
idType: '1', idType: '1',
type: '', type: '',
fileListIdFront: [], //身份证 fileList: [
file: '', // 图片流 {
imgName: '', // 图片名称 name: 'others',
list: [], label: '全部受益人身份证件正反面',
imageInfoType: '3', // 影像类型
subBusinessType: '3', // 影像归属 0 投保人 1 被保人 2 受益人 3 代理人
realFileList: [],
popList: [],
isShow: true, //是否显示(是否需要上传)
min: 2,
max: 500 //限制最大张数
}
],
uploadCheck: {},
entry: '', entry: '',
surrenderType: '' customerInfo: JSON.parse(localStorage.getItem('preserve-customerInfo'))
} }
}, },
created() { created() {
this.entry = JSON.parse(localStorage.customerInfo).entry // 初始化 上传影像数据
// this.accountType = this.$route.query.accountType
// this.conTractType = this.$route.query.conTractType
// switch (this.entry) {
// case 'BB': //联系方式变更
// this.surrenderType = '1'
// break
// case 'BC': //受益人变更
// this.surrenderType = '2'
// break
// case 'PC': //续期账户变更
// this.surrenderType = '3'
// break
// case 'CT': //退保
// this.surrenderType = '4'
// break
// case 'WT': //犹豫期退保
// this.surrenderType = '5'
// break
// default:
// break
// }
// 银行卡
if (window.localStorage.getItem('bankCardUrlPath') != null) {
let bankCardUrl = {
url: config.imgDomain + `/returnImageStream?a=b.jpg&imgPath=${window.localStorage.getItem('bankCardUrlPath')}`
}
this.fileListBank.push(bankCardUrl)
//续期账号变更
if (this.surrenderType == '2') {
let policyList = JSON.parse(localStorage.accountDTOList)
policyList.forEach(item => {
let obj = {
businessNo: JSON.parse(localStorage.customerInfo).edorApplyNo,
businessType: '2',
imageInfoType: '3',
rgssUrl: window.localStorage.getItem('bankCardUrlPath'),
subBusinessType: '3',
subBusinessNo: item.contNo
}
this.list.push(obj)
})
} else {
//累计红利领取
let obj = {
businessNo: JSON.parse(localStorage.customerInfo).edorApplyNo,
businessType: '2',
imageInfoType: '3',
rgssUrl: window.localStorage.getItem('bankCardUrlPath'),
subBusinessType: '3',
subBusinessNo: JSON.parse(localStorage.customerInfo).edorApplyNo
}
this.list.push(obj)
}
} else {
this.fileListBank = []
}
}, },
methods: { methods: {
test(type, id) { test(item) {
this.id = id this.uploadCheck = item
this.type = type
}, },
afterRead(file) { afterRead(file) {
console.log('afterRead')
// 此时可以自行将文件上传至服务器 // 此时可以自行将文件上传至服务器
this.file = file.content
this.imgName = file.file.name
this.upload()
},
// 上传图片
upload() {
this.$toast.loading({ this.$toast.loading({
// 持续展示 toast
duration: 0, duration: 0,
// 禁用背景点击
forbidClick: true, forbidClick: true,
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}) })
let formdata = new FormData() let formdata = new FormData()
formdata.append('imgPath', this.dataURLtoFile(this.file, this.imgName)) formdata.append('imgPath', this.dataURLtoFile(file.content, file.file.name))
uploadImg(formdata).then(res => { uploadImg(formdata).then(res => {
this.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
this.$toast.clear() this.uploadCheck.popList.push({ name: file.file.name, imgPath: res.path })
// 是投保人 console.log(this.fileList)
// 证件类型
let imageInfoType = ''
if (this.type == 'fileListIdFront' && this.id == '1') {
imageInfoType = '1'
} else if (this.type == 'fileListIdBack' && this.id == '1') {
imageInfoType = '2'
} else if (this.type == 'fileListBank') {
imageInfoType = '3'
}
//续期账号变更 subBusinessNo 传保单号, 其他传申请号
if (this.surrenderType == '2') {
let policyList = JSON.parse(localStorage.accountDTOList)
policyList.forEach(item => {
let obj = {
businessNo: JSON.parse(localStorage.customerInfo).edorApplyNo,
businessType: '2',
imageInfoType,
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: '3',
fileName: this.imgName,
subBusinessNo: item.contNo
}
this.list.push(obj)
})
} else {
let subBusinessNo = JSON.parse(localStorage.customerInfo).edorApplyNo
let obj = {
businessNo: JSON.parse(localStorage.customerInfo).edorApplyNo,
businessType: '2',
imageInfoType,
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: '3',
fileName: this.imgName,
subBusinessNo
}
this.list.push(obj)
}
} else { } else {
switch (this.type) {
case 'fileListIdFront':
this.fileListIdFront = []
break
case 'fileListIdBack':
this.fileListIdBack = []
break
case 'fileListBank':
this.fileListBank = []
break
}
this.$toast.clear()
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
} }
}) })
@@ -223,29 +118,25 @@ export default {
message: '您确定要删除吗' message: '您确定要删除吗'
}) })
.then(() => { .then(() => {
if (detail.name == 'fileListIdFront') { this.fileList.map(item => {
this.fileListIdFront = [] if (item.name == detail.name) {
} else if (detail.name == 'fileListIdBack') { // 处理
this.fileListIdBack = [] let deleteIndex = null
} else if (detail.name == 'fileListBank') { for (let i = 0; i < item.realFileList.length; i++) {
this.fileListBank = [] if (item.realFileList[i].file == file.file) {
} deleteIndex = i
this.deleteImg(file) break
}
}
item.realFileList.splice(deleteIndex, 1)
item.popList.splice(deleteIndex, 1)
}
})
}) })
.catch(() => { .catch(() => {
// cancel // cancel
}) })
}, },
// 删除图片
deleteImg(file) {
this.list.map((item, index, array) => {
if (item.fileName.indexOf(file.file.name) == -1) {
return
} else {
array.splice(index, 1)
}
})
},
// 点击下一步 // 点击下一步
nextStep() { nextStep() {
this.$toast.loading({ this.$toast.loading({
@@ -256,102 +147,66 @@ export default {
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}) })
delete this.list.fileName
let hangUpData = { let errorArr = []
surrenderDTO: { this.fileList.forEach(v => {
surrenderId: JSON.parse(localStorage.customerInfo).surrenderId, if (v.isShow) {
edorapplyNo: JSON.parse(localStorage.customerInfo).edorapplyNo, if (v.popList.length < v.min) {
edoracceptNo: '', errorArr.push(v.label)
surrenderType: this.surrenderType, }
mediaDTOList: [],
customerInfoDTOList: [
{
customerNo: JSON.parse(localStorage.customerInfo).customerNo
}
],
accountDTOList: [],
recommendDTO: {},
bonusDTOList: [],
signDTOList: []
} }
})
if (errorArr.length > 0) {
return this.$toast(`请上传${errorArr[0]}影像`)
} }
if (this.surrenderType == '2') { let saveMediaDTO = {
let hangUpList = JSON.parse(localStorage.accountDTOList) platformType: 'app',
let surrenderId = JSON.parse(localStorage.customerInfo).surrenderId.split(',') edorType: 'BC',
hangUpList.forEach((item, index) => { operateType: '02',
preserveHangUp({ customerNo: this.customerInfo.customerNo,
surrenderDTO: { name: this.customerInfo.customerName,
surrenderId: surrenderId[index], iDNo: this.customerInfo.idNo,
edorapplyNo: JSON.parse(localStorage.customerInfo).edorapplyNo, mobile: this.customerInfo.customerMobile,
edoracceptNo: '', surrenderId: this.customerInfo.surrenderId,
surrenderType: this.surrenderType, edorApplyNo: this.customerInfo.edorApplyNo,
mediaDTOList: [], mediaUploadDTOS: []
customerInfoDTOList: [
{
customerNo: JSON.parse(localStorage.customerInfo).customerNo
}
],
accountDTOList: [item],
recommendDTO: {},
bonusDTOList: [],
signDTOList: []
}
}).then(backData => {
if (backData.result == 0) {
if (index >= hangUpList.length - 1) {
this.customerInfoChange()
}
} else {
return this.$toast(backData.resultMessage)
}
})
})
} else {
preserveHangUp(hangUpData).then(backData => {
this.$toast.clear()
if (backData.result == '0') {
let customerInfo = JSON.parse(localStorage.customerInfo)
customerInfo.edoracceptNo = backData.content
localStorage.customerInfo = JSON.stringify(customerInfo)
localStorage.bankCardUrl && localStorage.removeItem('bankCardUrl')
this.customerInfoChange()
} else {
this.$toast(backData.resultMessage)
}
})
} }
}, console.log(this.fileList)
customerInfoChange() { this.fileList.forEach(item => {
customerInfoChange({ item.popList.forEach(subItem => {
surrenderDTOList: [ saveMediaDTO.mediaUploadDTOS.push(
{ Object.assign(
// surrenderType: JSON.parse(localStorage.customerInfo).surrenderType, //"1","基本信息变更" "2","续期账号变更" "3","红利领取" {},
surrenderType: this.surrenderType, {
customerInfoDTOList: [], businessNo: this.customerInfo.edorApplyNo,
mediaDTOList: this.list, businessType: item.imageInfoType,
surrenderId: JSON.parse(localStorage.customerInfo).surrenderId, imageInfoType: item.imageInfoType,
recommendDTO: {}, rgssUrl: subItem.imgPath,
bonusDTOList: [], subBusinessType: item.imageInfoType,
signDTOList: [] subBusinessNo: item.imageInfoType,
} manageComCode: item.imageInfoType
] }
}).then(res => { )
)
})
})
changeEdor(saveMediaDTO).then(res => {
this.$toast.clear()
if (res.result == 0) { if (res.result == 0) {
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
url: location.origin + '/#/preserve/handleResult', url: location.origin + '/#/preserve/common/handleResult?entry=BC',
pullRefresh: '1', pullRefresh: '1',
backToFirst: '1' backToFirst: '1'
}, },
routerInfo: { routerInfo: {
path: '/preserve/handleResult' path: '/preserve/common/handleResult?entry=BC'
} }
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.content)
} }
}) })
} }

View File

@@ -13,6 +13,8 @@
</template> </template>
<script> <script>
import utilsAge from '@/assets/js/utils/age'
export default { export default {
name: 'HandleResult', name: 'HandleResult',
data() { data() {
@@ -22,7 +24,8 @@ export default {
entry: '', entry: '',
signInvalid: '', signInvalid: '',
surrenderType: '', surrenderType: '',
customerInfo: {} customerInfo: {},
policy: {}
} }
}, },
created() { created() {
@@ -30,13 +33,16 @@ export default {
if (localStorage['preserve-customerInfo']) { if (localStorage['preserve-customerInfo']) {
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo']) this.customerInfo = JSON.parse(localStorage['preserve-customerInfo'])
} }
if (localStorage['preserve-policy']) {
this.policy = JSON.parse(localStorage['preserve-policy'])
}
// 此处处理 this.path // 此处处理 this.path
switch (this.entry) { switch (this.entry) {
case 'BB': case 'BB':
this.path = `/preserve/ContactConfirmation?entry=${this.entry}` this.path = `/preserve/BB/ContactConfirmation?entry=${this.entry}`
break break
case 'BC': case 'BC':
this.path = `/preserve/BeneficiaryConfirmation?entry=${this.entry}` this.path = `/preserve/BC/BeneficiaryConfirmation?entry=${this.entry}`
break break
case 'PC': case 'PC':
this.path = `/preserve/pc/renewalConfirmation?entry=${this.entry}` this.path = `/preserve/pc/renewalConfirmation?entry=${this.entry}`
@@ -74,21 +80,36 @@ export default {
}) })
} }
} else if (this.entry == 'BC') { } else if (this.entry == 'BC') {
// 如果 保全项是 受益人变更则进行特殊判断 /* 如果 保全项是 受益人变更则进行特殊判断
// 若被保险人≥18周岁人脸识别录入被保人本人 若被保险人≥18周岁人脸识别录入被保人本人
// 若被保险人18周岁被保险人与投保人为子女关系人脸识别录入未成年人父亲或母亲 若被保险人18周岁被保险人与投保人为子女关系人脸识别录入未成年人父亲或母亲*/
// toDo let age = utilsAge.getAge(this.policy.insuredInfo.insuredBirthday, new Date())
// if (age >= 18) {
// if (this.customerInfo.idType != '1' ) { if (this.policy.insuredInfo.idType != '0') {
// // 如果证件类型不是身份证 // 如果证件类型不是身份证——直接跳过人脸识别
// // 直接跳过人脸识别 this.jumpNextPage(this.path)
// this.jumpNextPage(this.path) } else {
// } this.toFace({
// number: this.policy.insuredInfo.idNo, //身份证号码
this.jumpNextPage(this.path) name: this.policy.insuredInfo.insuredName, //姓名
businessSource: '4' //业务来源:1-电投2-入司3-理赔4-保全
})
}
} else {
if (this.policy.appntInfo.idType != '0') {
// 如果证件类型不是身份证——直接跳过人脸识别
this.jumpNextPage(this.path)
} else {
this.toFace({
number: this.policy.appntInfo.idNo, //身份证号码
name: this.policy.appntInfo.appntName, //姓名
businessSource: '4' //业务来源:1-电投2-入司3-理赔4-保全
})
}
}
} }
}, },
jumpNextPage(path = '/preserve/bc/BeneficiaryInfo') { jumpNextPage(path) {
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
@@ -101,10 +122,7 @@ export default {
}, },
toFace(config) { toFace(config) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('face_auth', { EWebBridge.webCallAppInJs('face_auth', config)
number: this.customerInfo.idNo, //身份证号码
name: this.customerInfo.customerName //姓名
})
// 跳过人脸识别 // 跳过人脸识别
// new Promise(resolve => { // new Promise(resolve => {
// console.log('--跳过人脸识别--返回识别成功') // console.log('--跳过人脸识别--返回识别成功')

View File

@@ -77,6 +77,9 @@ export default {
} }
this.entry = this.$route.query.entry this.entry = this.$route.query.entry
await this.getPolicyList({ customerNo: this.customerInfo.customerNo, edorType: this.entry }) await this.getPolicyList({ customerNo: this.customerInfo.customerNo, edorType: this.entry })
if (this.entry == 'BC') {
localStorage.setItem('fromAddBC', '')
}
}, },
methods: { methods: {
//获取保单列表 //获取保单列表

View File

@@ -4,7 +4,7 @@
<div class=" pb80"> <div class=" pb80">
<div class="m20 bg-white"> <div class="m20 bg-white">
<div> <div>
<!-- 银行卡 --> <!-- 影像 -->
<div v-for="(item, index) in fileList" :key="index"> <div v-for="(item, index) in fileList" :key="index">
<div v-if="item.isShow"> <div v-if="item.isShow">
<van-cell-group> <van-cell-group>
@@ -106,14 +106,14 @@ export default {
}, },
created() { created() {
// 初始化 上传影像数据 // 初始化 上传影像数据
if (this.$route.query.isIdCard == '0') { if (this.$route.query.isIdCard == '1') {
this.fileList[0].isShow = false this.fileList[0].isShow = false
this.fileList[1].isShow = false this.fileList[1].isShow = false
} }
if (this.$route.query.isbankCard == '0') { if (this.$route.query.isbankCard == '1') {
this.fileList[2].isShow = false this.fileList[2].isShow = false
} }
if (this.$route.query.isPolRecvWay == '0') { if (this.$route.query.isPolRecvWay == '1') {
this.fileList[3].isShow = false this.fileList[3].isShow = false
} }
document.getElementsByTagName('body')[0].classList.add('bg-white') document.getElementsByTagName('body')[0].classList.add('bg-white')
@@ -253,7 +253,7 @@ export default {
} }
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.content)
} }
}) })
} }

View File

@@ -231,7 +231,7 @@ export default {
} }
}) })
} else { } else {
this.$toast(res.content) this.$toast(res.resultMessage)
} }
}) })
} }

View File

@@ -451,10 +451,10 @@ export default {
如果是纸质合同,需要添加纸质保单影像, 如果是纸质合同,需要添加纸质保单影像,
在此页进行判断是否需要上传身份证影像和纸质保单影像*/ 在此页进行判断是否需要上传身份证影像和纸质保单影像*/
let url = '', let url = '',
isPolRecvWay = this.polRecvWay == '1' ? '1' : '0', isPolRecvWay = this.polRecvWay != '0' ? '0' : '1', //是否需要上传纸质保单影像 0-是 1-否
isbankCard = this.accountType == '2' ? '1' : '0', isbankCard = this.accountType == '2' ? '0' : '1', //是否需要上传银行卡影像 0-是 1-否
isIdCard = this.customerInfo.idType == '1' ? '1' : '0' isIdCard = this.prem >= 10000 ? '0' : '1' //是否需要上传身份证影像 0-是 1-否
if (isIdCard == '0' && isbankCard == '0' && isPolRecvWay == '0') { if (isIdCard == '1' && isbankCard == '1' && isPolRecvWay == '1') {
url = '/preserve/common/handleResult?entry=CT' url = '/preserve/common/handleResult?entry=CT'
} else { } else {
url = `/preserve/ct/imageUpload?entry=CT&isbankCard=${isbankCard}&isIdCard=${isIdCard}&isPolRecvWay=${isPolRecvWay}` url = `/preserve/ct/imageUpload?entry=CT&isbankCard=${isbankCard}&isIdCard=${isIdCard}&isPolRecvWay=${isPolRecvWay}`
@@ -475,6 +475,8 @@ export default {
path: url path: url
} }
}) })
} else {
this.$toast(res.content)
} }
}) })
} else { } else {

View File

@@ -65,9 +65,7 @@ export default {
if (res.result == 0) { if (res.result == 0) {
this.pdfList = res.content.surrenderSignList this.pdfList = res.content.surrenderSignList
this.pdfUrl = config.assetsUrl + `${this.pdfList[0].policyUrl}` //待后端开发 this.pdfUrl = config.assetsUrl + `${this.pdfList[0].policyUrl}` //待后端开发
// this.pdfUrl = config.assetsUrl + 'edor/BB_0001.pdf' //TEST测试专用暂时将url写死后端开发完成后删除
this.documentName = this.pdfList[0].documentName this.documentName = this.pdfList[0].documentName
console.log('1111', this.pdfUrl) //TEST测试专用
resolve() resolve()
} else { } else {
reject(this.$toast(res.resultMessage)) reject(this.$toast(res.resultMessage))
@@ -137,7 +135,7 @@ export default {
} }
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.content)
} }
}) })
.catch(err => { .catch(err => {

View File

@@ -190,23 +190,19 @@ export default {
//投保人/被保险人关系 //投保人/被保险人关系
edorRelationToAppnt: [ edorRelationToAppnt: [
{ {
id: 1, id: '01',
text: '本人'
},
{
id: 2,
text: '配偶' text: '配偶'
}, },
{ {
id: 3, id: '02',
text: '父母' text: '父母'
}, },
{ {
id: 4, id: '03',
text: '子女' text: '子女'
}, },
{ {
id: 5, id: '04',
text: '其他' text: '其他'
} }
], ],

View File

@@ -65,9 +65,7 @@ export default {
if (res.result == 0) { if (res.result == 0) {
this.pdfList = res.content.surrenderSignList this.pdfList = res.content.surrenderSignList
this.pdfUrl = config.assetsUrl + `${this.pdfList[0].policyUrl}` //待后端开发 this.pdfUrl = config.assetsUrl + `${this.pdfList[0].policyUrl}` //待后端开发
// this.pdfUrl = config.assetsUrl + 'edor/BB_0001.pdf' //TEST测试专用暂时将url写死后端开发完成后删除
this.documentName = this.pdfList[0].documentName this.documentName = this.pdfList[0].documentName
console.log('1111', this.pdfUrl) //TEST测试专用
resolve() resolve()
} else { } else {
reject(this.$toast(res.resultMessage)) reject(this.$toast(res.resultMessage))
@@ -137,7 +135,7 @@ export default {
} }
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.content)
} }
}) })
.catch(err => { .catch(err => {

View File

@@ -206,7 +206,7 @@ export default {
} }
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.content)
} }
}) })
} }

View File

@@ -223,7 +223,7 @@ export default {
} }
}) })
} else { } else {
this.$toast(res.content) this.$toast(res.resultMessage)
} }
}) })
}, },

View File

@@ -23,7 +23,7 @@
<!-- 以上变更后续账号信息 --> <!-- 以上变更后续账号信息 -->
<van-cell-group class="mt10 change-container"> <van-cell-group class="mt10 change-container">
<p style="border-bottom: 1px solid #ebedf0" class=" fs15 fwb pl10 pv12">以上变更后续账号信息</p> <p style="border-bottom: 1px solid #ebedf0" class=" fs15 fwb pl10 pv12">以上变更后续账号信息</p>
<van-field required label="开户人" v-if="list.length" v-model="list[0].accountName" /> <van-field required label="开户人" v-if="list.length" v-model="list[0].accountName" readonly />
<van-field <van-field
v-model="bank" v-model="bank"
label="新开户银行" label="新开户银行"
@@ -322,7 +322,6 @@ export default {
accountType: item.accountType, accountType: item.accountType,
bankCode: item.bankCode, bankCode: item.bankCode,
bankNo: item.bankNo, bankNo: item.bankNo,
// bankProvince: this.bankProvince, //TEST测试专用
bankProvince: item.bankProvince, bankProvince: item.bankProvince,
isNewInfo: item.isNewInfo, isNewInfo: item.isNewInfo,
contNo: item.bankNo, contNo: item.bankNo,
@@ -362,7 +361,7 @@ export default {
} }
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.content)
} }
}) })
} }