GFRS-2561【前端】二次优化的需求,入司页面的优化,增加银行卡与担保人的校验,重构家庭关系页面--提交人:张齐

This commit is contained in:
zhangqi1
2021-07-23 10:05:44 +08:00
parent 501e1579bd
commit 5254c95ed0
5 changed files with 789 additions and 539 deletions

View File

@@ -1,5 +1,5 @@
import request from '@/assets/js/utils/request'
import getUrl from '@/assets/js/utils/get-url'
import request from '@/assets/js/utils/request';
import getUrl from '@/assets/js/utils/get-url';
//增员信息提交
export function agentInfowxSubmit(data) {
@@ -7,23 +7,25 @@ export function agentInfowxSubmit(data) {
url: getUrl('/agent/enter/share', 1),
method: 'post',
data
})
});
}
//进度查询
export function processCheck(data) {
return request({
url: getUrl('/agent/enter/query', 1),
method: 'post',
data
})
});
}
// 保存接口
export function saveOrUpdateInfo(data) {
return request({
url: getUrl('/agent/enter/saveOrUpdateInfo', 1),
method: 'post',
data
})
});
}
export function getTokenForUserModel(data) {
@@ -31,7 +33,7 @@ export function getTokenForUserModel(data) {
url: getUrl('/agent/enter/getTokenForAgent', 1),
method: 'get',
data
})
});
}
// //查询二次分享数据
@@ -49,7 +51,7 @@ export function agentAll(data) {
url: getUrl('/agent/enter/queryAll', 1),
method: 'post',
data
})
});
}
// 健告查询
@@ -58,7 +60,7 @@ export function getImpart(data) {
url: getUrl('/agent/enter/getImpart', 1),
method: 'post',
data
})
});
}
//查询签署协议信息
@@ -67,23 +69,25 @@ export function agreementQuery(data) {
url: getUrl('/agent/agreement/query', 1),
method: 'post',
data
})
});
}
//签署协议的下一步保存接口
export function signAgreement(data) {
return request({
url: getUrl('/agent/agreement/signAgreement', 1),
method: 'post',
data
})
});
}
//保存成功获取工号
export function enterQuery(data) {
return request({
url: getUrl('/agent/enter/query', 1),
method: 'post',
data
})
});
}
//入司增员审批
@@ -92,7 +96,7 @@ export function agentAddApproval(data) {
url: getUrl('/agent/examineApprove/dispose', 1),
method: 'post',
data
})
});
}
// 入司撤销申请
@@ -101,7 +105,7 @@ export function revoke(data) {
url: getUrl('/agent/enter/revoke', 1),
method: 'post',
data
})
});
}
// 执业证信息保存
@@ -110,7 +114,7 @@ export function saveCertificateInfo(data) {
url: getUrl('/agent/enter/uploadZgz', 1),
method: 'post',
data
})
});
}
// 联行号获取
@@ -119,5 +123,23 @@ export function getBankJoints(data) {
url: getUrl('/agent/enter/bankJoint', 1),
method: 'post',
data
})
});
}
// 校验银行号是否已经存在的接口
export function checkBankCodeUrl(data) {
return request({
url: getUrl('/agent/enter/checkBankCode', 1),
method: 'post',
data
});
}
// 校验是否已经是担保人的接口
export function checkGuarantorUrl(data) {
return request({
url: getUrl('/agent/enter/checkGuarantor ', 1),
method: 'post',
data
});
}

View File

