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

View File

@@ -9,7 +9,7 @@
<div class="fs14 pv12 ph15 van-hairline--bottom flex">
<label class="c-gray-dark">身故受益人</label>
<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="2" class="ml10">指定受益人</van-radio>
</van-radio-group>
@@ -38,18 +38,9 @@
</li>
</ul>
</div>
<van-dialog
v-model="show"
title="短信确认"
show-cancel-button
class="dialog-delete"
cancelButtonColor="#4FC6B3"
confirmButtonColor="#FFFFFF"
@confirm="authConfirm(authCode)"
@cancel="clearTimer"
>
<van-dialog v-model="show" title="提示" show-cancel-button @confirm="authConfirm(authCode)" @cancel="clearTimer">
<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-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">
@@ -58,13 +49,16 @@
</van-cell-group>
</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>
</template>
<script>
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 {
name: 'BeneficiaryConfirmation',
components: {
@@ -76,56 +70,55 @@ export default {
[Dialog.name]: Dialog
},
filters: {
Mask: function(value) {
if (value) {
return value.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
} else {
return ''
}
}
mask: filters.mask
},
data() {
let feachData = {
surrenderDTOList: [
{
surrenderId: '',
edorapplyNo: '',
surrenderType: '2',
bnfDTOs: []
}
]
}
// let feachData = {
// surrenderDTOList: [
// {
// surrenderId: '',
// edorapplyNo: '',
// surrenderType: '2',
// bnfDTOs: []
// }
// ]
// }
return {
show: false, // 获取短信验证码
codeDisabled: false, // 获取验证码按钮是否禁用
timeId: null, // 计时器ID
countDown: 60, // 倒计时
authCode: '', // 验证码
feachData: feachData,
// feachData: feachData,
type: '',
isDisType: false,
policy: null,
sessionId: '',
policy: JSON.parse(localStorage['preserve-policy']),
customerInfo: JSON.parse(localStorage['preserve-customerInfo']),
insuredName: '', //被保险人
beneficiaries: [] // 指定受益人列表
}
},
created() {
// 获取保单列表存储的数据
this.policy = JSON.parse(localStorage['preserve-policy'])
this.insuredName = this.policy.insuredName
this.type = this.policy.bnfDTOs[0].bnfType
this.isDisType = true
this.beneficiaries = this.policy.bnfDTOs
for (let i of this.policy.bnfDTOs) {
if (i.isNewInfo == '0') {
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: {
//告知信息
nextStep() {
this.showAuth()
},
//详情
detail(index) {
// edit=0
let path = '/preserve/BeneficiaryInfoDetail?edit=' + index
let path = '/preserve/BC/BeneficiaryInfoDetail?edit=' + index
this.$jump({
flag: 'h5',
extra: {
@@ -136,9 +129,26 @@ export default {
}
})
},
// 显示验证码 van-dialog
showAuth() {
this.show = true
init() {
return new Promise((resolve, reject) => {
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() {
@@ -152,22 +162,18 @@ export default {
this.countDown = 60
}
}, 1000)
getAuthCode({
operateType: 'appntInfoEntry',
sessionId: '',
validateCode: '',
operateCode: this.customerMobile,
system: '',
type: 'H5',
operateCode: this.customerInfo.customerMobile,
system: 'agentApp',
operateCodeType: '0'
}).then(res => {
console.log(res)
if (res.result == 0) {
this.sessionId = res.sessionId
} else {
this.$toast({
message: res.resultMessage,
onClose: this.showAuth
})
this.$toast(res.resultMessage)
}
})
},
@@ -175,7 +181,7 @@ export default {
async authConfirm() {
//清理计时器
this.clearTimer()
this.changeSubmit()
this.submit()
},
// 清理计时器
clearTimer() {
@@ -184,42 +190,35 @@ export default {
this.countDown = 60
this.codeDisabled = false
},
//提交变更申请
async changeSubmit() {
if (!this.sessionId) {
this.$toast({
message: '请先获取验证码',
onClose: this.showAuth
})
return
//确认变更
submit() {
let data = {
platformType: 'APP',
edorType: 'BC',
operateType: '04',
surrenderId: this.customerInfo.surrenderId,
edorApplyNo: this.customerInfo.edorApplyNo,
checkCodeDTO: {
smsId: this.sessionId,
code: this.authCode
}
}
let res = await autchCodeCheck({
smsId: this.sessionId,
code: this.authCode
changeEdor(data).then(res => {
if (res.result == 0) {
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>

View File

@@ -32,7 +32,7 @@
</div>
<p class="mt20">
<span class="c-gray-dark">是被保险人的</span>
<span class="ml20">{{ item.relationToInsured | idToText('relationToAppnt') }}</span>
<span class="ml20">{{ item.relationToInsured | idToText('edorRelationToAppnt') }}</span>
</p>
<p class="mt10">
<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>
<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>
</template>
<script>
import { RadioGroup, Radio, Icon, Dialog } from 'vant'
import { changeEdor, policyInfo } from '@/api/ebiz/preserve/preserve'
import filters from '@/views/ebiz/preserve/filters'
export default {
name: 'BeneficiaryInfo',
@@ -61,10 +69,14 @@ export default {
},
data() {
return {
riskList: [],
dialogShow: false, //错误弹窗是否显示
type: '',
isDisType: false,
policy: null,
customerInfo: {}, //客户详情
insuredInfo: {}, //被保险人信息
appntInfo: {}, //投保人信息
insuredName: '', //被保险人
beneficiaries: [] // 指定受益人列表
}
@@ -110,6 +122,12 @@ export default {
res => {
if (res.result == '0') {
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-否
this.beneficiaries.forEach(item => {
item.isNewInfo = '1'
@@ -127,7 +145,7 @@ export default {
},
//下一步
nextStep() {
if (this.type == 2 && this.beneficiaries.length == 0) {
if (this.type == 2 && this.beneficiaries.length == 1) {
this.$toast('受益人列表不能为空')
return
}
@@ -136,20 +154,24 @@ export default {
beneRatio += Number(item.bnfLot)
})
if (beneRatio != 100 && !(this.beneficiaries.length == 1 && this.beneficiaries[0].isLegal == '1')) {
return this.$toast('受益人受益比例不合法')
return (this.dialogShow = true)
}
let feachData = {
platformType: 'APP',
platformType: 'app',
edorType: 'BC',
operateType: '01',
bcBnfDTOList: this.beneficiaries
}
changeEdor(feachData)
.then(res => {
changeEdor(feachData).then(
res => {
if (res.result == 0) {
this.policy.bnfDTOs = this.beneficiaries
localStorage['preserve-policy'] = JSON.stringify(this.policy)
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 = ''
if (this.type != 2) {
path = '/preserve/common/HandleResult?entry=BC'
@@ -164,23 +186,26 @@ export default {
routerInfo: path
})
} else {
this.$toast(res.resultMessage)
this.$toast(res.content)
}
})
.catch(err => {
console.log(err)
})
},
error => {
console.log(error)
}
)
},
//添加受益人
add() {
let beneRatio = 0
this.beneficiaries.forEach(item => {
beneRatio += parseFloat(item.bnfLot)
beneRatio += parseFloat(item.bnfLot | 0)
})
console.log(beneRatio)
if (beneRatio >= 100) {
return this.$toast('受益份额已满~')
}
this.policy.bnfDTOs = this.beneficiaries
this.checkIsDetail(this.riskList)
localStorage['preserve-policy'] = JSON.stringify(this.policy)
this.$jump({
flag: 'h5',
extra: {
@@ -213,6 +238,7 @@ export default {
// 编辑受益人
editBeneficiary(index) {
this.policy.bnfDTOs = this.beneficiaries
this.checkIsDetail(this.riskList)
localStorage['preserve-policy'] = JSON.stringify(this.policy)
let path = '/preserve/bc/BeneficiaryInfoAdd?edit=' + index
this.$jump({
@@ -224,9 +250,23 @@ export default {
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>
<style lang="scss" scoped>
@@ -243,4 +283,16 @@ export default {
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>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,7 +23,7 @@
<!-- 以上变更后续账号信息 -->
<van-cell-group class="mt10 change-container">
<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
v-model="bank"
label="新开户银行"
@@ -322,7 +322,6 @@ export default {
accountType: item.accountType,
bankCode: item.bankCode,
bankNo: item.bankNo,
// bankProvince: this.bankProvince, //TEST测试专用
bankProvince: item.bankProvince,
isNewInfo: item.isNewInfo,
contNo: item.bankNo,
@@ -362,7 +361,7 @@ export default {
}
})
} else {
this.$toast(res.resultMessage)
this.$toast(res.content)
}
})
}