Merge branch 'feature/GFRS-217【待确定】保全-续期账号变更' into feature/【保全】

# Conflicts:
#	src/assets/js/utils/request.js
#	src/config/preserve.js
#	src/config/urlMap.js
This commit is contained in:
yuweiqi
2020-05-19 19:25:33 +08:00
8 changed files with 1373 additions and 11 deletions

View File

@@ -44,3 +44,19 @@ export function queryDetails(data) {
data
})
}
//保单列表
export function policyList(data) {
return request({
url: getUrl('/edor/customer/policyList', 1),
method: 'post',
data
})
}
//续期账号变更
export function renewalChange(data) {
return request({
url: getUrl('/edor/item/change', 1),
method: 'post',
data
})
}

View File

@@ -65,9 +65,12 @@ let survey = [
let manpower = [
'/customer/answer/queryList' //DISC性格分析
]
// 卡单
let cardList = []
let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale, ...agentEnter, ...claims, ...survey, ...manpower]
//保全
let preserve = [
'/edor/customer/customerList' //客户搜索
]
let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale, ...agentEnter, ...claims, ...survey, ...preserve, ...manpower]
// 创建axios实例
const service = axios.create({

View File

@@ -1,9 +1,8 @@
// 保全
let mockBaseUrl = 'http://rap2.taobao.org:38080/app/mock/250585/'
export default {
'/edor/customer/customerInfo': mockBaseUrl + '/edor/customer/customerInfo',
'/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList',
'/edor/customer/customerInfo': mockBaseUrl + '/edor/customer/customerInfo', //客户详情
'/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList', //客户搜索
'/edor/item/change': mockBaseUrl + '/edor/item/change',
'/edor/sign/save': mockBaseUrl + '/edor/sign/save',
'/edor/query/queryDetails': mockBaseUrl + '/edor/query/queryDetails'

View File

@@ -1,4 +1,114 @@
<!--自动转账授权书-续期账号变更-->
<template>
<div class="auto-pay"></div>
</template>
<div class="auto-pay-container">
<div class="pb20 pt20">
<van-notice-bar :scrollable="false" v-if="time != 0" class="notice">{{ `提示阅读时长需在${time}秒以上` }}</van-notice-bar>
<div class="fs14 p10 signature-confirm-content pb20 pt25 mb20">
<h1 class="text-center fs18 mb10">自动转账授权书</h1>
<p>本人授权本人所在企业或国富人寿保险有限公司 (下称"国富人寿") 以下事项:</p>
<p>1本人所在企业或国富人寿可从本投保页面上"银行信息"栏中的结算账户 (下称"结算账户") 中划扣本人应交付的保险费</p>
<p>2本人授权指定银行按本人所在企业或国富人寿保险费划转要求划扣保险费时,免于核对密码或签名就上述授权转账事宜,本人声明确知并保证遵守如下规定:</p>
<p class="fwb">
1因账户内余额不足或其他非国富人寿原因导致保险费转账不成功的, 被保人应存入足够金额或重新提供有效结算账户,未及时支付保险费将导致当次投保申请失效
</p>
<p class="fwb">2本授权书为本人所在企业或国富人寿从本人指定的结算账户中扣款的授权证明,不作为收取现金的凭据</p>
</div>
<van-radio-group v-model="radio" class="pb10 pt20 pl30">
<van-radio name="1" @click="readConfirm" v-no-more-click="2000" class="fs12">
本人确认已阅读
<span class="green">国富人寿自动转账授权书</span>
</van-radio>
</van-radio-group>
</div>
<div class="bottom-btn bg-white">
<van-button type="danger" size="large" @click="next" :disabled="isDisabledComplite" v-no-more-click="2000">完成</van-button>
</div>
</div>
</template>
<script>
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
// import { preserveSign } from '@/api/ebiz/preserve/preserve'
export default {
components: {
[Radio.name]: Radio,
[RadioGroup.name]: RadioGroup,
[Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar
},
data() {
return {
radio: '',
time: '10', //定时器时间
timer: null, //定时器名称
isDisabledComplite: true //完成按钮是否可以点击
}
},
async created() {
this.timeOut()
},
mounted() {
document.body.style.backgroundColor = '#fff'
},
methods: {
// 初始化
timeOut() {
let timer = setInterval(() => {
this.time--
if (this.time <= 0) {
this.time = 0
clearInterval(timer)
}
}, 1000)
},
// 单选框
readConfirm() {
console.log(this.radio)
if (this.radio == '1') {
this.$dialog
.alert({
title: '提示',
className: 'dialog-alert',
message: '该内容涉及您的重大权益,请您仔细阅读',
confirmButtonColor: '#E9332E'
})
.then(() => {
this.radio = '1'
this.isDisabledComplite = false
})
} else {
if (this.radio == '') {
this.isDisabledComplite = true
}
}
},
next() {}
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
.img {
height: 40px;
vertical-align: middle;
}
.notice {
width: 100%;
position: fixed;
top: 0;
z-index: 20;
}
.iframe {
width: 100vw;
height: 70vh;
}
.signature-confirm-content {
text-indent: 2em;
line-height: 30px;
border-bottom: 1px solid #dadada;
}
</style>

View File

@@ -1 +1,447 @@
<!--影像信息上传页面-->
<!--影像信息上传页面-->
<template>
<div class="image-upload-container">
<div class=" pb80">
<div class="m20 bg-white">
<div>
<!-- 身份证 -->
<div v-if="entry == 'surrender' || entry == 'hesitateSurrender'">
<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="1"
@delete="deleteImg"
/>
</div>
<van-cell-group>
<van-field required label="身份证反面" disabled />
</van-cell-group>
<div @click="test('fileListIdBack', idType)">
<van-uploader
name="fileListIdBack"
v-model="fileListIdBack"
:after-read="afterRead"
@delete="deleteImg"
:before-delete="beforeDelete"
class="mt10 ml20"
:max-count="1"
/>
</div>
</div>
<!-- 银行卡 -->
<div v-if="entry == 'renewal' || ((entry == 'surrender' || entry == 'hesitateSurrender') && accountType == '1')">
<van-cell-group>
<van-field required label="银行卡" disabled />
</van-cell-group>
<div @click="test('fileListBank', idType)">
<van-uploader
name="fileListBank"
v-model="fileListBank"
:after-read="afterRead"
@delete="deleteImg"
:before-delete="beforeDelete"
class="mt10 ml20"
:max-count="1"
/>
</div>
</div>
<!-- 纸质保单 -->
<div v-if="(entry == 'surrender' || entry == 'hesitateSurrender') && conTractType == '1'">
<van-cell-group>
<van-field required label="纸质保单" disabled />
</van-cell-group>
<div @click="test('fileListContract ', idType)">
<van-uploader
name="fileListContract"
v-model="fileListContract"
:after-read="afterRead"
@delete="deleteImg"
:before-delete="beforeDelete"
class="mt10 ml20"
:max-count="1"
/>
</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>
</div>
</div>
</template>
<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'
export default {
components: {
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Field.name]: Field,
[Uploader.name]: Uploader,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Dialog.name]: Dialog,
[Picker.name]: Picker,
[Popup.name]: Popup
},
data() {
return {
isDisabled: true,
id: '',
idType: '1',
type: '',
fileListIdFront: [], //身份证正面
fileListIdBack: [], //身份证反面
fileListBank: [], // 银行账户
fileListContract: [], //纸质保单
file: '', // 图片流
imgName: '', // 图片名称
list: [],
entry: '',
surrenderType: '',
accountType: '', //退款银行账号类型 0-原银行 1-新银行
conTractType: '' //保单类型 0-电子 1-纸质
}
},
created() {
this.entry = JSON.parse(localStorage.customerInfo).entry
this.accountType = this.$route.query.accountType
this.conTractType = this.$route.query.conTractType
switch (this.entry) {
case 'contact': //联系方式变更
this.surrenderType = '1'
break
case 'beneficiary': //受益人变更
this.surrenderType = '2'
break
case 'renewal': //续期账户变更
this.surrenderType = '3'
break
case 'surrender': //退保
this.surrenderType = '4'
break
case 'hesitateSurrender': //犹豫期退保
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
},
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))
uploadImg(formdata).then(res => {
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)
}
} 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)
}
})
},
// 转化base64格式为文件格式
dataURLtoFile(dataurl, filename) {
//将base64转换为文件
var arr = dataurl.split(','),
mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]),
n = bstr.length,
u8arr = new Uint8Array(n)
while (n--) {
u8arr[n] = bstr.charCodeAt(n)
}
return new File([u8arr], filename, { type: mime })
},
// 删除图片前
beforeDelete(file, detail) {
Dialog.confirm({
title: '提示',
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)
})
.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({
// 持续展示 toast
duration: 0,
// 禁用背景点击
forbidClick: true,
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: []
}
}
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)
}
})
}
},
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 => {
if (res.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/handleResult',
pullRefresh: '1',
backToFirst: '1'
},
routerInfo: {
path: '/preserve/handleResult'
}
})
} else {
this.$toast(res.resultMessage)
}
})
}
},
computed: {
listenChange() {
const { fileListIdFront, fileListIdBack, fileListBank } = this
return {
fileListIdFront,
fileListIdBack,
fileListBank
}
}
},
watch: {
listenChange(val) {
if (
(val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
val.fileListBank.length != '0' &&
(this.entry == 'surrender' || this.entry == 'hesitateSurrender') &&
this.accountType == '1') ||
(this.entry == 'renewal' && val.fileListBank.length != '0') ||
(val.fileListIdFront.length != '0' &&
val.fileListIdBack.length != '0' &&
(this.entry == 'surrender' || this.entry == 'hesitateSurrender') &&
this.accountType == '0')
) {
this.isDisabled = false
} else {
this.isDisabled = true
}
}
}
}
</script>
<style lang="scss" scoped></style>

