mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 11:36:45 +08:00
[FIX]【保全】分支整理
This commit is contained in:
@@ -1,18 +1,43 @@
|
|||||||
import request from '@/assets/js/utils/request'
|
import request from '@/assets/js/utils/request'
|
||||||
import getUrl from '@/assets/js/utils/get-url'
|
import getUrl from '@/assets/js/utils/get-url'
|
||||||
|
|
||||||
//基本信息变更提交
|
//搜索客户
|
||||||
export function edorChange(data) {
|
export function customerList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl('/edor/item/change', 0),
|
url: getUrl('/edor/customer/customerList', 1),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//搜索客户
|
//保单列表
|
||||||
export function customerList(data) {
|
export function policyList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl('/edor/customer/customerList', 0),
|
url: getUrl('/edor/policy/policyList', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//保全初始页信息查询(除续期账号变更外)
|
||||||
|
export function policyInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/edor/policy/policyInfo', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//保全初始页信息查询-续期账号变更
|
||||||
|
export function pcPolicyInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/edor/policy/pcPolicyInfo', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//受益人变更提交
|
||||||
|
export function changeEdor(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/edor/edor/changeEdor', 1),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
@@ -21,37 +46,20 @@ export function customerList(data) {
|
|||||||
//签名信息保存
|
//签名信息保存
|
||||||
export function edorSignSave(data) {
|
export function edorSignSave(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl('/edor/sign/save', 0),
|
url: getUrl('/edor/sign/save', 1),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//客户详情
|
|
||||||
export function customerInfo(data) {
|
|
||||||
return request({
|
|
||||||
url: getUrl('/edor/customer/customerInfo', 0),
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//保全详情查询
|
//保全详情查询
|
||||||
export function queryDetails(data) {
|
export function queryDetails(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl('/edor/query/queryDetails', 0),
|
url: getUrl('/edor/query/queryDetails', 1),
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
//保单列表
|
|
||||||
export function policyList(data) {
|
|
||||||
return request({
|
|
||||||
url: getUrl('/edor/customer/policyList', 1),
|
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//续期账号变更
|
//续期账号变更
|
||||||
export function renewalChange(data) {
|
export function renewalChange(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -60,11 +68,3 @@ export function renewalChange(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//客户详情
|
|
||||||
// export function customerInfo(data) {
|
|
||||||
// return request({
|
|
||||||
// url: getUrl('/edor/customer/customerInfo', 0),
|
|
||||||
// method: 'post',
|
|
||||||
// data
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ let manpower = [
|
|||||||
|
|
||||||
//保全
|
//保全
|
||||||
let preserve = [
|
let preserve = [
|
||||||
'/edor/customer/customerList' //客户搜索
|
'/edor/customer/customerList', //客户搜索
|
||||||
|
'/edor/policy/policyList' //保单列表
|
||||||
]
|
]
|
||||||
let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale, ...agentEnter, ...claims, ...survey, ...preserve, ...manpower]
|
let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale, ...agentEnter, ...claims, ...survey, ...preserve, ...manpower]
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// 保全
|
// 保全
|
||||||
let mockBaseUrl = 'http://rap2.taobao.org:38080/app/mock/250585/'
|
let mockBaseUrl = 'http://rap2.taobao.org:38080/app/mock/250585/'
|
||||||
export default {
|
export default {
|
||||||
'/edor/customer/customerInfo': mockBaseUrl + '/edor/customer/customerInfo', //客户详情
|
|
||||||
'/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList', //客户搜索
|
'/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList', //客户搜索
|
||||||
'/edor/customer/policyList': mockBaseUrl + '/edor/customer/policyList',
|
'/edor/customer/policyList': mockBaseUrl + '/edor/customer/policyList',
|
||||||
'/edor/item/change': mockBaseUrl + '/edor/item/change',
|
'/edor/item/change': mockBaseUrl + '/edor/item/change',
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
//保全 定义相关组件
|
//保全 定义相关组件
|
||||||
const search = () => import('@/views/ebiz/preserve/Search')
|
const search = () => import('@/views/ebiz/preserve/Search')
|
||||||
const imageUpload = () => import('@/views/ebiz/preserve/ImageUpload')
|
const bcImageUpload = () => import('@/views/ebiz/preserve/bc/ImageUpload')
|
||||||
const handleResult = () => import('@/views/ebiz/preserve/HandleResult')
|
const handleResult = () => import('@/views/ebiz/preserve/common/HandleResult')
|
||||||
const submitResult = () => import('@/views/ebiz/preserve/SubmitResult')
|
const submitResult = () => import('@/views/ebiz/preserve/common/SubmitResult')
|
||||||
const policyList = () => import('@/views/ebiz/preserve/PolicyList')
|
const policyList = () => import('@/views/ebiz/preserve/common/PolicyList')
|
||||||
const renewalInfo = () => import('@/views/ebiz/preserve/RenewalInfo')
|
const renewalInfo = () => import('@/views/ebiz/preserve/pc/RenewalInfo')
|
||||||
const renewalConfirmation = () => import('@/views/ebiz/preserve/RenewalConfirmation')
|
const renewalConfirmation = () => import('@/views/ebiz/preserve/pc/RenewalConfirmation')
|
||||||
const contactInfo = () => import('@/views/ebiz/preserve/ContactInfo')
|
const autopayAuthorization = () => import('@/views/ebiz/preserve/pc/AutopayAuthorization')
|
||||||
const contacAgreement = () => import('@/views/ebiz/preserve/ContacAgreement')
|
const contactInfo = () => import('@/views/ebiz/preserve/bb/ContactInfo')
|
||||||
const contactConfirmation = () => import('@/views/ebiz/preserve/ContactConfirmation')
|
const contacAgreement = () => import('@/views/ebiz/preserve/bb/ContacAgreement')
|
||||||
const beneficiaryInfo = () => import('@/views/ebiz/preserve/BeneficiaryInfo')
|
const contactConfirmation = () => import('@/views/ebiz/preserve/bb/ContactConfirmation')
|
||||||
const beneficiaryInfoAdd = () => import('@/views/ebiz/preserve/BeneficiaryInfoAdd')
|
const beneficiaryInfo = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfo')
|
||||||
const beneficiaryInfoDetail = () => import('@/views/ebiz/preserve/BeneficiaryInfoDetail')
|
const beneficiaryInfoAdd = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfoAdd')
|
||||||
const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/BeneficiaryConfirmation')
|
const beneficiaryInfoDetail = () => import('@/views/ebiz/preserve/bc/BeneficiaryInfoDetail')
|
||||||
const surrenderInfo = () => import('@/views/ebiz/preserve/SurrenderInfo')
|
const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/bc/BeneficiaryConfirmation')
|
||||||
const surrenderConfirmation = () => import('@/views/ebiz/preserve/SurrenderConfirmation')
|
const surrenderInfo = () => import('@/views/ebiz/preserve/ct/SurrenderInfo')
|
||||||
const autopayAuthorization = () => import('@/views/ebiz/preserve/AutopayAuthorization')
|
const surrenderConfirmation = () => import('@/views/ebiz/preserve/ct/SurrenderConfirmation')
|
||||||
const surrenderTip = () => import('@/views/ebiz/preserve/SurrenderTip')
|
const surrenderTip = () => import('@/views/ebiz/preserve/ct/SurrenderTip')
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@@ -29,7 +29,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/policyList',
|
path: '/preserve/common/policyList',
|
||||||
name: 'policyList',
|
name: 'policyList',
|
||||||
component: policyList,
|
component: policyList,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -38,7 +38,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/contactInfo',
|
path: '/preserve/bb/contactInfo',
|
||||||
name: 'contactInfo',
|
name: 'contactInfo',
|
||||||
component: contactInfo,
|
component: contactInfo,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -47,7 +47,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/contacAgreement',
|
path: '/preserve/bb/contacAgreement',
|
||||||
name: 'contacAgreement',
|
name: 'contacAgreement',
|
||||||
component: contacAgreement,
|
component: contacAgreement,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -56,7 +56,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/renewalInfo',
|
path: '/preserve/pc/renewalInfo',
|
||||||
name: 'renewalInfo',
|
name: 'renewalInfo',
|
||||||
component: renewalInfo,
|
component: renewalInfo,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -65,7 +65,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/beneficiaryInfo',
|
path: '/preserve/bc/beneficiaryInfo',
|
||||||
name: 'beneficiaryInfo',
|
name: 'beneficiaryInfo',
|
||||||
component: beneficiaryInfo,
|
component: beneficiaryInfo,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -74,7 +74,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/beneficiaryInfoAdd',
|
path: '/preserve/bc/beneficiaryInfoAdd',
|
||||||
name: 'beneficiaryInfoAdd',
|
name: 'beneficiaryInfoAdd',
|
||||||
component: beneficiaryInfoAdd,
|
component: beneficiaryInfoAdd,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -83,7 +83,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/beneficiaryInfoDetail',
|
path: '/preserve/bc/beneficiaryInfoDetail',
|
||||||
name: 'beneficiaryInfoDetail',
|
name: 'beneficiaryInfoDetail',
|
||||||
component: beneficiaryInfoDetail,
|
component: beneficiaryInfoDetail,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -92,7 +92,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/surrenderInfo',
|
path: '/preserve/ct/surrenderInfo',
|
||||||
name: 'surrenderInfo',
|
name: 'surrenderInfo',
|
||||||
component: surrenderInfo,
|
component: surrenderInfo,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -102,15 +102,15 @@ export default [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/imageUpload',
|
path: '/preserve/imageUpload',
|
||||||
name: 'imageUpload',
|
name: 'bcImageUpload',
|
||||||
component: imageUpload,
|
component: bcImageUpload,
|
||||||
meta: {
|
meta: {
|
||||||
title: '影像上传',
|
title: '上传影像资料',
|
||||||
index: 7
|
index: 7
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/handleResult',
|
path: '/preserve/common/handleResult',
|
||||||
name: 'handleResult',
|
name: 'handleResult',
|
||||||
component: handleResult,
|
component: handleResult,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -119,7 +119,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/beneficiaryConfirmation',
|
path: '/preserve/bc/beneficiaryConfirmation',
|
||||||
name: 'beneficiaryConfirmation',
|
name: 'beneficiaryConfirmation',
|
||||||
component: beneficiaryConfirmation,
|
component: beneficiaryConfirmation,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -128,7 +128,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/renewalConfirmation',
|
path: '/preserve/pc/renewalConfirmation',
|
||||||
name: 'renewalConfirmation',
|
name: 'renewalConfirmation',
|
||||||
component: renewalConfirmation,
|
component: renewalConfirmation,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -137,7 +137,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/contactConfirmation',
|
path: '/preserve/bb/contactConfirmation',
|
||||||
name: 'contactConfirmation',
|
name: 'contactConfirmation',
|
||||||
component: contactConfirmation,
|
component: contactConfirmation,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -146,7 +146,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/surrenderConfirmation',
|
path: '/preserve/ct/surrenderConfirmation',
|
||||||
name: 'surrenderConfirmation',
|
name: 'surrenderConfirmation',
|
||||||
component: surrenderConfirmation,
|
component: surrenderConfirmation,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -155,7 +155,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/autopayAuthorization',
|
path: '/preserve/pc/autopayAuthorization',
|
||||||
name: 'autopayAuthorization',
|
name: 'autopayAuthorization',
|
||||||
component: autopayAuthorization,
|
component: autopayAuthorization,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -164,7 +164,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/surrenderTip',
|
path: '/preserve/ct/surrenderTip',
|
||||||
name: 'surrenderTip',
|
name: 'surrenderTip',
|
||||||
component: surrenderTip,
|
component: surrenderTip,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -173,7 +173,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/preserve/submitResult',
|
path: '/preserve/common/submitResult',
|
||||||
name: 'submitResult',
|
name: 'submitResult',
|
||||||
component: submitResult,
|
component: submitResult,
|
||||||
meta: {
|
meta: {
|
||||||
|
|||||||
95
src/views/ebiz/preserve/README.md
Normal file
95
src/views/ebiz/preserve/README.md
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
# ebiz-h5-preserve
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
|
||||||
|
## 保全项枚举(各个保全项文件夹也以此枚举命名)
|
||||||
|
|
||||||
|
AA("AA","增加保险金额","AA","G"),
|
||||||
|
AC("AC","投保人资料变更","AC","U"),
|
||||||
|
AM("AM","投保人变更","AM","U"),
|
||||||
|
AP("AP","宽末处理方式变更","AP","U"),
|
||||||
|
AR("AR","保单账户部分领取","AR","P"),
|
||||||
|
AT("AT","年金险解除合同","AT","P"),
|
||||||
|
AX("AX","年金险协议减人","AX","U"),
|
||||||
|
AZ("AZ","年金险减人","AZ","U"),
|
||||||
|
BB("BB","客户基本资料变更","BB","U"),
|
||||||
|
BC("BC","受益人变更","BC","U"),
|
||||||
|
BE("BE","被保险人复效","BE","Q"),
|
||||||
|
BI("BI","银行信息变更","BI","U"),
|
||||||
|
BM("BM","红利领取方式变更","BM","U"),
|
||||||
|
BR("BR","保险期间恢复","BR","U"),
|
||||||
|
BS("BS","保险期间中断","BS","U"),
|
||||||
|
BZ("BZ","建工险保单中止","BZ","U"),
|
||||||
|
CA("CA","帐户金额转移","CA","P"),
|
||||||
|
CB("CB","退保回退","CB","G"),
|
||||||
|
CC("CC","建工险工程面积造价变更","CC","U"),
|
||||||
|
CD("CD","客户地址信息变更","CD","U"),
|
||||||
|
CM("CM","客户重要资料变更","CM","U"),
|
||||||
|
CS("CS","签名变更","CS","U"),
|
||||||
|
CT("CT","退保","CT","P"),
|
||||||
|
DA("DA","增加附加特约责任","DA","U"),
|
||||||
|
DB("DB","红利领取","DB","P"),
|
||||||
|
DT("DT","附加特约责任终止","DT","U"),
|
||||||
|
EB("EB","差错回退","EB","U"),
|
||||||
|
EF("EF","终止附加险","EF","P"),
|
||||||
|
EI("EI","延长保险期间","EI","G"),
|
||||||
|
EN("EN","续保方式变更","EN","U"),
|
||||||
|
ER("ER","满期降低保额续保","ER","G"),
|
||||||
|
ES("ES","终止险种","ES","P"),
|
||||||
|
FM("FM","交费期间变更","FM","U"),
|
||||||
|
GA("GA","年金转换","GA","U"),
|
||||||
|
GB("GB","领取年龄变更","GB","U"),
|
||||||
|
GC("GC","生存给付转账授权","GC","U"),
|
||||||
|
GM("GM","领取方式变更","GM","U"),
|
||||||
|
HI("HI","补充告知","HI","U"),
|
||||||
|
HJ("HJ","万能缓缴期","HJ","U"),
|
||||||
|
IC("IC","客户重要资料变更(保单层","IC","U"),
|
||||||
|
IG("IG","投连险提前通知领取","IG","P"),
|
||||||
|
IO("IO","职业变更","IO","U"),
|
||||||
|
IP("IP","追加保费","IP","G"),
|
||||||
|
IR("IR","更换被保险人","IR","U"),
|
||||||
|
IT("IT","投连险退保","IT","P"),
|
||||||
|
JB("JB","减保选择权","JB","U"),
|
||||||
|
LG("LG","生存给付柜面领取","LG","P"),
|
||||||
|
LN("LN","保单质押贷款","LN","P"),
|
||||||
|
LR("LR","保单遗失补发","LR","G"),
|
||||||
|
MF("MF","长险费用变更","MF","U"),
|
||||||
|
MR("MR","主险续保","MR","G"),
|
||||||
|
NC("NC","新增保险方案","NC","G"),
|
||||||
|
NI("NI","新增被保险人","NI","G"),
|
||||||
|
NP("NP","保单新增险种","NP","G"),
|
||||||
|
NR("NR","被保人增加险种","NR","G"),
|
||||||
|
NS("NS","新增附加险","NS","G"),
|
||||||
|
OP("OP","万能险部分领取","OP","G"),
|
||||||
|
PA("PA","投资计划变更","PA","U"),
|
||||||
|
PC("PC","续期交费信息变更","PC","U"),
|
||||||
|
PF("PF","保单冻结及解冻","PF","U"),
|
||||||
|
PG("PG","投连险随时领取","PG","G"),
|
||||||
|
PL("PL","保单挂失、解挂","PL","U"),
|
||||||
|
PM("PM","缴费频率变更","PM","U"),
|
||||||
|
PR("PR","保单迁移","PR","U"),
|
||||||
|
PT("PT","减少保险金额","PT","P"),
|
||||||
|
PU("PU","减额缴清","PU","G"),
|
||||||
|
RB("RB","保全回退","RB","G"),
|
||||||
|
RC("RC","交费提醒方式变更","RC","U"),
|
||||||
|
RD("RD","部分领取","RD","P"),
|
||||||
|
RE("RE","保单复效","RE","Q"),
|
||||||
|
RF("RF","贷款清偿","RF","G"),
|
||||||
|
RG("RG","满期领取","RG","P"),
|
||||||
|
RN("RN","不定期缴费","RN","P"),
|
||||||
|
RR("RR","无名单实名化","RR","U"),
|
||||||
|
SA("SA","建工险保单延期","SA","U"),
|
||||||
|
SC("SC","特约变更","SC","U"),
|
||||||
|
SF("SF","公共保额收付费","SF","G"),
|
||||||
|
SM("SM","服务类维护","SM","U"),
|
||||||
|
TA("TA","转养老金","TA","U"),
|
||||||
|
TI("TI","投连账户转换","TI","U"),
|
||||||
|
TR("TR","保费自垫清偿","TR","G"),
|
||||||
|
TS("TS","投连复缴","TS","G"),
|
||||||
|
VC("VC","保单归属规则维护","VC","U"),
|
||||||
|
VR("VR","被保险人归属规则变更","VR","U"),
|
||||||
|
WP("WP","万能追加保费","WP","G"),
|
||||||
|
WT("WT","犹豫期退保","WT","P"),
|
||||||
|
XS("XS","协议减保","XS","U"),
|
||||||
|
XT("XT","协议退保","XT","P"),
|
||||||
|
ZT("ZT","减少被保险人","ZT","P");
|
||||||
@@ -30,9 +30,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Search, DropdownMenu, DropdownItem } from 'vant'
|
import { Search, DropdownMenu, DropdownItem } from 'vant'
|
||||||
import { customerList, customerInfo } from '@/api/ebiz/preserve/preserve'
|
import { customerList } from '@/api/ebiz/preserve/preserve'
|
||||||
export default {
|
export default {
|
||||||
name: 'search',
|
name: 'search',
|
||||||
|
// props: {
|
||||||
|
// options: {
|
||||||
|
// type: Array,
|
||||||
|
// default: () => []
|
||||||
|
// }
|
||||||
|
// },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchVal: '', // 搜索关键词
|
searchVal: '', // 搜索关键词
|
||||||
@@ -53,7 +59,7 @@ export default {
|
|||||||
[DropdownMenu.name]: DropdownMenu,
|
[DropdownMenu.name]: DropdownMenu,
|
||||||
[DropdownItem.name]: DropdownItem
|
[DropdownItem.name]: DropdownItem
|
||||||
},
|
},
|
||||||
async created() {
|
created() {
|
||||||
// 需要从原生那里获知入口
|
// 需要从原生那里获知入口
|
||||||
this.entry = this.$route.query.entry
|
this.entry = this.$route.query.entry
|
||||||
switch (this.entry) {
|
switch (this.entry) {
|
||||||
@@ -83,20 +89,22 @@ export default {
|
|||||||
this.$toast('请输入搜索内容')
|
this.$toast('请输入搜索内容')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (localStorage['preserve-customerInfo']) {
|
||||||
|
localStorage.removeItem('preserve-customerInfo')
|
||||||
|
}
|
||||||
customerList({
|
customerList({
|
||||||
queryParam: val,
|
queryParam: val,
|
||||||
queryType: this.selected //0客户姓名,1证件号码,2手机号
|
queryType: this.selected //0客户姓名,1证件号码,2手机号
|
||||||
// surrenderType: this.surrenderType, //"1","基本信息变更" "2","续期账号变更" "3","红利领取"
|
|
||||||
// systemType: '0'
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$toast.clear()
|
this.$toast.clear()
|
||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
this.list = res.content
|
console.log('res=======', res)
|
||||||
|
this.list = res.content.customerList
|
||||||
if (this.list.length == 0) {
|
if (this.list.length == 0) {
|
||||||
this.$toast(`暂无此客户`)
|
this.$toast(`暂无此客户`)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.content)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.isSearch = false
|
this.isSearch = false
|
||||||
@@ -120,42 +128,29 @@ export default {
|
|||||||
switch (this.entry) {
|
switch (this.entry) {
|
||||||
case 'contact':
|
case 'contact':
|
||||||
surrenderType = '1'
|
surrenderType = '1'
|
||||||
url = `/preserve/contactInfo?entry=contact`
|
url = `/preserve/bb/contactInfo?entry=BB`
|
||||||
break
|
break
|
||||||
case 'beneficiary':
|
case 'beneficiary':
|
||||||
surrenderType = '2'
|
surrenderType = '2'
|
||||||
url = `/preserve/policyList?entry=beneficiary`
|
url = `/preserve/common/policyList?entry=BC`
|
||||||
break
|
break
|
||||||
case 'renewal':
|
case 'renewal':
|
||||||
surrenderType = '3'
|
surrenderType = '3'
|
||||||
url = `/preserve/policyList?entry=renewal`
|
url = `/preserve/common/policyList?entry=PC`
|
||||||
break
|
break
|
||||||
case 'surrender':
|
case 'surrender':
|
||||||
surrenderType = '4'
|
surrenderType = '4'
|
||||||
url = `/preserve/policyList?entry=surrender`
|
url = `/preserve/common/policyList?entry=WT`
|
||||||
break
|
break
|
||||||
case 'hesitateSurrender':
|
case 'hesitateSurrender':
|
||||||
surrenderType = '5'
|
surrenderType = '5'
|
||||||
url = `/preserve/policyList?entry=hesitateSurrender`
|
url = `/preserve/common/policyList?entry=CT`
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
customerInfo({
|
localStorage.setItem('preserve-customerInfo', JSON.stringify(params))
|
||||||
customerNo: params.customerNo
|
|
||||||
// surrenderType //"1","基本信息变更" "2","续期账号变更" "3","红利领取"
|
|
||||||
}).then(res => {
|
|
||||||
console.log('客户信息详情', res)
|
|
||||||
// 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)
|
this.jupmTo(url)
|
||||||
} else {
|
|
||||||
this.$toast(res.resultMessage)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
jupmTo(url) {
|
jupmTo(url) {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { RadioGroup, Radio, Icon, Dialog } from 'vant'
|
import { RadioGroup, Radio, Icon, Dialog } from 'vant'
|
||||||
import { edorChange } from '@/api/ebiz/preserve/preserve'
|
import { changeEdor, policyInfo } from '@/api/ebiz/preserve/preserve'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BeneficiaryInfo',
|
name: 'BeneficiaryInfo',
|
||||||
@@ -60,21 +60,11 @@ export default {
|
|||||||
[Dialog.name]: Dialog
|
[Dialog.name]: Dialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
let feachData = {
|
|
||||||
surrenderDTOList: [
|
|
||||||
{
|
|
||||||
surrenderId: '',
|
|
||||||
edorapplyNo: '',
|
|
||||||
surrenderType: '2',
|
|
||||||
bnfDTOs: []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
feachData: feachData,
|
|
||||||
type: '',
|
type: '',
|
||||||
isDisType: false,
|
isDisType: false,
|
||||||
policy: null,
|
policy: null,
|
||||||
|
customerInfo: {}, //客户详情
|
||||||
insuredName: '', //被保险人
|
insuredName: '', //被保险人
|
||||||
beneficiaries: [] // 指定受益人列表
|
beneficiaries: [] // 指定受益人列表
|
||||||
}
|
}
|
||||||
@@ -82,36 +72,70 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
// 获取保单列表存储的数据
|
// 获取保单列表存储的数据
|
||||||
this.policy = JSON.parse(localStorage['preserve-policy'])
|
this.policy = JSON.parse(localStorage['preserve-policy'])
|
||||||
console.log(this.policy)
|
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo']) //客户详情
|
||||||
this.insuredName = this.policy.insuredName
|
this.insuredName = this.policy.insuredName
|
||||||
|
this.getPolicyInfo()
|
||||||
this.type = this.policy.bnfDTOs[0].bnfType
|
/*this.type = this.policy.bnfDTOs[0].bnfType
|
||||||
if (this.type == 2) {
|
if (this.type == 2) {
|
||||||
this.isDisType = true
|
this.isDisType = true
|
||||||
}
|
}
|
||||||
|
|
||||||
this.beneficiaries = this.policy.bnfDTOs
|
this.beneficiaries = this.policy.bnfDTOs
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
//告知信息
|
//获取初始化信息
|
||||||
|
getPolicyInfo() {
|
||||||
|
let data = {
|
||||||
|
contNo: this.policy.contNo,
|
||||||
|
edorType: 'BC',
|
||||||
|
customerNo: this.customerInfo.customerNo,
|
||||||
|
idno: this.customerInfo.idno,
|
||||||
|
mobile: this.customerInfo.mobile,
|
||||||
|
name: this.customerInfo.name
|
||||||
|
}
|
||||||
|
policyInfo(data).then(res => {
|
||||||
|
if (res.result == '0') {
|
||||||
|
this.beneficiaries = res.content.cont.bcBnfList
|
||||||
|
this.type = this.beneficiaries[0].isLegal == '1' ? '1' : '2' //isLegal:法定标记 1-是法定受益人 0-是指定受益人
|
||||||
|
if (this.type == 2) {
|
||||||
|
this.isDisType = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//下一步
|
||||||
nextStep() {
|
nextStep() {
|
||||||
if (this.type == 2 && this.beneficiaries.length == 0) {
|
if (this.type == 2 && this.beneficiaries.length == 0) {
|
||||||
this.$toast('受益人列表不能为空')
|
this.$toast('受益人列表不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.feachData.surrenderDTOList[0].bnfDTOs = this.beneficiaries
|
let feachData = {
|
||||||
edorChange(this.feachData)
|
platformType: 'APP',
|
||||||
|
edorType: 'BC',
|
||||||
|
operateType: '01',
|
||||||
|
bcBnfDTOList: this.beneficiaries
|
||||||
|
}
|
||||||
|
changeEdor(feachData)
|
||||||
.then(res => {
|
.then(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)
|
||||||
|
let path = ''
|
||||||
|
if (this.type != 2) {
|
||||||
|
path = '/preserve/common/HandleResult?entry=BC'
|
||||||
|
} else {
|
||||||
|
path = '/preserve/bc/imageUpload?entry=BC'
|
||||||
|
}
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + '/#/preserve/HandleResult?entry=beneficiary'
|
url: location.origin + `/#${path}`
|
||||||
},
|
},
|
||||||
routerInfo: '/preserve/HandleResult?entry=beneficiary'
|
routerInfo: path
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
@@ -134,10 +158,10 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + '/#/preserve/BeneficiaryInfoAdd'
|
url: location.origin + '/#/preserve/bc/BeneficiaryInfoAdd'
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: '/preserve/BeneficiaryInfoAdd'
|
path: '/preserve/bc/BeneficiaryInfoAdd'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -173,8 +173,8 @@ 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'
|
||||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||||
import { idToData } from './js/verification'
|
import { idToData } from '../js/verification'
|
||||||
import { selectComp } from './js/methods'
|
import { selectComp } from '../js/methods'
|
||||||
let relationToInsured = DataDictionary.relationToAppnt
|
let relationToInsured = DataDictionary.relationToAppnt
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -161,8 +161,8 @@ 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'
|
||||||
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
import idNoCheck from '@/assets/js/utils/idNoCheck'
|
||||||
import { idToData } from './js/verification'
|
import { idToData } from '../js/verification'
|
||||||
import { selectComp } from './js/methods'
|
import { selectComp } from '../js/methods'
|
||||||
let relationToInsured = DataDictionary.relationToAppnt
|
let relationToInsured = DataDictionary.relationToAppnt
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
392
src/views/ebiz/preserve/bc/ImageUpload.vue
Normal file
392
src/views/ebiz/preserve/bc/ImageUpload.vue
Normal file
@@ -0,0 +1,392 @@
|
|||||||
|
<!--影像信息上传页面-->
|
||||||
|
<template>
|
||||||
|
<div class="image-upload-container">
|
||||||
|
<div class=" pb80">
|
||||||
|
<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="1"
|
||||||
|
@delete="deleteImg"
|
||||||
|
/>
|
||||||
|
</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: [], //身份证
|
||||||
|
file: '', // 图片流
|
||||||
|
imgName: '', // 图片名称
|
||||||
|
list: [],
|
||||||
|
entry: '',
|
||||||
|
surrenderType: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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
|
||||||
|
},
|
||||||
|
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>
|
||||||
@@ -1,22 +1,11 @@
|
|||||||
<!--保单列表页-->
|
<!--保单列表页-->
|
||||||
<template>
|
<template>
|
||||||
<div class="proposal-list-container">
|
<div class="proposal-list-container">
|
||||||
<!-- <van-list
|
|
||||||
v-model="loading"
|
|
||||||
:immediate-check="false"
|
|
||||||
:finished="finished"
|
|
||||||
:finished-text="finishedText"
|
|
||||||
error-text="请求失败,点击重新加载"
|
|
||||||
:error.sync="error"
|
|
||||||
@load="loadMore"
|
|
||||||
class="pb45"
|
|
||||||
> -->
|
|
||||||
<!-- <div v-if="isSuccess"> -->
|
|
||||||
<div v-if="policyList.length > 0">
|
<div v-if="policyList.length > 0">
|
||||||
<div class="fs12" v-for="(item, index) in policyList" :key="index" @click="toChange(item)">
|
<div class="fs12" v-for="(item, index) in policyList" :key="index" @click="toChange(item)">
|
||||||
<div class="flex align-items-c justify-content-c h40 gray">
|
<div class="flex align-items-c justify-content-c h40 gray">
|
||||||
<div>保单号:</div>
|
<div>保单号:</div>
|
||||||
<div>{{ item.policyNo }}</div>
|
<div>{{ item.contNo }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-white pv15 pr15 pl10 ml15 mr15">
|
<div class="bg-white pv15 pr15 pl10 ml15 mr15">
|
||||||
@@ -58,12 +47,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
|
||||||
<div v-else class="text-center">
|
<div v-else class="text-center">
|
||||||
<img class="mt40 w250" src="@/assets/images/pic_page-non.png" />
|
<img class="mt40 w250" src="@/assets/images/pic_page-non.png" />
|
||||||
<div class="fs17 c-gray-dark mt40">暂无保单</div>
|
<div class="fs17 c-gray-dark mt40">暂无保单</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </van-list> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -79,53 +66,22 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
entry: '', //入口
|
entry: '', //入口
|
||||||
// policyList: [] //保单列表
|
|
||||||
customerInfo: JSON.parse(localStorage.getItem('preserve-customerInfo')), //客户详情
|
customerInfo: JSON.parse(localStorage.getItem('preserve-customerInfo')), //客户详情
|
||||||
policyList: [
|
policyList: [] //保单列表
|
||||||
{
|
|
||||||
contNo: '11111111',
|
|
||||||
appntName: '张三',
|
|
||||||
insuredName: '李四',
|
|
||||||
riskName: '国富人寿八桂无忧',
|
|
||||||
amt: '130.000',
|
|
||||||
cvaliDate: '2020-01-19'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
grpContNo: '11222111',
|
|
||||||
contNo: '11111111',
|
|
||||||
proposalPrtNo: '641596',
|
|
||||||
hangUpFlag: '2',
|
|
||||||
appntName: '张三2',
|
|
||||||
insuredName: '李四2',
|
|
||||||
riskName: '国富人寿八桂无忧',
|
|
||||||
amt: '130.00',
|
|
||||||
cvaliDate: '2020-01-19'
|
|
||||||
}
|
|
||||||
] //保单列表
|
|
||||||
/*
|
|
||||||
finishedText: '没有更多了',
|
|
||||||
finished: false,
|
|
||||||
error: false,
|
|
||||||
loading: false,
|
|
||||||
pageSize: 5, //每页数据条数
|
|
||||||
morePage: 1, // 当前页数
|
|
||||||
isSuccess: false
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.entry = this.$route.query.entry
|
this.entry = this.$route.query.entry
|
||||||
//await this.getPolicyList({ customerNo: this.customerInfo.customerNo })
|
this.getPolicyList({ customerNo: this.customerInfo.customerNo, edorType: this.entry })
|
||||||
// this.getPolicyList({ customerNo: '' })
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取保单列表
|
//获取保单列表
|
||||||
async getPolicyList(data) {
|
getPolicyList(data) {
|
||||||
policyList(data).then(res => {
|
policyList(data).then(res => {
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
this.policyList = res.content.policyListDTOList
|
this.policyList = res.content.policyDTOList
|
||||||
} else {
|
} else {
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.content)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -136,11 +92,14 @@ export default {
|
|||||||
localStorage['preserve-policy'] = JSON.stringify(detail)
|
localStorage['preserve-policy'] = JSON.stringify(detail)
|
||||||
let url
|
let url
|
||||||
switch (this.entry) {
|
switch (this.entry) {
|
||||||
case 'surrender': //退保
|
case 'CT': //退保
|
||||||
url = `surrenderInfo?entry=${this.entry}`
|
url = `ct/surrenderInfo?entry=${this.entry}`
|
||||||
break
|
break
|
||||||
case 'beneficiary': //受益人变更
|
// case 'WT': //犹豫期退保
|
||||||
url = `beneficiaryInfo?entry=${this.entry}`
|
// url = `wt/surrenderInfo?entry=${this.entry}`
|
||||||
|
// break
|
||||||
|
case 'BC': //受益人变更
|
||||||
|
url = `bc/beneficiaryInfo?entry=${this.entry}`
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
3
src/views/ebiz/preserve/components/Search.vue
Normal file
3
src/views/ebiz/preserve/components/Search.vue
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
30
src/views/ebiz/preserve/js/data-dictionary.js
Normal file
30
src/views/ebiz/preserve/js/data-dictionary.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
export default {
|
||||||
|
//保全类型
|
||||||
|
preserveType: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
label: '客户基本资料变更',
|
||||||
|
type: 'BB'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
label: '受益人变更',
|
||||||
|
type: 'BC'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
label: '退保',
|
||||||
|
type: 'CT'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '4',
|
||||||
|
label: '续期账号变更',
|
||||||
|
type: 'PC'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '5',
|
||||||
|
label: '犹豫期退保',
|
||||||
|
type: 'WT'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
447
src/views/ebiz/preserve/pc/ImageUpload.vue
Normal file
447
src/views/ebiz/preserve/pc/ImageUpload.vue
Normal file
@@ -0,0 +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>
|
||||||
447
src/views/ebiz/preserve/wt/ImageUpload.vue
Normal file
447
src/views/ebiz/preserve/wt/ImageUpload.vue
Normal file
@@ -0,0 +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>
|
||||||
Reference in New Issue
Block a user