@@ -193,7 +193,7 @@ Validator.extend('workYears', {
})
//最大长度120字符
Validator.extend('max120', {
getMessage: () => '输入内容不得超过120字符',
getMessage: () => '输入内容不得超过120字符',
validate: value => {
return value.length < 121
}

View File

@@ -1,92 +1,130 @@
<template>
<div class="insured-info-container pb50">
<div class='insured-info-container pb50'>
<!-- 基本信息 -->
<van-cell-group>
<RsTop :active="['1', '2', '3']"></RsTop>
<p class="fs15 fwb pl10 pv12">家庭情况</p>
<p class='fs15 fwb pl10 pv12'>家庭情况</p>
<!-- start -->
<div v-for="(item, i) in userInfo" :key="i">
<p class="mv8 p8 text-right bg-gray" v-show="i != '0'"><van-icon class="v-middle" @click="deletelist(i)" name="delete" /></p>
<van-field
:value="item.relationType | idToText('relationType')"
v-validate="'required'"
readonly
label="关系"
name="关系"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('1', i)"
required
/>
<div v-if="userInfo[i].relationType != '3'">
<van-field label="姓名" type="text" name="姓名" placeholder="请输入" v-validate="'required|name'" clearable v-model="item.name" required />
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" required :value.sync="item.sex"></select-radio>
<van-checkbox-group v-model='checkedRelationshipList'>
<div v-for='(item, i) in userInfo' :key='i'>
<van-field
:value="item.idType | idToText('rsIdType')"
:value="item.relationType | idToText('agentEenterBasicFamilyRelationType')"
v-validate="'required'"
readonly
label="证件类型"
name="证件类型"
right-icon="arrow"
placeholder="请选择"
@click="toSelect('2', i)"
required
label='关系'
name='关系'
right-icon='arrow'
placeholder='请选择'
:required='!!item.requiredType'
:disabled='!item.requiredType'
/>
<van-field
label="证件号码"
type="text"
name="证件号码"
placeholder="请输入"
label='姓名'
type='name'
name='姓名'
placeholder='请输入'
v-validate='{ required: !!item.requiredType, name: true }'
clearable
v-model="item.idNo"
v-validate="'required'"
required
maxlength="18"
v-model='item.name'
:required='!!item.requiredType'
:disabled='!item.requiredType'
/>
<select-radio
:value.sync='item.sex'
:radios='sexRadio'
label='性别'
name='性别'
v-validate='{ required: !!item.requiredType }'
:required='!!item.requiredType'
:disabled='!item.requiredType'
></select-radio>
<van-field
:value="item.idType | idToText('rsIdType')"
readonly
label='证件类型'
name='证件类型'
right-icon='arrow'
placeholder='请选择'
@click="toSelect('2', i, item)"
v-validate='{ required: !!item.requiredType }'
:required='!!item.requiredType'
:disabled='!item.requiredType'
/>
<van-field
label='证件号码'
type='text'
name='证件号码'
placeholder='请输入'
clearable
v-model='item.idNo'
v-validate='{ required: !!item.requiredType }'
:required='!!item.requiredType'
:disabled='!item.requiredType'
maxlength='18'
/>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
:value.sync="item.birthday"
type="date"
:flag="true"
ref="birthday"
required
label='出生日期'
name='出生日期'
:value.sync='item.birthday'
type='date'
:flag='true'
ref='birthday'
v-validate='{ required: !!item.requiredType }'
:required='!!item.requiredType'
:disabled='!item.requiredType'
></FieldDatePicter>
<van-field
v-model="item.mobile"
label="联系电话"
name="联系电话"
placeholder="请输入"
v-validate="'required|mobile'"
maxlength="11"
required
v-model='item.mobile'
label='联系电话'
name='联系电话'
placeholder='请输入'
type='mobile'
v-validate='{ required: !!item.requiredType, mobile: true }'
maxlength='11'
:required='!!item.requiredType'
:disabled='!item.requiredType'
clearable
/>
<p class='mv8 p8 bg-gray'>
<van-checkbox :name='i' v-show="item.relationType != '0'" @click='notHaveImmediateFamilyFunc(item,i)'
checked-color='#ee0a24'>无此直系亲属
</van-checkbox>
</p>
</div>
</van-checkbox-group>
<div class='add-btn mt20 pb20 text-center p15 c-gray-base' @click='add'>+
新增
</div>
<div v-if="userInfo[0].relationType != '3'" class="add-btn mt20 pb20 text-center p15 c-gray-base" @click="add">+ 新增</div>
<!-- end -->
<div class="flex justify-content-s bottom-btn bg-white">
<van-button class=" bottom0 left0" square plain type="danger" v-no-more-click="1000" @click="goBack" size="large">上一步</van-button>
<van-button class=" bottom0 left0" square type="danger" size="large" @click="nextStep" v-no-more-click="1000">一步</van-button>
<div class='flex justify-content-s bottom-btn bg-white'>
<van-button class=' bottom0 left0' square plain type='danger' v-no-more-click='1000' @click='goBack'
size='large'>一步
</van-button>
<van-button class=' bottom0 left0' square type='danger' size='large' @click='nextStep' v-no-more-click='1000'>
下一步
</van-button>
</div>
</van-cell-group>
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom">
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
<van-popup v-model='popupShow' position='bottom'>
<van-picker show-toolbar :columns='columns' @confirm='onConfirm' @cancel='popupShow = false' />
</van-popup>
</div>
</template>
<script>
import { Field, CellGroup, Button, col, popup, picker, Dialog } from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import RsTop from '@/components/ebiz/agentEenter/RsTop'
import idNoCheck from '@/assets/js/utils/idNoCheck'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import { saveOrUpdateInfo, agentAll } from '@/api/ebiz/agentEenter/agentEenter'
import { Field, CellGroup, Button, col, popup, picker, Dialog, Checkbox, CheckboxGroup } from 'vant';
import SelectRadio from '@/components/ebiz/SelectRadio';
import FieldDatePicter from '@/components/ebiz/FieldDatePicter';
import DataDictionary from '@/assets/js/utils/data-dictionary';
import RsTop from '@/components/ebiz/agentEenter/RsTop';
import idNoCheck from '@/assets/js/utils/idNoCheck';
import beforeDate from '@/assets/js/utils/getBeforeDate.js';
import { saveOrUpdateInfo, agentAll } from '@/api/ebiz/agentEenter/agentEenter';
// 是否存在亲属关系的枚举值
const immediateFamilyEnum = {
existence: 1, // 存在亲属关系
nonExistent: 0 // 不存在亲属关系
};
export default {
name: 'AgentEenterBasicFamily',
components: {
@@ -98,9 +136,12 @@ export default {
[col.name]: col,
[popup.name]: popup,
[picker.name]: picker,
[RsTop.name]: RsTop
[RsTop.name]: RsTop,
[Checkbox.name]: Checkbox,
[CheckboxGroup.name]: CheckboxGroup
},
data() {
return {
popupShow: false,
enterIndex: '',
@@ -108,14 +149,90 @@ export default {
columns: [],
userInfo: [
{
relationType: '',
relationType: '', // 关系
name: '', // 姓名
sex: '0', // 性别(枚举值)
idType: '', // 证件类型(枚举值)
idNo: '', // 证件号码
birthday: '', // 出生日期
mobile: '' // 联系方式
}
],
// 定义当用户基本信息中婚姻状态选择的是已婚的情况时的数据格式
userInfoMarried: [
{
relationType: '0',
name: '',
sex: '0',
idType: '',
idNo: '',
birthday: '',
mobile: '',
birthday: ''
}
requiredType: immediateFamilyEnum.existence
}, // 配偶
{
relationType: '1',
name: '',
sex: '0',
idType: '',
idNo: '',
birthday: '',
mobile: '',
requiredType: immediateFamilyEnum.existence
}, // 父亲
{
relationType: '2',
name: '',
sex: '0',
idType: '',
idNo: '',
birthday: '',
mobile: '',
requiredType: immediateFamilyEnum.existence
}, // 母亲
{
relationType: '3',
name: '',
sex: '0',
idType: '',
idNo: '',
birthday: '',
mobile: '',
requiredType: immediateFamilyEnum.existence
} // 子女
],
// 定义当用户基本信息中婚姻状态选择的是非已婚的情况时的数据格式
userInfoNotMarried: [
{
relationType: '1',
name: '',
sex: '0',
idType: '',
idNo: '',
birthday: '',
mobile: '',
requiredType: immediateFamilyEnum.existence
}, // 父亲
{
relationType: '2',
name: '',
sex: '0',
idType: '',
idNo: '',
birthday: '',
mobile: '',
requiredType: immediateFamilyEnum.existence
}, // 母亲
{
relationType: '3',
name: '',
sex: '0',
idType: '',
idNo: '',
birthday: '',
mobile: '',
requiredType: immediateFamilyEnum.existence
} // 子女
],
sexRadio: [
{
@@ -135,20 +252,21 @@ export default {
twPass: true,
gtFlag1: true,
gtFlag2: true,
currentTime: beforeDate.getBeforeDays(1)
}
currentTime: beforeDate.getBeforeDays(1),
checkedRelationshipList: [] // 定义一个数组集合,储存当前是哪个对象勾选了‘无此亲属关系’选项
};
},
mounted() {
Dialog.alert({
message: '请如实填写下列各项内容,直系亲属为本人父母、子女或配偶,其余亲属不属于直系亲属。如有不实,后果自负。'
}).then(() => {
this.agentAll()
})
document.body.style.backgroundColor = '#fff'
this.agentAll();
});
document.body.style.backgroundColor = '#fff';
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
document.body.style.backgroundColor = '';
next();
},
methods: {
goBack() {
@@ -164,69 +282,87 @@ export default {
index: -1,
path: '/agentEenter/AgentEnterGuarantor'
}
})
});
},
//信息返显
agentAll() {
let that = this
let that = this;
that.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = {}
});
let data = {};
agentAll(data).then(res => {
if (res.result == '0') {
localStorage.removeItem('marriageEnumInfo');
localStorage.setItem('marriageEnumInfo', res.content.ebizEnterCustomerDto.marriage);
if (res.content.ebizRelationDtoLst.length != 0) {
let result = res.content.ebizRelationDtoLst
let result = res.content.ebizRelationDtoLst;
if (result) {
// 重置情况变量,防止数据有缓存
that.checkedRelationshipList = [];
result.map(item => {
delete item.id
delete item.baseId
delete item.createdDate
delete item.createdUser
delete item.isDelete
delete item.modifiedDate
delete item.modifiedUser
})
that.userInfo = result
delete item.id;
delete item.baseId;
delete item.createdDate;
delete item.createdUser;
delete item.isDelete;
delete item.modifiedDate;
delete item.modifiedUser;
// 判断数据中的checkedIndex属性是否有对应数据
// 如果有数据,则获取数据存储到储存当前是哪个对象勾选了‘无此亲属关系’选项的集合中,用于回显勾选了‘无此亲属关系’的选项
if (item.checkedIndex != null) {
that.checkedRelationshipList.push(item.checkedIndex);
}
});
that.userInfo = result;
}
} else {
that.userInfo = [];
// 根据基本信息中‘婚姻状态’的不同,赋值不同的数据
if (res.content.ebizEnterCustomerDto.marriage == '5') {
that.userInfo = that.userInfoMarried;
} else {
that.userInfo = that.userInfoNotMarried;
}
}
}
})
});
},
toSelect(pickerType, index, valueKey) {
//pickerType 1、证件类型 2、民族 3、健康状况 4 婚姻状况 5 政治面貌
;[this.popupShow, this.pickerType] = [true, pickerType]
if (valueKey) this.valueKey = valueKey
this.enterIndex = index
if (pickerType == '1') {
this.columns = DataDictionary.relationType
}
if (pickerType == '2') {
this.columns = DataDictionary.rsIdType
/**
* @Description: 当选择‘证件类型’与‘出生日期’时,触发的方法
* @params: pickerType-- 触发此方法的类型(如,是当选择‘证件类型’时触发的方法,还是当选择‘出生日期’时触发的方法)
* @params: index-- 当期部分在所有数据中的下标索引值
* @params: data-- 当前部分的数据对象
* @author:zhangqi
* @Date:2021-07-21
*/
toSelect(pickerType, index, data) {
if (data.requiredType) {
//pickerType 1、证件类型 2、民族 3、健康状况 4 婚姻状况 5 政治面貌
[this.popupShow, this.pickerType] = [true, pickerType];
this.enterIndex = index;
if (pickerType == '1') {
this.columns = DataDictionary.agentEenterBasicFamilyRelationType;
}
if (pickerType == '2') {
this.columns = DataDictionary.rsIdType;
}
} else {
return false;
}
},
onConfirm(value) {
this.popupShow = false
this.popupShow = false;
if (this.pickerType == '1') {
this.userInfo[this.enterIndex].relationType = value.id
if (value.id == '3') {
//如果家庭关系选择无,则页面其他信息不需要填不需要显示
Dialog.alert({
message: '如无直系亲属(父母、配偶、子女),方可选关系为无。'
}).then(() => {
this.userInfo.length = 1
for (let key in this.userInfo[0]) {
this.userInfo[0][key] = ''
}
this.$set(this.userInfo[0], 'relationType', '3')
})
}
this.userInfo[this.enterIndex].relationType = value.id;
}
if (this.pickerType == '2') {
this.userInfo[this.enterIndex].idType = value.id
this.userInfo[this.enterIndex].idType = value.id;
}
},
// 下一步
@@ -234,105 +370,63 @@ export default {
//表单校验, 成功跳转
this.$validator.validate().then(valid => {
if (true === valid) {
// console.log(this.userInfo)
this.userInfo.map(item => {
if (item.idType == '1') {
//身份证
console.log('证件类型是身份证')
console.log('证件类型是身份证');
// 证件号码规则校验
if (!idNoCheck.isIdno(item.idNo)) {
this.idCardFlag = false
this.idCardFlag = false;
} else {
this.idCardFlag = true
this.idCardFlag = true;
}
} /*else if (item.idType == '2') {
//户口本
console.log('户口本')
if (item.idNo.length != 18) {
this.bookletFlag = false
} else {
this.bookletFlag = true
}
} else if (item.idType == '3') {
//出生证
console.log('出生证')
if (item.idNo.length < 3) {
this.birthFlag = false
} else {
this.birthFlag = true
}
} else if (item.idType == '4') {
//护照
console.log('证件类型是护照')
if (item.idNo.length < 3) {
this.passportFlag = false
} else {
this.passportFlag = true
}
//证件是港澳居民通行证
} else if (item.idType == '5') {
console.log('证件类型是港澳居民通行证')
if (item.idNo.length != 9) {
this.gatPass = false
this.gtFlag1 = false
this.gtFlag2 = false
} else if (!/^(H|M)[0-9]{8}$/.test(item.idNo)) {
this.gatPass = false
this.gtFlag1 = true
} else {
this.gatPass = true
}
//证件是台湾居民通行证
} else if (item.idType == '6') {
console.log('证件类型是台湾居民通行证')
if (item.idNo.length != 8) {
this.twPass = false
} else {
this.twPass = true
}
}*/
})
}
});
// 循环存储勾选了无此亲属关系选项的数组userInfo的集合所对应的对象中添加一个新的字段用于回显勾选了无此亲属关系的选项
this.checkedRelationshipList.forEach(item => {
this.userInfo[item].checkedIndex = item;
});
if (this.idCardFlag && this.bookletFlag && this.birthFlag && this.passportFlag && this.gatPass && this.twPass) {
this.save()
this.save();
} else {
if (!this.idCardFlag) {
this.$toast('您填写的证件号码有误')
this.$toast('您填写的证件号码有误');
} else if (!this.bookletFlag) {
this.$toast('户口本的证件号码长度应等于18位')
this.$toast('户口本的证件号码长度应等于18位');
} else if (!this.birthFlag) {
this.$toast('出生证须大于等于3个字符')
this.$toast('出生证须大于等于3个字符');
} else if (!this.passportFlag) {
this.$toast('护照须大于等于3个字符')
this.$toast('护照须大于等于3个字符');
} else if (!this.gatPass) {
if (!this.gtFlag1) {
this.$toast('证件类型为港澳居民通行证的证件号码须为9位')
this.$toast('证件类型为港澳居民通行证的证件号码须为9位');
} else if (!this.gtFlag2) {
this.$toast('证件类型为港澳居民通行证的,证件号码首位字母为"H"/"M",证件号码第2位至第9位为阿拉伯数字')
this.$toast('证件类型为港澳居民通行证的,证件号码首位字母为"H"/"M",证件号码第2位至第9位为阿拉伯数字');
}
} else if (!this.twPass) {
this.$toast('证件类型为台湾居民通行证的证件号码须为8位数字')
this.$toast('证件类型为台湾居民通行证的证件号码须为8位数字');
}
}
} else {
this.$toast(this.$validator.errors.all()[0])
this.$toast(this.$validator.errors.all()[0]);
}
})
});
},
save() {
let that = this
let that = this;
that.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
});
let params = {
entryType: 'CUSTOMER_RELATION',
ebizRelationDtoLst: {}
}
params.ebizRelationDtoLst = that.userInfo
};
params.ebizRelationDtoLst = that.userInfo;
saveOrUpdateInfo(params).then(res => {
that.$toast.clear()
that.$toast.clear();
if (res.result == '0') {
this.$jump({
flag: 'h5',
@@ -342,35 +436,89 @@ export default {
routerInfo: {
path: `/agentEenter/AgentEenterBasicImage`
}
})
});
} else {
this.$toast(res.resultMessage)
this.$toast(res.resultMessage);
}
})
});
},
// 删除
deletelist(i) {
this.userInfo.splice(i, 1)
/**
* @Description: 勾选‘无此直系亲属’选项时,执行的方法
* @Description: 判断当前的操作行为是勾选‘无此直系亲属’选项,还是将已经选中的‘无此直系亲属’选项进行取消勾选
* @params: 当前勾选项所对应的数据对象
* @author:zhangqi
* @Date:2021-07-21
*/
notHaveImmediateFamilyFunc(item) {
if (item.requiredType) {
// 当前requiredType属性为true时执行此操作要勾选无此直系亲属选项。表示不存在亲属关系勾选无此直系亲属选项时要将输入项重置
item.name = ''; // 将对应数据对象中的姓名设置为空
item.sex = 0; // 将对应数据对象中的性别设置为默认的‘男’
item.idType = ''; // 将对应数据对象中的证件类型设置为空
item.idNo = ''; // 将对应数据对象中的证件号码设置为空
item.birthday = ''; // 将对应数据对象中的出生日期设置为空
item.mobile = ''; // 将对应数据对象中的联系号码设置为空
item.requiredType = immediateFamilyEnum.nonExistent; // 将对应数据对象中的是否必填设置为false表示设置输入项为非必填
} else {
// 当前requiredType属性为false时执行此操作要将已经选中的无此直系亲属选项进行取消勾选表示存在亲属关系
item.name = ''; // 将对应数据对象中的姓名设置为空
item.sex = 0; // 将对应数据对象中的性别设置为默认的‘男’
item.idType = ''; // 将对应数据对象中的证件类型设置为空
item.idNo = ''; // 将对应数据对象中的证件号码设置为空
item.birthday = ''; // 将对应数据对象中的出生日期设置为空
item.mobile = ''; // 将对应数据对象中的联系号码设置为空
item.requiredType = immediateFamilyEnum.existence; // 将对应数据对象中的是否必填设置为true表示输入项都是要必填
}
},
// add新增
/**
* @Description: 点击页面底部,新增按钮执行的方法
* @author:zhangqi
* @Date:2021-07-21
*/
add() {
this.userInfo.push({ sex: '0' })
this.userInfo.push({
relationType: '3', // 关系
name: '', // 姓名
sex: '0', // 性别
idType: '', // 证件类型的枚举
idNo: '', // 证件号码
birthday: '', // 出生日期
mobile: '', // 联系电话
requiredType: immediateFamilyEnum.existence // 是否必填
});
}
}
}
};
</script>
<style lang="scss" scoped>
<style lang='scss' scoped>
.insured-info-container {
.referrerW {
/deep/.van-cell__title {
/deep/ .van-cell__title {
width: 110px;
}
}
.add-btn {
width: 80%;
margin: 20px auto;
border: 1px dashed #999;
}
.mv8 {
margin-top: unset !important;
margin-bottom: unset !important;
/deep/ .van-checkbox {
.van-checkbox__label {
color: #ff0000;
font-weight: bold;
font-size: 14px;
}
}
}
.bg-gray {
background: #f1f2f4 !important;
}

View File

@@ -1,290 +1,302 @@
<template>
<div class="insured-info-container pb50 ">
<div class='insured-info-container pb50 '>
<!-- 基本信息 -->
<van-cell-group>
<RsTop :active="['1']"></RsTop>
<p style="border-bottom: 1px solid #ebedf0" class=" fs15 fwb pl10 pv12">基本信息</p>
<van-field v-model="userInfo.name" label="姓名" name="姓名" placeholder="请输入" v-validate="'required|name'" maxlength="6" required clearable />
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" required :value.sync="userInfo.sex"></select-radio>
<p style='border-bottom: 1px solid #ebedf0' class=' fs15 fwb pl10 pv12'>基本信息</p>
<van-field v-model='userInfo.name' label='姓名' name='姓名' placeholder='请输入' v-validate="'required|name'"
maxlength='6' required clearable />
<select-radio :radios='sexRadio' label='性别' name='性别' v-validate="'required'" required
:value.sync='userInfo.sex'></select-radio>
<FieldDatePicter
v-validate="'required'"
label="出生日期"
name="出生日期"
:value.sync="userInfo.birthday"
type="date"
:flag="true"
label='出生日期'
name='出生日期'
:value.sync='userInfo.birthday'
type='date'
:flag='true'
@confirm="onDateConfirm($event, '2')"
ref="birthday"
:maxDate="maxDate"
ref='birthday'
:maxDate='maxDate'
required
></FieldDatePicter>
<van-field
:value="userInfo.nativePlace | idToText('rsnativePlace')"
label="籍贯"
name="籍贯"
label='籍贯'
name='籍贯'
v-validate="'required'"
readonly
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('14')"
required
/>
<van-field
:value="userInfo.ethnic | idToText('nationType')"
label="民族"
name="民族"
label='民族'
name='民族'
v-validate="'required'"
readonly
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('1')"
required
/>
<van-field
:value="userInfo.rgtAddress | idToText('rsnativePlace')"
label="户口所在地"
name="户口所在地"
label='户口所在地'
name='户口所在地'
v-validate="'required'"
readonly
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('10')"
maxlength="20"
maxlength='20'
required
/>
<van-field v-model="userInfo.title" label="职称" name="职称" placeholder="请输入" />
<van-field v-model='userInfo.title' label='职称' name='职称' placeholder='请输入' />
<van-field
:value="userInfo.marriage | idToText('rsmarriage')"
label="婚姻状况"
name="婚姻状况"
label='婚姻状况'
name='婚姻状况'
v-validate="'required'"
readonly
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('4')"
required
/>
<van-field
:value="userInfo.political | idToText('rspoliticsStatus')"
label="政治面貌"
name="政治面貌"
label='政治面貌'
name='政治面貌'
v-validate="'required'"
readonly
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('5')"
required
/>
<van-field
:value="userInfo.degree | idToText('rsdegree')"
label="学历"
name="学历"
label='学历'
name='学历'
v-validate="'required'"
readonly
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('6')"
required
/>
<van-field v-model="userInfo.school" label="毕业院校" name="毕业院校" placeholder="请输入" v-validate="'required'" clearable required />
<van-field v-model='userInfo.school' label='毕业院校' name='毕业院校' placeholder='请输入' v-validate="'required'" clearable
required />
<van-field
v-model="userInfo.discipline"
label="所学专业"
name="所学专业"
placeholder="请输入"
v-model='userInfo.discipline'
label='所学专业'
name='所学专业'
placeholder='请输入'
:required="isDegreeRequired(userInfo.degree) === 'required'"
v-validate="isDegreeRequired(userInfo.degree)"
v-validate='isDegreeRequired(userInfo.degree)'
clearable
/>
<van-field v-model="userInfo.mobile" label="手机" name="手机" required readonly />
<van-field :value="userInfo.idType | idToText('idType')" v-validate="'required'" label="证件类型" name="证件类型" required readonly />
<van-field v-model="userInfo.idNo" label="证件号码" readonly />
<van-field v-model="userInfo.address" label="联系地址" name="联系地址" placeholder="请输入" v-validate="'required'" required clearable />
<van-field v-model="userInfo.zip" label="邮政编码" name="邮政编码" placeholder="请输入" v-validate="'zipCode'" clearable />
<van-field v-model='userInfo.mobile' label='手机' name='手机' required readonly />
<van-field :value="userInfo.idType | idToText('idType')" v-validate="'required'" label='证件类型' name='证件类型' required
readonly />
<van-field v-model='userInfo.idNo' label='证件号码' readonly />
<van-field v-model='userInfo.address' label='联系地址' name='联系地址' placeholder='请输入' v-validate="'required'" required
clearable />
<van-field v-model='userInfo.zip' label='邮政编码' name='邮政编码' placeholder='请输入' v-validate="'zipCode'" clearable />
<van-field
placeholder="请选择"
@click="islistShow = true"
v-model="bankName"
label="开户银行"
name="开户银行"
placeholder='请选择'
@click='islistShow = true'
v-model='bankName'
label='开户银行'
name='开户银行'
v-validate="'required'"
required
readonly
/>
<van-field
v-model="areaName"
v-model='areaName'
readonly
label="开户地"
name="开户地"
label='开户地'
name='开户地'
required
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
v-validate="'required'"
@click="areaShow = true"
@click='areaShow = true'
/>
<van-field v-model="bankJoint" readonly label="网点名称" name="网点名称" right-icon="arrow" placeholder="请选择" @click="isBankListShow = true" />
<van-field v-model="userInfo.accountName" label="开户姓名" name="开户姓名" placeholder="请输入" v-validate="'required'" required clearable />
<van-field v-model='bankJoint' readonly label='网点名称' name='网点名称' right-icon='arrow' placeholder='请选择'
@click='isBankListShow = true' />
<van-field v-model='userInfo.accountName' label='开户姓名' name='开户姓名' placeholder='请输入' v-validate="'required'"
required clearable />
<van-field
v-model="userInfo.bankCode"
maxlength="19"
label="银行卡号"
name="银行卡号"
placeholder="请输入"
v-model='userInfo.bankCode'
maxlength='19'
label='银行卡号'
name='银行卡号'
placeholder='请输入'
required
clearable
v-validate="'required|bankCard'"
>
<van-button slot="button" size="small" type="danger" round @click="cardScanning('0')">银行卡扫描</van-button>
<van-button slot='button' size='small' type='danger' round @click="cardScanning('0')">银行卡扫描</van-button>
</van-field>
<van-field
v-model="bankCode"
maxlength="19"
label="确认银行卡号"
name="银行卡号"
placeholder="请再次输入银行卡号"
v-model='bankCode'
maxlength='19'
label='确认银行卡号'
name='银行卡号'
placeholder='请再次输入银行卡号'
required
clearable
v-validate="'required|bankCard'"
>
</van-field>
<van-field
v-model="userInfo.perationPeriod"
type="digit"
label="从业年限"
name="从业年限"
placeholder="请输入整数"
v-model='userInfo.perationPeriod'
type='digit'
label='从业年限'
name='从业年限'
placeholder='请输入整数'
v-validate="'onlyInteger'"
clearable
/>
<van-field v-model="userInfo.oldCompany" label="原工作单位" name="原工作单位" placeholder="请输入" required v-validate="'required'" clearable />
<van-field v-model='userInfo.oldCompany' label='原工作单位' name='原工作单位' placeholder='请输入' required
v-validate="'required'" clearable />
<van-field
:value="userInfo.oldOccupation | idToText('oldOccupation')"
label="原职业"
name="原职业"
label='原职业'
name='原职业'
v-validate="'required'"
readonly
required
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('11')"
/>
<van-field
:value="userInfo.sameTrade | idToText('rshealthCondition')"
label="是否同业"
name="是否同业"
label='是否同业'
name='是否同业'
v-validate="'required'"
readonly
required
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('3')"
/>
<van-field
:value="userInfo.nationality | idToText('rsnativeplace')"
label="国籍/地区"
name="国籍/地区"
label='国籍/地区'
name='国籍/地区'
v-validate="'required'"
readonly
required
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('12')"
/>
<van-field
:value="userInfo.foreigners | idToText('rshealthCondition')"
label="是否境外人员"
name="是否境外人员"
label='是否境外人员'
name='是否境外人员'
v-validate="'required'"
readonly
required
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('15')"
/>
<van-field
:value="userInfo.applGrade | idToText('applGrade')"
right-icon="arrow"
placeholder="请选择"
right-icon='arrow'
placeholder='请选择'
@click="toSelect('13')"
label="拟聘职级"
name="拟聘职级"
label='拟聘职级'
name='拟聘职级'
readonly
required
v-validate="'required'"
/>
</van-cell-group>
<van-cell-group class="" :border="false">
<p style=" border-bottom: 1px solid #ebedf0" class="fs15 fwb pl10 mt10 pv12">推荐人信息</p>
<van-field class="referrerW" v-model="ebiz_referrer.referCode" label="推荐人工号" name="推荐人工号" readonly />
<van-field class="referrerW" v-model="ebiz_referrer.referName" label="推荐人姓名" name="推荐人姓名" readonly />
<van-field class="referrerW" v-model="ebiz_referrer.teamManger" label="营业组主管工号" name="营业组主管工号" readonly />
<van-field class="referrerW" v-model="ebiz_referrer.teamMangerName" label="营业组主管姓名" name="营业组主管姓名" readonly />
<van-field class="referrerW" v-model="ebiz_referrer.officeManger" label="营业部经理工号" name="营业部经理工号" readonly />
<van-field class="referrerW" v-model="ebiz_referrer.officeMangerName" label="营业部经理姓名" name="营业部经理姓名" readonly />
<van-field class="referrerW" v-model="ebiz_referrer.areaManger" label=" 总监工号" name=" 总监工号" readonly />
<van-field class="referrerW" v-model="ebiz_referrer.areaMangerName" label="总监姓名" name="总监姓名" readonly />
<van-cell-group class='' :border='false'>
<p style=' border-bottom: 1px solid #ebedf0' class='fs15 fwb pl10 mt10 pv12'>推荐人信息</p>
<van-field class='referrerW' v-model='ebiz_referrer.referCode' label='推荐人工号' name='推荐人工号' readonly />
<van-field class='referrerW' v-model='ebiz_referrer.referName' label='推荐人姓名' name='推荐人姓名' readonly />
<van-field class='referrerW' v-model='ebiz_referrer.teamManger' label='营业组主管工号' name='营业组主管工号' readonly />
<van-field class='referrerW' v-model='ebiz_referrer.teamMangerName' label='营业组主管姓名' name='营业组主管姓名' readonly />
<van-field class='referrerW' v-model='ebiz_referrer.officeManger' label='营业部经理工号' name='营业部经理工号' readonly />
<van-field class='referrerW' v-model='ebiz_referrer.officeMangerName' label='营业部经理姓名' name='营业部经理姓名' readonly />
<van-field class='referrerW' v-model='ebiz_referrer.areaManger' label=' 总监工号' name=' 总监工号' readonly />
<van-field class='referrerW' v-model='ebiz_referrer.areaMangerName' label='总监姓名' name='总监姓名' readonly />
</van-cell-group>
<van-button type="danger" class="bottom-btn" @click="nextStep" v-no-more-click="1000">下一步</van-button>
<van-button type='danger' class='bottom-btn' @click='nextStep' v-no-more-click='1000'>下一步</van-button>
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom">
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
<van-popup v-model='popupShow' position='bottom'>
<van-picker show-toolbar :columns='columns' @confirm='onConfirm' @cancel='popupShow = false' />
</van-popup>
<!-- 地区选择 -->
<van-popup v-model="areaShow" position="bottom">
<van-area :area-list="areaList" :columns-num="2" value="110101" @confirm="setBankArea($event)" @cancel="areaShow = false" />
<van-popup v-model='areaShow' position='bottom'>
<van-area :area-list='areaList' :columns-num='2' value='110101' @confirm='setBankArea($event)'
@cancel='areaShow = false' />
</van-popup>
<!-- 家庭地址选择 -->
<van-popup v-model="homeShow" position="bottom">
<van-area :area-list="areaList" value="110101" @confirm="sureArea($event, '2')" @cancel="homeShow = false" />
<van-popup v-model='homeShow' position='bottom'>
<van-area :area-list='areaList' value='110101' @confirm="sureArea($event, '2')" @cancel='homeShow = false' />
</van-popup>
<!-- 户籍选择 -->
<van-popup v-model="censusShow" position="bottom">
<van-area :area-list="areaList" value="110101" :columns-num="2" @confirm="sureArea($event, '3')" @cancel="censusShow = false" />
<van-popup v-model='censusShow' position='bottom'>
<van-area :area-list='areaList' value='110101' :columns-num='2' @confirm="sureArea($event, '3')"
@cancel='censusShow = false' />
</van-popup>
<!--身份证扫描 -->
<van-popup v-model="isScan" position="bottom">
<IdentityCardScan @getScanInfo="getIdentityInfo"></IdentityCardScan>
<van-popup v-model='isScan' position='bottom'>
<IdentityCardScan @getScanInfo='getIdentityInfo'></IdentityCardScan>
</van-popup>
<!--身份证扫描 -->
<van-popup v-model="isScan" style="height:100vh" position="bottom">
<BankCardScan :scanShow="isScan" @getScanInfo="getBankCardInfo" :clear="isClear"></BankCardScan>
<van-popup v-model='isScan' style='height:100vh' position='bottom'>
<BankCardScan :scanShow='isScan' @getScanInfo='getBankCardInfo' :clear='isClear'></BankCardScan>
</van-popup>
<!-- 二次输入银行卡号校验弹出 -->
<van-dialog id="card" v-model="checkShow" show-cancel-button @confirm="bankCodeConfirm(bankCode)">
<p class="p10 fs16 text-center green mt5">请再次输入银行卡号</p>
<van-cell-group class="flex align-items-c pr5 mb15">
<van-field label="银行卡号:" name="银行卡号" maxlength="19" v-model="bankCode" clearable placeholder="请输入银行卡号" required />
<van-dialog id='card' v-model='checkShow' show-cancel-button @confirm='bankCodeConfirm(bankCode)'>
<p class='p10 fs16 text-center green mt5'>请再次输入银行卡号</p>
<van-cell-group class='flex align-items-c pr5 mb15'>
<van-field label='银行卡号:' name='银行卡号' maxlength='19' v-model='bankCode' clearable placeholder='请输入银行卡号'
required />
</van-cell-group>
<p class="fs14 mt5 ml5">是否确认提交一旦提交在人管审批之前无法再次进行修改</p>
<p class='fs14 mt5 ml5'>是否确认提交一旦提交在人管审批之前无法再次进行修改</p>
</van-dialog>
<!--开户银行选择-->
<SelectBankName :inputShow="inputShow" :listShow.sync="islistShow" :operateType="'enter_bank_type'" @getBank="getBank"></SelectBankName>
<SelectBankName :inputShow='inputShow' :listShow.sync='islistShow' :operateType="'enter_bank_type'"
@getBank='getBank'></SelectBankName>
<!-- 联行号选择 -->
<van-popup v-model="isBankListShow" position="bottom">
<van-picker show-toolbar :columns="bankJointNames" @confirm="setBankNum" @cancel="isBankListShow = false" />
<van-popup v-model='isBankListShow' position='bottom'>
<van-picker show-toolbar :columns='bankJointNames' @confirm='setBankNum' @cancel='isBankListShow = false' />
</van-popup>
</div>
</template>
<script>
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, List, Cell } from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
import areaList from '@/assets/js/utils/area'
import idNoCheck from '@/assets/js/utils/idNoCheck'
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, List, Cell, Dialog } from 'vant';
import SelectRadio from '@/components/ebiz/SelectRadio';
import FieldDatePicter from '@/components/ebiz/FieldDatePicter';
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker';
import CustomerPicker from '@/components/ebiz/customer/CustomerPicker';
import BankCardScan from '@/components/ebiz/sale/BankCardScan';
import areaList from '@/assets/js/utils/area';
import idNoCheck from '@/assets/js/utils/idNoCheck';
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan';
import beforeDate from '@/assets/js/utils/getBeforeDate.js';
import RsTop from '@/components/ebiz/agentEenter/RsTop'
import { saveOrUpdateInfo, agentAll, getBankJoints } from '@/api/ebiz/agentEenter/agentEenter.js'
import { idToData } from '@/views/ebiz/customer/js/verification'
import SelectBankName from '@/components/ebiz/account/SelectBankName'
import { getChildBank, getBankName } from '@/components/ebiz/account/getBankName'
import { getBankList } from '@/api/ebiz/sale/sale'
import MinXin from '@/components/ebiz/account/mixins'
import RsTop from '@/components/ebiz/agentEenter/RsTop';
import { saveOrUpdateInfo, agentAll, getBankJoints, checkBankCodeUrl } from '@/api/ebiz/agentEenter/agentEenter.js';
import { idToData } from '@/views/ebiz/customer/js/verification';
import SelectBankName from '@/components/ebiz/account/SelectBankName';
import { getChildBank, getBankName } from '@/components/ebiz/account/getBankName';
import { getBankList } from '@/api/ebiz/sale/sale';
import MinXin from '@/components/ebiz/account/mixins';
import {
selectComp,
chooseOccupation,
@@ -296,7 +308,7 @@ import {
getIdentityInfo,
getCode,
effectiveDataTypeChange
} from './js/methods'
} from './js/methods';
export default {
name: 'insuredInfo',
@@ -429,214 +441,227 @@ export default {
areaCode: '--',
areaName: '--'
}
}
};
},
computed: {
bankJointNames() {
const names = []
const names = [];
this.bankJointsList.forEach(item => {
names.push(item.banknames)
})
return names
names.push(item.banknames);
});
return names;
}
},
created() {
this.getBankList()
this.getBankList();
},
mounted() {
// 筛选按钮的点击事件
window.appCallBack = this.appCallBack
this.agentAll()
window.appCallBack = this.appCallBack;
this.agentAll();
},
watch: {
code() {
if (this.userInfo.bankCity) {
this.queryBankJoints()
this.queryBankJoints();
}
}
},
methods: {
changeMarriage() {
debugger
},
isDegreeRequired(degree) {
degree = Number(degree)
if (degree === 11 || degree === 10 || degree <= 4) return 'required'
return ''
degree = Number(degree);
if (degree === 11 || degree === 10 || degree <= 4) return 'required';
return '';
},
setBankNum(bankJoint) {
this.isBankListShow = false
this.bankJoint = bankJoint
this.isBankListShow = false;
this.bankJoint = bankJoint;
for (let name of this.bankJointsList) {
if (name.banknames === bankJoint) {
this.userInfo.bankJoint = name.bankjoint
return
this.userInfo.bankJoint = name.bankjoint;
return;
}
}
},
setBankArea(area) {
const [province, city] = [...area]
this.userInfo.bankAddress = `${province.name}-${city.name}`
this.userInfo.bankProvince = province.code
this.userInfo.bankCity = city.code.slice(0, 4)
this.areaName = this.userInfo.bankAddress
this.areaShow = false
this.queryBankJoints()
const [province, city] = [...area];
this.userInfo.bankAddress = `${province.name}-${city.name}`;
this.userInfo.bankProvince = province.code;
this.userInfo.bankCity = city.code.slice(0, 4);
this.areaName = this.userInfo.bankAddress;
this.areaShow = false;
this.queryBankJoints();
},
async queryBankJoints() {
let param = {
bankcode: this.code,
citycode: this.userInfo.bankCity
}
this.bankJointsList.splice(0)
let res = await getBankJoints(param)
};
this.bankJointsList.splice(0);
let res = await getBankJoints(param);
if (res.result === '0') {
if (!res.content.length) {
param.citycode = this.userInfo.bankProvince.slice(0, 4)
let res = await getBankJoints(param)
param.citycode = this.userInfo.bankProvince.slice(0, 4);
let res = await getBankJoints(param);
if (res.result === '0') {
this.bankJointsList.push(...res.content)
this.bankJointsList.push(...res.content);
} else {
this.$toast(res.resultMessage)
this.$toast(res.resultMessage);
}
} else {
this.bankJointsList.push(...res.content)
this.bankJointsList.push(...res.content);
}
} else {
this.$toast(res.resultMessage)
this.$toast(res.resultMessage);
}
},
// 获取银行卡列表
getBankList() {
let data = {
operateType: 'enter_bank_type'
}
};
getBankList(data).then(res => {
if (res.result == '0') {
this.bankList = res.content
this.bankList = res.content;
} else {
this.$toast(res.resultMessage)
this.$toast(res.resultMessage);
}
})
});
},
getBank(bank) {
//获取银行名称
this.bankName = bank.bankName ? bank.bankName.trim() : ''
this.code = bank.code ? bank.code.trim() : ''
this.$set(this.userInfo, 'bankName', bank.code ? bank.code.trim() : '')
this.bankName = bank.bankName ? bank.bankName.trim() : '';
this.code = bank.code ? bank.code.trim() : '';
this.$set(this.userInfo, 'bankName', bank.code ? bank.code.trim() : '');
},
//获取推荐人信息
agentAll() {
let data = {}
let data = {};
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
});
agentAll(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
this.userInfo = res.content.ebizEnterCustomerDto
this.bankCode = this.userInfo.bankCode
this.ebiz_referrer = res.content.ebizReferrerDto
this.$toast.clear();
this.userInfo = res.content.ebizEnterCustomerDto;
this.bankCode = this.userInfo.bankCode;
this.ebiz_referrer = res.content.ebizReferrerDto;
if (this.userInfo.idType == '1') {
this.effectiveDateTypeAble = idToData(this.userInfo.idNo).age < 45
this.userInfo.birthday = idToData(this.userInfo.idNo).birthday
this.userInfo.age = idToData(this.userInfo.idNo).age
this.userInfo.sex = idToData(this.userInfo.idNo).sex
this.effectiveDateTypeAble = idToData(this.userInfo.idNo).age < 45;
this.userInfo.birthday = idToData(this.userInfo.idNo).birthday;
this.userInfo.age = idToData(this.userInfo.idNo).age;
this.userInfo.sex = idToData(this.userInfo.idNo).sex;
}
if (this.userInfo.bankName) {
// 主行code
this.code = this.userInfo.bankName
this.code = this.userInfo.bankName;
// 主行名称
this.bankName = getBankName(this.userInfo.bankName)
this.bankName = getBankName(this.userInfo.bankName);
}
if (this.userInfo.bankJoint) {
let bank = getChildBank(this.userInfo.bankName, this.userInfo.bankJoint)
let bank = getChildBank(this.userInfo.bankName, this.userInfo.bankJoint);
this.$nextTick(() => {
this.bankJoint = bank.name
})
this.bankJoint = bank.name;
});
}
this.areaName = this.userInfo.bankAddress
this.userInfo.nationality = 'CHN'
this.areaName = this.userInfo.bankAddress;
this.userInfo.nationality = 'CHN';
}
})
});
},
selectClick(index) {
selectComp(this, index, '1')
selectComp(this, index, '1');
},
chooseOccupation() {
chooseOccupation(this, '1')
chooseOccupation(this, '1');
},
//弹框选择
toSelect(pickerType, valueKey) {
toSelect(this, pickerType, valueKey, '1')
toSelect(this, pickerType, valueKey, '1');
},
//确认选择字段
onConfirm(value) {
onConfirm(this, value, '1')
onConfirm(this, value, '1');
},
//证件起始截止日期
onDateConfirm(val, type) {
onDateConfirm(this, val, type)
onDateConfirm(this, val, type);
},
//选择客户
chooseCustomer(data) {
chooseCustomer(this, data, '1')
chooseCustomer(this, data, '1');
},
// 点击下一步
nextStep() {
this.$validator.validate().then(valid => {
if (valid == true) {
if (this.userInfo.bankCode !== this.bankCode) {
return this.$toast('两次输入的银行卡号不一致!')
return this.$toast('两次输入的银行卡号不一致!');
}
if (this.userInfo.idType == '1') {
//身份证
if (!idNoCheck.isIdno(this.userInfo.idNo)) {
return this.$toast('请录入正确的身份证')
return this.$toast('请录入正确的身份证');
}
if (this.userInfo.idNo.length == '18') {
//18位身份证第17位是性别位, 奇男偶女
let sexSign = this.userInfo.idNo.substr(16, 1)
let sexSign = this.userInfo.idNo.substr(16, 1);
if ((parseInt(sexSign) % 2 == 0 && this.userInfo.sex != 1) || (parseInt(sexSign) % 2 != 0 && this.userInfo.sex != 0)) {
return this.$toast('性别录入与身份证不符')
return this.$toast('性别录入与身份证不符');
}
//18位身份证第7-14位是生日位, 年月日
let birthSign = this.userInfo.idNo.substr(6, 8)
let birthSign = this.userInfo.idNo.substr(6, 8);
if (
this.userInfo.birthday.substr(0, 4) != birthSign.substr(0, 4) ||
this.userInfo.birthday.substr(5, 2) != birthSign.substr(4, 2) ||
this.userInfo.birthday.substr(8, 2) != birthSign.substr(6, 2)
) {
return this.$toast('生日录入与身份证不符')
return this.$toast('生日录入与身份证不符');
}
}
}
if (this.userInfo.name != this.userInfo.accountName) {
return this.$toast('姓名与开户名要一致')
return this.$toast('姓名与开户名要一致');
}
const degree = Number(this.userInfo.degree)
const degree = Number(this.userInfo.degree);
// 学历为初中、小学、其他、文盲阻断入司
if (degree == 13 || degree == 12 || degree == 8) {
return this.$toast('您的学历不符合入司要求,不允许入司。')
return this.$toast('您的学历不符合入司要求,不允许入司。');
}
this.bankCodeConfirm()
this.bankCodeConfirm();
} else {
this.$toast(this.errors.all()[0])
this.$toast(this.errors.all()[0]);
}
})
});
},
/**
* @Description: 判断当前的银行卡是否已经存在的方法
* @author:zhangqi
* @Date:2021-07-22
*/
checkBankCodeFunc() {
},
save() {
let data = {
entryType: 'CUSTOMER_BASE',
ebizEnterCustomerDto: { ...this.userInfo, isRevoke: 0 }
}
};
saveOrUpdateInfo(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
localStorage.agentSex = this.userInfo.sex
this.$toast.clear();
localStorage.agentSex = this.userInfo.sex;
this.$jump({
flag: 'h5',
extra: {
@@ -645,50 +670,50 @@ export default {
routerInfo: {
path: `/agentEenter/AgentEnterGuarantor`
}
})
});
} else {
this.$toast(res.resultMessage)
this.$toast(res.resultMessage);
}
})
});
},
//区域选择
sureArea(area, type) {
sureArea(this, area, type)
sureArea(this, area, type);
},
//设为联系地址
setAddress() {
//上面是0下面是1
if (this.homeDefault) {
this.userInfo.addressStatus = 1
this.userInfo.addressStatus = 1;
}
if (this.companyDefault) {
this.userInfo.addressStatus = 0
this.userInfo.addressStatus = 0;
}
},
//获取验证码
getCode() {
getCode(this, '1')
getCode(this, '1');
},
//长期状态改变时
effectiveDataTypeChange(val) {
if (val) {
this.userInfo.dateEnd = '9999-01-01'
this.userInfo.dateEnd = '9999-01-01';
} else {
this.userInfo.dateEnd = ''
this.userInfo.dateEnd = '';
}
effectiveDataTypeChange(this, val)
effectiveDataTypeChange(this, val);
},
//获取身份证扫描信息
getIdentityInfo(data) {
getIdentityInfo(this, data, '1')
getIdentityInfo(this, data, '1');
},
// 银行卡扫描
cardScanning(cardScanningType) {
window.localStorage.setItem('cardScanningType', cardScanningType)
document.body.style.backgroundColor = '#F5F5F5'
let title = ''
window.localStorage.setItem('cardScanningType', cardScanningType);
document.body.style.backgroundColor = '#F5F5F5';
let title = '';
this.isclear = false
;[this.isScan, title] = [true, '银行卡扫描']
;[this.isScan, title] = [true, '银行卡扫描'];
setTimeout(() => {
this.$jump({
flag: 'navigation',
@@ -696,9 +721,9 @@ export default {
title,
hiddenLeft: '1'
}
})
this.closeBtn()
}, 400)
});
this.closeBtn();
}, 400);
},
closeBtn() {
// 筛选按钮的显示
@@ -712,7 +737,7 @@ export default {
}
]
}
})
});
},
appCallBack() {
// 筛选按钮的点击事件
@@ -722,12 +747,12 @@ export default {
title: '入司基本信息',
hiddenRight: '1'
}
})
this.isScan = false
});
this.isScan = false;
},
//获取银行卡扫描信息
getBankCardInfo(data) {
this.userInfo.bankCode = data.name
this.userInfo.bankCode = data.name;
this.$jump({
flag: 'navigation',
@@ -735,41 +760,62 @@ export default {
title: '入司基本信息',
hiddenRight: '1'
}
})
this.isScan = false
});
this.isScan = false;
},
bankCodeConfirm() {
this.save()
// 定义参数格式
let params = { ebizEnterCustomerDto: { bankCode: this.userInfo.bankCode } };
// 调用校验银行卡是否已经存在的接口,验证数据
checkBankCodeUrl(params).then(res => {
if (res.result == '0') {
// 调用点击下一步时,执行的保存方法
this.save();
} else {
Dialog.alert({
title: '提示',
message: '当前银行卡已存在,请更换银行卡!',
confirmButtonColor: '#ee0a24'
});
}
}).catch(err => {
this.$toast(err.resultMessage);
});
}
},
beforeDestroy() {
//清理计时器
window.clearInterval(this.timeId)
this.timeId = null
this.countDown = 60
this.codeDisabled = false
window.clearInterval(this.timeId);
this.timeId = null;
this.countDown = 60;
this.codeDisabled = false;
}
}
};
</script>
<style lang="scss" scoped>
<style lang='scss' scoped>
.insured-info-container {
/deep/.van-checkbox {
/deep/ .van-checkbox {
margin-left: auto;
}
/deep/.van-radio {
/deep/ .van-radio {
margin-left: auto;
}
.referrerW {
/deep/.van-cell__title {
/deep/ .van-cell__title {
width: 120px;
}
}
#card {
/deep/.van-cell__value {
/deep/ .van-cell__value {
border-bottom: 2px solid #e9332e;
}
}
}
/deep/ .van-field__label {
display: flex;
align-items: center;

View File

@@ -1,67 +1,73 @@
<template>
<div class="guarant-info-container pb50">
<div class='guarant-info-container pb50'>
<!-- 基本信息 -->
<van-cell-group>
<RsTop :active="['1', '2']"></RsTop>
<p class="fs15 fwb pl10 pv12">担保人信息</p>
<p class='fs15 fwb pl10 pv12'>担保人信息</p>
<!-- start -->
<van-field
:value="userInfo.relation | idToText('guarantRelationType')"
v-validate="'required'"
readonly
label="关系"
name="关系"
right-icon="arrow"
placeholder="请选择"
label='关系'
name='关系'
right-icon='arrow'
placeholder='请选择'
@click="toSelect('1')"
required
/>
<van-field :value="userInfo.type | idToText('classification')" v-validate="'required'" readonly label="类别" name="类别" disabled />
<van-field label="姓名" type="text" name="姓名" placeholder="请输入" v-validate="'required|name'" clearable v-model="userInfo.name" required />
<select-radio :radios="sexRadio" label="性别" name="性别" v-validate="'required'" required :value.sync="userInfo.sex"></select-radio>
<van-field :value="userInfo.type | idToText('classification')" v-validate="'required'" readonly label='类别'
name='类别' disabled />
<van-field label='姓名' type='text' name='姓名' placeholder='请输入' v-validate="'required|name'" clearable
v-model='userInfo.name' required />
<select-radio :radios='sexRadio' label='性别' name='性别' v-validate="'required'" required
:value.sync='userInfo.sex'></select-radio>
<van-field
label="身份证号码"
type="text"
name="身份证号码"
placeholder="请输入"
label='身份证号码'
type='text'
name='身份证号码'
placeholder='请输入'
clearable
v-model="userInfo.idNo"
v-model='userInfo.idNo'
v-validate="'required'"
required
maxlength="18"
maxlength='18'
/>
<van-field label="单位" type="text" name="单位" placeholder="请输入" clearable v-model="userInfo.company" />
<van-field label="家庭地址" type="text" name="家庭地址" placeholder="请输入" clearable v-model="userInfo.homeAdress" />
<van-field label='单位' type='text' name='单位' placeholder='请输入' clearable v-model='userInfo.company' />
<van-field label='家庭地址' type='text' name='家庭地址' placeholder='请输入' clearable v-model='userInfo.homeAdress' />
<van-field
v-model="userInfo.mobile"
label="手机号码"
name="手机号码"
placeholder="请输入"
v-model='userInfo.mobile'
label='手机号码'
name='手机号码'
placeholder='请输入'
v-validate="'required|mobile'"
maxlength="11"
maxlength='11'
clearable
required
/>
<!-- end -->
<div class="flex justify-content-s bottom-btn bg-white">
<van-button class=" bottom0 left0" square plain type="danger" @click="goBack" size="large">上一步</van-button>
<van-button class=" bottom0 left0" square type="danger" size="large" @click.native="nextStep" v-no-more-click="1000">下一步</van-button>
<div class='flex justify-content-s bottom-btn bg-white'>
<van-button class=' bottom0 left0' square plain type='danger' @click='goBack' size='large'>上一步</van-button>
<van-button class=' bottom0 left0' square type='danger' size='large' @click.native='nextStep'
v-no-more-click='1000'>下一步
</van-button>
</div>
</van-cell-group>
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom">
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
<van-popup v-model='popupShow' position='bottom'>
<van-picker show-toolbar :columns='columns' @confirm='onConfirm' @cancel='popupShow = false' />
</van-popup>
</div>
</template>
<script>
import { Field, CellGroup, Button, col, popup, picker, Dialog, Cell } from 'vant'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import SelectRadio from '@/components/ebiz/SelectRadio'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import RsTop from '@/components/ebiz/agentEenter/RsTop'
import idNoCheck from '@/assets/js/utils/idNoCheck'
import { saveOrUpdateInfo, agentAll } from '@/api/ebiz/agentEenter/agentEenter'
import { Field, CellGroup, Button, col, popup, picker, Dialog, Cell } from 'vant';
import FieldDatePicter from '@/components/ebiz/FieldDatePicter';
import SelectRadio from '@/components/ebiz/SelectRadio';
import DataDictionary from '@/assets/js/utils/data-dictionary';
import RsTop from '@/components/ebiz/agentEenter/RsTop';
import idNoCheck from '@/assets/js/utils/idNoCheck';
import { saveOrUpdateInfo, agentAll, checkGuarantorUrl } from '@/api/ebiz/agentEenter/agentEenter';
export default {
name: 'AgentEenterBasicFamily',
components: {
@@ -102,19 +108,19 @@ export default {
value: '1'
}
]
}
};
},
mounted() {
Dialog.alert({
message: '请如实填写下列各项内容担保人为年满18岁的中国公民。如有不实后果自负。'
}).then(() => {
this.agentAll()
})
document.body.style.backgroundColor = '#fff'
this.agentAll();
});
document.body.style.backgroundColor = '#fff';
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
document.body.style.backgroundColor = '';
next();
},
methods: {
goBack() {
@@ -129,55 +135,55 @@ export default {
index: -1,
path: '/agentEenter/agentEenterBasicInfor'
}
})
});
},
//信息返显
agentAll() {
let data = {}
let data = {};
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
});
agentAll(data).then(res => {
this.$toast.clear()
this.$toast.clear();
if (res.content.ebizGuarantorDto.length != 0) {
this.userInfo = res.content.ebizGuarantorDto
this.userInfo = res.content.ebizGuarantorDto;
//性别返显
if (res.content.ebizGuarantorDto.sex == null) {
this.userInfo.sex = '0'
this.userInfo.sex = '0';
} else {
this.userInfo.sex = String(res.content.ebizGuarantorDto.sex) //性别
this.userInfo.sex = String(res.content.ebizGuarantorDto.sex); //性别
}
//担保人类别
if (res.content.ebizGuarantorDto.type == null) {
this.userInfo.type = '1'
this.userInfo.type = '1';
} else {
this.userInfo.type = String(res.content.ebizGuarantorDto.type) //性别
this.userInfo.type = String(res.content.ebizGuarantorDto.type); //性别
}
}
})
});
},
toSelect(pickerType, index, valueKey) {
//pickerType 1、关系类型 2、类别
;[this.popupShow, this.pickerType] = [true, pickerType]
if (valueKey) this.valueKey = valueKey
this.enterIndex = index
;[this.popupShow, this.pickerType] = [true, pickerType];
if (valueKey) this.valueKey = valueKey;
this.enterIndex = index;
if (pickerType == '1') {
this.columns = DataDictionary.guarantRelationType
this.columns = DataDictionary.guarantRelationType;
}
if (pickerType == '2') {
this.columns = DataDictionary.classification
this.columns = DataDictionary.classification;
}
},
onConfirm(value) {
this.popupShow = false
this.popupShow = false;
if (this.pickerType == '1') {
this.userInfo.relation = value.id
this.userInfo.relation = value.id;
}
if (this.pickerType == '2') {
this.userInfo.type = value.id
this.userInfo.type = value.id;
}
},
// 下一步
@@ -187,35 +193,60 @@ export default {
if (true === valid) {
//身份证
if (!idNoCheck.isIdno(this.userInfo.idNo)) {
return this.$toast('您填写的证件号码有误')
return this.$toast('您填写的证件号码有误');
}
if (this.userInfo.idNo.length == '18') {
//18位身份证第17位是性别位, 奇男偶女
let sexSign = this.userInfo.idNo.substr(16, 1)
let sexSign = this.userInfo.idNo.substr(16, 1);
if ((parseInt(sexSign) % 2 == 0 && this.userInfo.sex != 1) || (parseInt(sexSign) % 2 != 0 && this.userInfo.sex != 0)) {
return this.$toast('性别录入与身份证不符')
return this.$toast('性别录入与身份证不符');
}
}
this.save()
// 调用校验是否已经是担保人的方法
this.checkGuarantorFunc();
} else {
this.$toast(this.$validator.errors.all()[0])
this.$toast(this.$validator.errors.all()[0]);
}
})
});
},
/**
* @Description: 校验是否已经是担保人的方法
* @author:zhangqi
* @Date:2021-07-21
*/
checkGuarantorFunc() {
let params = { ebizGuarantorDto: { idNo: this.userInfo.idNo } };
checkGuarantorUrl(params).then(res => {
if (res.result == '0') {
// 调用点击下一步时,执行的保存方法
this.save();
} else {
Dialog.alert({
title: '提示',
message: '此人已是其他代理人的担保人,请更换担保人!',
confirmButtonColor: '#ee0a24'
});
}
}).catch(err => {
this.$toast(err.resultMessage);
});
},
save() {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
});
let params = {
entryType: 'CUSTOMER_GUARANTOR',
ebizGuarantorDto: {}
}
params.ebizGuarantorDto = this.userInfo
};
params.ebizGuarantorDto = this.userInfo;
saveOrUpdateInfo(params).then(res => {
this.$toast.clear()
this.$toast.clear();
if (res.result == '0') {
this.$jump({
flag: 'h5',
@@ -225,28 +256,31 @@ export default {
routerInfo: {
path: `/agentEenter/agentEenterBasicFamily`
}
})
});
} else {
this.$toast(res.resultMessage)
this.$toast(res.resultMessage);
}
})
});
}
}
}
};
</script>
<style lang="scss" scoped>
<style lang='scss' scoped>
.guarant-info-container {
/deep/ .van-cell__value {
text-align: left;
}
/deep/ .van-cell__title {
width: 20%;
}
.add-btn {
width: 80%;
margin: 20px auto;
border: 1px dashed #999;
}
.bg-gray {
background: #f1f2f4 !important;
}