View File

@@ -1 +1,458 @@
<!--续期账号变更-保全代办确认页-->
<!--续期账号变更-保全代办确认页-->
<template>
<div class="renewal-confirmation-container pb50">
<div style="border-bottom: 1px solid #ebedf0" class="fs14 pl10 pv12 bg-white">
<p>
<span>尊敬的</span>
<span class="red" v-if="list.length">{{ list[0].accountName }}</span
>先生/女士, 您好!
</p>
<p class="mt10">
<span>您的</span>
<span class="red">续期账号变更</span>已由代理人代办请确认信息并进行提交:
</p>
</div>
<van-cell-group class="mt10 cont-info-container">
<!-- 保单信息 -->
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">保单信息</p>
<van-collapse v-model="activeNames" @change="collapseChange">
<div v-for="(item, index) in list" :key="index">
<van-collapse-item @click.native="changeCollapse(111)" v-no-more-click="2000" :title="`保单号:${item.contNo}`" :name="index">
<!-- <div slot="value" class="text-right collapse-value red fs12">{{ item.surrenderStatus == '5' ? '已撤销' : '' }}</div> -->
<van-cell title="产品名称" :value="item.riskName" />
<van-cell title="投保人" :value="item.appntName" />
<van-cell title="被保险人" :value="item.insuredName" />
<van-cell title="交费方式" :value="item.insuPayType | idToText('payIntv')" />
<van-cell title="保单生效日期" :value="item.cvaliDate" />
<van-cell title="保单状态" :value="item.contState | idToText('contState')" />
<van-cell title="开户人姓名" :value="item.accountName" />
<van-cell title="原银行名称" :value="item.bankCode | idToText('preserveBank')" />
<van-cell title="原银行账号" :value="item.bankNo" />
</van-collapse-item>
</div>
</van-collapse>
</van-cell-group>
<!-- 以上变更后续账号信息 -->
<van-cell-group class="mt10 cont-info-container">
<p style="border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 pv12">以上变更后续账号信息</p>
<van-cell title="开户人姓名" :value="list[0].accountName" v-if="list.length" />
<van-cell title="新开户银行">
<div class="red" slot="default">{{ newBank }}</div>
</van-cell>
<van-cell title="新银行账号">
<div class="red" slot="default">{{ newBankNo }}</div>
</van-cell>
</van-cell-group>
<van-cell-group class="fs14 mt10 pl15 pr15 pb20">
<p class="pt20 pb20">以下内容需要您阅读确认:</p>
<p>需阅读</p>
<p class="mb10 mt10">
<span class="red">自动转账授权书</span>
<img :src="src" v-if="documentStatus == '3'" />
</p>
<p class="start">点击开始按钮进行相关操作</p>
</van-cell-group>
<!-- 短信验证 -->
<van-dialog
v-model="show"
title="短信确认"
show-cancel-button
cancelButtonColor="#4FC6B3"
class="dialog-delete"
confirmButtonColor="#FFFFFF"
@confirm="authConfirm(authCode)"
@cancel="clearTimer"
>
<p class="p10 fs14">向此手机发送验证码确认用户身份</p>
<p class="p10 fs14" style="border-bottom: 1px solid #ebedf0">{{ customerMobile }}</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">{{
codeDisabled ? `${countDown}s后重新获取` : '获取验证码'
}}</van-button>
</van-cell-group>
</van-dialog>
<div class="bottom-btn bg-white">
<van-button
:type="submitForbidden ? '' : 'danger'"
:color="submitForbidden ? 'gray' : ''"
v-if="isSigned || submitForbidden"
size="large"
:disabled="nextDisabled || submitForbidden"
@click="show = true"
v-no-more-click="2000"
>提交申请</van-button
>
<!-- <van-button color="gray" v-else-if="submitForbidden" size="large" disabled>提交申请失败</van-button> -->
<!-- <van-button color="gray" v-else-if="linkInvalid" size="large" disabled>链接已失效</van-button>
<van-button color="gray" v-else-if="isCanceled" size="large" disabled>代理人已撤销</van-button> -->
<van-button type="danger" v-else size="large" @click="start" v-no-more-click="2000">开始</van-button>
</div>
</div>
</template>
<script>
import { Field, Cell, Collapse, CollapseItem, CellGroup, Dialog } from 'vant'
import { customerInfoShare, orderDetail, authCode, changeStatus, queryCancel } from '@/api/ebiz/preserve/preserve'
import { checkSignInvalid } from '@/api/ebiz/sale/sale'
export default {
name: 'RenewalConfirmation',
components: {
[Field.name]: Field,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[Dialog.name]: Dialog
},
data() {
return {
show: false, // 获取短信验证码
codeDisabled: false, // 获取验证码按钮是否禁用
timeId: null, // 计时器ID
countDown: 60, // 倒计时
authCode: '', // 验证码
activeNames: [0],
src: this.$assetsUrl + 'images/u6490.png', // 图片路径
policyList: [],
list: [
// {
// contNo: 'HL052019110010001047',
// riskName: '鼎诚人寿重大疾病险',
// appntName: '嘿嘿',
// insuredName: '狗乐',
// insuPayType: '11',
// cvaliDate: '2020-12-31',
// contState: '001',
// accountName: '彭小芳',
// bankCode: '102',
// bankNo: '374198274319824389127341'
// },
// {
// contNo: 'HL052019110010001047',
// riskName: '鼎诚人寿重大疾病险',
// appntName: '嘿嘿',
// insuredName: '狗乐',
// insuPayType: '11',
// cvaliDate: '2020-12-31',
// contState: '001',
// accountName: '彭小芳',
// bankCode: '102',
// bankNo: '374198274319824389127341'
// }
],
newBank: '', //新开户银行
newBankNo: '', //新银行卡号
customerMobile: '',
sessionId: '',
nextDisabled: true,
signInvalid: '',
isSigned: false, //是否签完名了
submitForbidden: false, //是否提交申请失败
linkInvalid: false, //链接是否失效
isCanceled: false, //是否撤销
documentStatus: '' //签名状态
}
},
async created() {
this.$route.query.customerInfo && (localStorage.customerInfo = decodeURI(this.$route.query.customerInfo))
this.$route.query.token && (localStorage.token = this.$route.query.token)
this.customerMobile = JSON.parse(localStorage.customerInfo).customerMobile
//是否已经签名
if (sessionStorage.customerSign && JSON.parse(sessionStorage.customerSign).isSign) {
this.isSigned = true
} else {
this.isSigned = false
//token签名
if (this.$route.query.signInvalid) {
localStorage.signInvalid = this.$route.query.signInvalid
this.signInvalid = this.$route.query.signInvalid
//token是否过期
let resData = await this.checkSignInvalid(this.signInvalid)
if (resData == '1') {
this.linkInvalid = false
} else {
this.linkInvalid = true
}
}
}
this.init()
},
methods: {
start() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/autopayAuthorization'
},
routerInfo: {
path: '/preserve/autopayAuthorization'
}
})
},
async init() {
this.$toast.loading({
// 持续展示 toast
duration: 0,
// 禁用背景点击
forbidClick: true,
loadingType: 'spinner',
message: '加载中……'
})
// await this.isPreserveCancel()
//如果没有被撤销
// if (backData == 'notCanceled') {
let params = {
surrenderType: '2', //"1","基本信息变更" "2","续期账号变更" "3","红利领取"
customerInfoDTOList: [],
mediaDTOList: [],
surrenderId: JSON.parse(localStorage.customerInfo).surrenderId,
edorapplyNo: JSON.parse(localStorage.customerInfo).edorapplyNo || JSON.parse(localStorage.customerInfo).edorApplyNo
}
let res = await customerInfoShare(params)
this.$toast.clear()
if (res.result == 0) {
if (!JSON.parse(localStorage.customerInfo).contNo) {
res.content.accountResList.forEach(item => {
// this.policyList.push(item.contNo)
if (item.isNewInfo == '0') {
this.policyList.push({
contNo: item.contNo,
surrenderStatus: item.surrenderStatus
})
this.newBank = item.bankName
this.newBankNo = item.bankNo
}
})
localStorage.policyList = JSON.stringify(this.policyList)
} else {
//如果是从保全进度查询分享进来(只有一个单)
res.content.accountResList.forEach(item => {
// this.policyList.push(item.contNo)
if (item.contNo == JSON.parse(localStorage.customerInfo).contNo && item.isNewInfo == '0') {
this.policyList.push({
contNo: item.contNo,
surrenderStatus: item.surrenderStatus
})
this.newBank = item.bankName
this.newBankNo = item.bankNo
}
})
}
//未签名并且链接有效的情况下
if (!this.isSigned && !this.linkInvalid) {
//撤销
this.isCanceled = res.content.accountResList.every(item => {
return item.surrenderStatus == 5
})
}
//未签名并且链接有效的情况下
if (!this.linkInvalid) {
//已提交
this.submitForbidden = res.content.accountResList.every(item => {
return item.surrenderStatus == 3 || item.surrenderStatus == 6 || item.surrenderStatus == 9 || item.surrenderStatus == 7
})
}
//未签名&链接有效&未撤销
// if (!this.isSigned && !this.linkInvalid && !this.isCanceled) {
// //提交申请失败
// this.submitForbidden = res.content.accountResList.every(item => {
// return item.surrenderStatus == 7
// })
// }
// localStorage.signList = JSON.stringify(res.content.signList[0])
if (!sessionStorage.customerSign) {
let customerSign = {
baseEncryp: '',
policyUrl: res.content.signList[0].policyUrl
}
sessionStorage.customerSign = JSON.stringify(customerSign)
}
this.documentStatus = res.content.signList[0].documentStatus
this.getOrderDetail({
contNo: this.policyList[0].contNo
})
} else {
this.$toast(res.resultMessage)
}
// }
},
// 获取短信验证码
getAuthCode() {
this.codeDisabled = true
//倒计时
this.timeId = setInterval(() => {
this.countDown--
if (this.countDown <= 0) {
window.clearInterval(this.timeId)
this.codeDisabled = false
this.countDown = 60
}
}, 1000)
authCode({
operateType: 'smslogin',
sessionId: '',
validateCode: '',
operateCode: this.customerMobile,
system: '',
operateCodeType: '0'
}).then(res => {
if (res.result == 0) {
this.sessionId = res.sessionId
} else {
this.$toast(res.resultMessage)
}
})
},
// 验证码确认事件
async authConfirm() {
//清理计时器
this.clearTimer()
changeStatus({
surrenderId: JSON.parse(localStorage.customerInfo).surrenderId,
surrenderStatus: '3',
smsCodeDTO: {
smsId: this.sessionId,
code: this.authCode
}
}).then(resDdata => {
if (resDdata.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/submitResult`
},
routerInfo: {
path: `/preserve/submitResult`
}
})
} else {
this.$toast(resDdata.resultMessage)
}
})
},
// 清理计时器
clearTimer() {
window.clearInterval(this.timeId)
this.timeId = null
this.countDown = 60
this.codeDisabled = false
},
changeCollapse(params) {
console.log(params)
},
//展开保单详情
collapseChange(val) {
if (val.length) {
let flag = true
this.list.forEach(item => {
if (item.contNo == this.policyList[val[val.length - 1]].contNo && item.riskName) {
return (flag = false)
}
})
if (flag) {
this.getOrderDetail({
contNo: this.policyList[val[val.length - 1]].contNo
})
}
}
},
//获取保单详情
async getOrderDetail(data) {
let res = await orderDetail(data)
if (res.result == 0) {
this.nextDisabled = false
let flag = true
this.list.forEach((item, index) => {
if (item.contNo == data.contNo) {
flag = false
console.info(index, item, res.content)
// this.list.splice(index, 1, res.content)
this.list.splice(index, 1, Object.assign(this.policyList[index], res.content))
}
})
if (flag) {
// this.list.push(res.content)
this.list.push(Object.assign(this.policyList[0], res.content))
this.policyList.forEach((item, index) => {
if (index != 0) {
this.list.push(item)
}
})
}
} else {
this.$toast(res.resultMessage)
}
},
//提交申请
submit() {},
// 在微信中校验token是否失效
async checkSignInvalid(signInvalid) {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = {
sign: signInvalid
}
return new Promise((resolve, reject) => {
checkSignInvalid(data).then(res => {
if (res.result == '0') {
that.$toast.clear()
let status = res.content.status
resolve(status)
} else {
reject()
}
})
})
},
//查询撤销
async isPreserveCancel() {
return new Promise((resolve, reject) => {
let data = {
surrenderId: JSON.parse(localStorage.customerInfo).surrenderId
}
queryCancel(data).then(res => {
//result=0 已撤销
if (res.result == 0) {
this.isCanceled = true
resolve()
} else {
this.isCanceled = false
reject()
}
})
})
}
},
beforeDestroy() {
//清理计时器
this.clearTimer()
}
}
</script>
<style lang="scss" scoped>
.renewal-confirmation-container {
.cont-info-container {
/deep/.van-cell__title,
.van-cell__value {
flex: auto;
text-align: left;
width: 50%;
}
}
}
.red {
color: #e9332e !important;
}
</style>

View File

@@ -1 +1,331 @@
<!--续期账号变更页面-->
<template>
<div class="renewal-info-container pb45">
<div v-if="!isScan">
<van-cell-group class="mt10 cont-info-container">
<!-- 保单信息 -->
<p style="border-bottom: 1px solid #ebedf0" class=" fs15 fwb pl10 pv12">保单信息</p>
<van-collapse v-model="activeNames" @change="collapseChange">
<div v-for="(item, index) in list" :key="index">
<van-collapse-item :title="`保单号:${item.policyNo}`" :name="index">
<van-cell title="产品名称" :value="item.riskName" />
<van-cell title="投保人" :value="item.appntName" />
<van-cell title="被保险人" :value="item.insuredName" />
<van-cell title="交费方式" :value="item.tradeAbstract" />
<van-cell title="保单生效日期" :value="item.cvaliDate" />
<van-cell title="保单状态" :value="item.contState" />
<van-cell title="开户人姓名" :value="item.accountDTO.accountName" />
<van-cell title="原开户银行" :value="item.accountDTO.bankName" />
<van-cell title="原银行卡号" :value="item.accountDTO.bankNo" />
</van-collapse-item>
</div>
</van-collapse>
</van-cell-group>
<!-- 以上变更后续账号信息 -->
<van-cell-group class="mt10">
<p style="border-bottom: 1px solid #ebedf0" class=" fs15 fwb pl10 pv12">以上变更后续账号信息</p>
<van-cell required title="开户人" v-if="list.length">{{ list[0].accountName }}</van-cell>
<van-field
v-model="bank"
label="新开户银行"
placeholder="请选择"
right-icon="arrow"
@click="bankPopup = true"
readonly
v-validate="'required'"
data-vv-name="新开户银行"
required
/>
</van-cell-group>
<van-cell-group class="flex align-items-c">
<van-field
v-model="bankNo"
label="新银行卡号"
maxlength="19"
placeholder="请输入"
clearable
v-validate="'required|bankCard'"
data-vv-name="新银行卡号"
required
/>
<van-button type="danger" size="small" round class="bankCard mr10 w110 h20" @click="cardScanning('0')" v-no-more-click="2000">银行卡扫描</van-button>
</van-cell-group>
<div class="bottom-btn bg-white">
<van-button type="danger" size="large" @click="nextStep" v-no-more-click="2000">下一步</van-button>
</div>
<!-- 开户银行选择 -->
<van-popup v-model="bankPopup" position="bottom">
<van-list>
<van-cell v-for="item in bankList" :key="item.code" :title="item.bankName" class="text-center" @click="chooseBank(item.bankName, item.code)" />
</van-list>
</van-popup>
</div>
<!-- 银行卡扫描 -->
<BankCardScan :scanShow="isScan" :clear="false" @getScanInfo="getBankCardInfo"></BankCardScan>
</div>
</template>
<script>
import { Field, Collapse, CollapseItem, Cell, CellGroup, Dialog, Popup, List } from 'vant'
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
import { policyList, renewalChange } from '@/api/ebiz/preserve/preserve'
import { getBankList } from '@/api/ebiz/sale/sale'
export default {
name: 'renewalInfo',
components: {
[Field.name]: Field,
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[List.name]: List,
[Popup.name]: Popup,
BankCardScan
},
data() {
return {
bank: '', //新开户银行
bankCode: '', //新开户银行编码
bankPopup: false, // 展示银行列表
bankList: [], // 银行列表
bankNo: '', // 新银行卡号
isScan: false, // 是否扫描银行卡
activeNames: [0],
show: true,
list: [
// {
// contNo: 'HL052019110010001047',
// riskName: '鼎诚人寿重大疾病险',
// appntName: '嘿嘿',
// insuredName: '狗乐',
// insuPayType: '11',
// cvaliDate: '2020-12-31',
// contState: '001',
// accountName: '彭小芳',
// bankCode: '102',
// bankNo: '374198274319824389127341'
// },
// {
// contNo: 'HL052019110010001047',
// riskName: '鼎诚人寿重大疾病险',
// appntName: '嘿嘿',
// insuredName: '狗乐',
// insuPayType: '11',
// cvaliDate: '2020-12-31',
// contState: '001',
// accountName: '彭小芳',
// bankCode: '102',
// bankNo: '374198274319824389127341'
// }
],
customerInfo: JSON.parse(localStorage.getItem('preserve-customerInfo'))
}
},
created() {
this.getPolicyList({
customerNo: this.customerInfo.customerNo
})
this.getBank()
},
mounted() {
// 筛选按钮的点击事件
window.appCallBack = this.appCallBack
Dialog.confirm({
title: '提示',
message: '该客户涉及到的所有保单相应信息将变更',
showCancelButton: false
})
},
methods: {
// 选择银行
chooseBank(name, code) {
this.bank = name
this.bankCode = code
this.bankPopup = false
},
// 获取银行卡扫描信息
getBankCardInfo(data) {
this.bankNo = data.name
this.$jump({
flag: 'navigation',
extra: {
title: '续期账号变更',
hiddenRight: '1'
}
})
this.isScan = false
},
// 银行卡扫描
cardScanning(cardScanningType) {
window.localStorage.setItem('cardScanningType', cardScanningType)
document.body.style.backgroundColor = '#F5F5F5'
let title = ''
this.isclear = false
;[this.isScan, title] = [true, '银行卡扫描']
setTimeout(() => {
this.$jump({
flag: 'navigation',
extra: {
title,
hiddenLeft: '1'
}
})
this.closeBtn()
}, 400)
},
closeBtn() {
// 筛选按钮的显示
this.$jump({
flag: 'webview_right_button',
extra: {
btns: [
{
img: this.$assetsUrl + 'images/del-close.png',
route: { flag: '', extra: {} }
}
]
}
})
},
appCallBack() {
this.isclear = true
// 筛选按钮的点击事件
this.isclear = true
this.$jump({
flag: 'navigation',
extra: {
title: '续期账号变更',
hiddenRight: '1'
}
})
this.isScan = false
},
// 下一步
async nextStep() {
this.$validator.validate().then(valid => {
if (true === valid) {
this.change()
} else {
this.$toast(this.$validator.errors.all()[0])
}
})
},
//获取保单详情
async getPolicyList(data) {
policyList(data).then(res => {
if (res.result == 0) {
this.list = res.content.policyListDTOList
} else {
this.$toast(res.resultMessage)
}
})
},
// 获取银行卡列表
async getBank() {
let data = {
operateType: 'edor_bank_type'
}
let res = await getBankList(data)
if (res.result == '0') {
this.bankList = res.content
} else {
this.$toast(res.resultMessage)
}
},
change() {
//续期账号变更参数
// let params = {
// surrenderDTOList: []
// }
let originList = []
let policyListDTO = []
this.list.forEach(item => {
originList.push(Object.assign({}, item.accountDTO))
policyListDTO.push(
Object.assign(
{},
{
riskName: item.riskName,
policyNo: item.policyNo,
appntName: item.appntName,
insuredName: item.insuredName,
cvaliDate: item.cvaliDate,
tradeAbstract: item.tradeAbstract,
contState: item.contState,
surrenderReason: item.surrenderReason,
surrenderRate: item.surrenderRate,
surrenderMoney: item.surrenderMoney
}
)
)
})
let surrenderDTOList = []
this.list.forEach((item, index) => {
surrenderDTOList[index] = {
surrenderId: '',
edorapplyNo: '',
surrenderType: '3', //保全项1-联系方式变更 2-受益人变更 3-续期账号变更 4-犹退 5-退保
policyListDTOList: policyListDTO[index],
accountDTOList: []
}
surrenderDTOList[index].accountDTOList.push(
Object.assign(item.accountDTO, {
isNewInfo: '0',
bankName: this.bank,
bankNo: this.bankNo,
bankCode: this.bankCode
})
)
surrenderDTOList[index].accountDTOList.push(
Object.assign(originList[index], {
isNewInfo: '1'
})
)
})
renewalChange({ surrenderDTOList }).then(res => {
if (res.result == 0) {
this.customerInfo.surrenderId = res.content.surrenderId
this.customerInfo.edorApplyNo = res.content.edorApplyNo
this.customerInfo.entry = 'renewal'
localStorage.setItem('preserve-customerInfo', JSON.stringify(this.customerInfo))
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/imageUpload`
},
routerInfo: {
path: `/preserve/imageUpload`
}
})
} else {
this.$toast(res.resultMessage)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.van-dialog__confirm {
background-color: #e9332e !important;
margin-right: 20px;
}
.renewal-info-container {
.cont-info-container {
/deep/.van-cell__title,
.van-cell__value {
flex: auto;
}
}
/deep/ .bankCard {
width: 120px;
height: 20px;
line-height: 20px;
border-radius: 10px;
}
}
</style>

View File

@@ -149,6 +149,7 @@ export default {
// delete res.content.coreCustomerDTOList
//preserve-customerInfo -- 保全查询的客户详细信息
if (res.result == 0) {
res.content.entry = this.entry
localStorage.setItem('preserve-customerInfo', JSON.stringify(res.content))
this.jupmTo(url)
} else {