[IMP]【自助入司流程优化】协议签署,增加筛选已签署协议方法,签署协议时跳过已签署文件

This commit is contained in:
yuweiqi
2020-05-11 13:19:08 +08:00
parent 0c4b01687b
commit 2930de9f0b
3 changed files with 414 additions and 297 deletions

View File

@@ -12,7 +12,9 @@
</van-radio-group>
<div class="pl30 pb15">
本人签字
<van-button type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{ appntSign.signState == '0' ? '签名' : '已签名' }}</van-button>
<van-button type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{
appntSign.signState == '0' ? '签名' : '已签名'
}}</van-button>
</div>
<van-button type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button>
</div>
@@ -22,6 +24,7 @@
<script>
import { Field, Icon, Button, Radio, CheckboxGroup, NoticeBar, Dialog, RadioGroup } from 'vant'
import { agreementQuery, signAgreement } from '@/api/ebiz/agentEenter/agentEenter.js'
import { getAgreementNextPagePath } from './js/methods'
import config from '@/config'
export default {
data() {
@@ -44,6 +47,10 @@ export default {
isSign: false,
//推荐人信息
agentInfo: {},
//协议list
signList: [],
//当前页面协议签署后下一页路由
nextPagePath: '',
// 推荐人签名信息
appntSign: {
signState: '0'
@@ -86,6 +93,8 @@ export default {
agreementQuery(data).then(res => {
that.$toast.clear()
if (res.result == '0') {
that.signList = res.content.ebizAgreementDtoList
getAgreementNextPagePath(that)
res.content.ebizAgreementDtoList.map(item => {
console.log(item)
if (item.type == '7') {
@@ -175,11 +184,11 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/agentEenter/letterOfCommitment`,
url: location.origin + `/#/agentEenter/${that.nextPagePath}`,
forbidSwipeBack: '1'
},
routerInfo: {
path: `/agentEenter/letterOfCommitment`
path: `/agentEenter/${that.nextPagePath}`
}
})
} else {

View File

@@ -13,13 +13,15 @@
需签署
<ul>
<li class="flex" v-for="(sign, index) in signList" :key="index">
<div class="w260 blue" >{{ sign.name }}</div>
<div class="w260 blue">{{ sign.name }}</div>
<van-icon v-if="sign.signState === '1'" color="green" name="checked" />
</li>
</ul>
点击开始按钮进行相关操作
</div>
<div class="text-center mt20"><van-button @click="faceAuth" v-no-more-click="1000" :disabled="isSubmit" type="danger" size="normal" style="width:30%">开始</van-button></div>
<div class="text-center mt20 mb60">
<van-button @click="faceAuth" v-no-more-click="1000" :disabled="isSubmit" type="danger" size="normal" style="width:30%">开始</van-button>
</div>
<van-button v-if="isSubmit" class="fixed bottom0" type="danger" v-no-more-click="1000" @click="clickSubmit" size="large">提交</van-button>
</div>
</template>
@@ -68,7 +70,7 @@ export default {
//获取签署协议人信息
agreementQuery() {
let data = {
// userModel: { mobile: 13000000000 }, //线上去掉
// userModel: { mobile: 13000000000 } //线上去掉
}
this.$toast.loading({
duration: 0, // 持续展示 toast
@@ -102,6 +104,7 @@ export default {
})
},
faceAuth() {
/*
let that = this
localStorage.idNo = this.agentInfo.idNo
localStorage.idName = this.agentInfo.name
@@ -125,6 +128,8 @@ export default {
} else {
that.goUrl()
}
*/
this.goUrl()
},
//自定义key值排序用
addKey(item) {

View File

@@ -3,40 +3,37 @@
import DataDictionary from '@/assets/js/utils/data-dictionary'
import utilsAge from '@/assets/js/utils/age'
import dateUtils from '@/assets/js/utils/date-utils'
import {
saveOrUpdateOrderInfo,
getAuthCode,
getOrderDetail
} from '@/api/ebiz/sale/sale'
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail } from '@/api/ebiz/sale/sale'
import getAreaName from '@/assets/js/utils/get-area-name'
// import idNoCheck from '@/assets/js/utils/idNoCheck'
import {
idToData
} from './verification'
let relationToInsured = [{
id: 2,
text: '配偶'
}, {
id: 3,
text: '父母'
}, {
id: 4,
text: '子女'
}, {
id: 5,
text: '其他'
}]
import { idToData } from './verification'
let relationToInsured = [
{
id: 2,
text: '配偶'
},
{
id: 3,
text: '父母'
},
{
id: 4,
text: '子女'
},
{
id: 5,
text: '其他'
}
]
//点击弹出组件
export function selectComp(that, index, type = '') {
console.log(index)
that.currentPopupIndex = index
let title = ''
if (index == 1) {
;
[that.customerShowPicker, title] = [true, '客户列表']
;[that.customerShowPicker, title] = [true, '客户列表']
} else if (index == 2) {
;
[that.occupationShowPicker, title] = [true, '职业类别']
;[that.occupationShowPicker, title] = [true, '职业类别']
} else if (index == 3) {
if (type == '1') {
//投保人
@@ -44,11 +41,11 @@ export function selectComp(that, index, type = '') {
} else if (type == '2') {
//被保险人
localStorage.scanFromInsured = 'false'
};
[that.isScan, title] = [true, '身份证扫描']
}
;[that.isScan, title] = [true, '身份证扫描']
} else if (index == 4) {
localStorage.scanFromInsured = 0;
[that.bankisScan, title] = [true, '银行卡扫描']
localStorage.scanFromInsured = 0
;[that.bankisScan, title] = [true, '银行卡扫描']
}
setTimeout(() => {
@@ -68,13 +65,15 @@ function closeBtn(that) {
that.$jump({
flag: 'webview_right_button',
extra: {
btns: [{
img: that.$assetsUrl + 'images/del-close.png',
route: {
flag: '',
extra: {}
btns: [
{
img: that.$assetsUrl + 'images/del-close.png',
route: {
flag: '',
extra: {}
}
}
}]
]
}
})
}
@@ -86,7 +85,7 @@ function closeBtn(that) {
* @param {String} type 1 投保人; 2 被保险人; 3 受益人
*/
export function appCallBack(that, type) {
return function () {
return function() {
let title
switch (type) {
case '1':
@@ -243,145 +242,171 @@ export function onConfirm(that, value, type) {
case '1':
that.userInfo.jobStatus = value.id
break
case '2': {
//如果关系是本人
if (value.id == 1) {
//获取订单详情
getOrderDetail({
orderNo: localStorage.orderNo
}).then(res => {
if (res.result == 0) {
that.isAppnt = true
//获取投保人信息
let insuredInfo = res.orderDTO.appntDTO
//清空验证码
insuredInfo.authCode = ''
for (let key in that.userInfo) {
that.userInfo[key] = insuredInfo[key]
}
that.userInfo.birthday = insuredInfo.birthday
//户籍
that.sureArea([{
code: insuredInfo.householdProvince
}, {
code: insuredInfo.householdCity
}], '3')
//单位地址
that.sureArea([{
code: insuredInfo.companyProvince
}, {
code: insuredInfo.companyCity
}, {
code: insuredInfo.companyArea
}], '1')
//家庭地址
that.sureArea([{
code: insuredInfo.homeProvince
}, {
code: insuredInfo.homeCity
}, {
code: insuredInfo.homeArea
}], '2')
//是否长期
if (insuredInfo.effectiveDateType == 'false') {
that.userInfo.effectiveDateType = false
case '2':
{
//如果关系是本人
if (value.id == 1) {
//获取订单详情
getOrderDetail({
orderNo: localStorage.orderNo
}).then(res => {
if (res.result == 0) {
that.isAppnt = true
//获取投保人信息
let insuredInfo = res.orderDTO.appntDTO
//清空验证码
insuredInfo.authCode = ''
for (let key in that.userInfo) {
that.userInfo[key] = insuredInfo[key]
}
that.userInfo.birthday = insuredInfo.birthday
//户籍
that.sureArea(
[
{
code: insuredInfo.householdProvince
},
{
code: insuredInfo.householdCity
}
],
'3'
)
//单位地址
that.sureArea(
[
{
code: insuredInfo.companyProvince
},
{
code: insuredInfo.companyCity
},
{
code: insuredInfo.companyArea
}
],
'1'
)
//家庭地址
that.sureArea(
[
{
code: insuredInfo.homeProvince
},
{
code: insuredInfo.homeCity
},
{
code: insuredInfo.homeArea
}
],
'2'
)
//是否长期
if (insuredInfo.effectiveDateType == 'false') {
that.userInfo.effectiveDateType = false
} else {
that.userInfo.effectiveDateType = true
that.userInfo.certiexpiredate = ''
that.$refs.certiexpiredate.date = ''
}
//数据不是从用户列表拉取
that.fromCustomer = false
that.userInfo.relationToAppnt = value.id
//长期判断
if (that.userInfo.idType == '1') {
// 计算年龄
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// 长期按钮是否禁用
that.effectiveDateTypeAble = age <= 45
}
} else {
that.userInfo.effectiveDateType = true
that.userInfo.certiexpiredate = ''
that.$refs.certiexpiredate.date = ''
that.$toast(res.resultMessage)
}
//数据不是从用户列表拉取
that.fromCustomer = false
that.userInfo.relationToAppnt = value.id
//长期判断
if (that.userInfo.idType == '1') {
// 计算年龄
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// 长期按钮是否禁用
that.effectiveDateTypeAble = age <= 45
})
} else {
that.isAppnt = false
//数据是否从用户列表拉取
if (that.fromCustomer) {
return (that.userInfo.relationToAppnt = value.id)
}
//如果关系不是本人(选了本人之后修改), 清空 userInfo 信息
for (var key in that.userInfo) {
if (!['rsnationType', 'sex', 'idType', 'effectiveDateType', 'medical'].includes(key)) {
that.userInfo[key] = ''
}
} else {
that.$toast(res.resultMessage)
}
})
} else {
that.isAppnt = false
//数据是否从用户列表拉取
if (that.fromCustomer) {
return (that.userInfo.relationToAppnt = value.id)
that.userInfo.effectiveDateType = false
that.effectiveDateTypeAble = false
that.areaName = that.homeName = that.census = ''
that.userInfo.relationToAppnt = value.id
}
//如果关系不是本人(选了本人之后修改), 清空 userInfo 信息
for (var key in that.userInfo) {
if (!['rsnationType', 'sex', 'idType', 'effectiveDateType', 'medical'].includes(key)) {
that.userInfo[key] = ''
}
}
that.userInfo.effectiveDateType = false
that.effectiveDateTypeAble = false
that.areaName = that.homeName = that.census = ''
that.userInfo.relationToAppnt = value.id
}
}
break
case '3': {
//如果受益人是被保险人本人
if (value.id == 1) {
//获取投保人数据
getOrderDetail({
orderNo: localStorage.orderNo
}).then(res => {
if (res.result == 0) {
that.isInsured = true
//获取被保险人信息
let insuredInfo = res.orderDTO.insuredDTOs[0]
for (let key in that.userInfo) {
that.userInfo[key] = insuredInfo[key]
case '3':
{
//如果受益人是被保险人本人
if (value.id == 1) {
//获取投保人数据
getOrderDetail({
orderNo: localStorage.orderNo
}).then(res => {
if (res.result == 0) {
that.isInsured = true
//获取被保险人信息
let insuredInfo = res.orderDTO.insuredDTOs[0]
for (let key in that.userInfo) {
that.userInfo[key] = insuredInfo[key]
}
setTimeout(() => {
that.userInfo.city = insuredInfo.homeCity //家庭市
that.userInfo.area = insuredInfo.homeArea //家庭区
that.userInfo.province = insuredInfo.homeProvince //家庭省
that.areaName = getAreaName([
{
code: insuredInfo.homeProvince
},
{
code: insuredInfo.homeCity
},
{
code: insuredInfo.homeArea
}
]) //家庭地址
that.userInfo.village = insuredInfo.homeAddress //家庭详细地址
}, 0)
//受益人类型
that.userInfo.bnfType = '0'
//是否长期
that.userInfo.effectiveDateType = insuredInfo.effectiveDateType == 'false' ? false : true
//受益顺序
that.userInfo.bnfOrder = '1'
//长期判断
if (that.userInfo.idType == '1') {
// 计算年龄
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// 长期按钮是否禁用
that.effectiveDateTypeAble = age <= 45
}
} else {
that.$toast(res.resultMessage)
}
setTimeout(() => {
that.userInfo.city = insuredInfo.homeCity //家庭市
that.userInfo.area = insuredInfo.homeArea //家庭区
that.userInfo.province = insuredInfo.homeProvince //家庭省
that.areaName = getAreaName([{
code: insuredInfo.homeProvince
}, {
code: insuredInfo.homeCity
}, {
code: insuredInfo.homeArea
}]) //家庭地址
that.userInfo.village = insuredInfo.homeAddress //家庭详细地址
}, 0)
//受益人类型
that.userInfo.bnfType = '0'
//是否长期
that.userInfo.effectiveDateType = insuredInfo.effectiveDateType == 'false' ? false : true
//受益顺序
that.userInfo.bnfOrder = '1'
//长期判断
if (that.userInfo.idType == '1') {
// 计算年龄
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// 长期按钮是否禁用
that.effectiveDateTypeAble = age <= 45
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
})
} else {
that.isInsured = false
for (var key in that.userInfo) {
if (!['rsnationType', 'sex', 'idType', 'bnfOrder', 'bnfType'].includes(key)) {
that.userInfo[key] = ''
}
} else {
that.$toast(res.resultMessage)
};
[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
})
} else {
that.isInsured = false
for (var key in that.userInfo) {
if (!['rsnationType', 'sex', 'idType', 'bnfOrder', 'bnfType'].includes(key)) {
that.userInfo[key] = ''
}
that.areaName = ''
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
}
that.areaName = '';
[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
}
}
break
}
} else if (that.pickerType == '8') {
@@ -411,91 +436,93 @@ export function onConfirm(that, value, type) {
export function onDateConfirm(that, val, type) {
console.log(type)
switch (type) {
case '0': {
//证件起始日期
//如果录入日期早于出生日期或晚于当前日期
if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(that.userInfo.birthday)) {
that.userInfo.certificateValidate = ''
that.$refs.certificateValidate.date = ''
return that.$toast('证件起始日期填写错误')
}
case '0':
{
//证件起始日期
//如果录入日期早于出生日期或晚于当前日期
if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(that.userInfo.birthday)) {
that.userInfo.certificateValidate = ''
that.$refs.certificateValidate.date = ''
return that.$toast('证件起始日期填写错误')
}
// 计算年龄
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// 长期按钮是否禁用
that.effectiveDateTypeAble = age <= 45
}
break
case '1': {
console.log('证件截止日期')
//证件截止日期
//如果已经勾选了长期
if (that.userInfo.effectiveDateType) {
//清空数据并返回
that.userInfo.certiexpiredate = ''
that.$refs.certiexpiredate.date = ''
return
}
//如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) {
that.userInfo.certiexpiredate = ''
that.$refs.certiexpiredate.date = ''
return that.$toast('您的证件已过期')
}
//不同证件类型的判断
// if (that.userInfo.idType) {
// //获取年龄
// let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// console.log(age)
// //年龄在16-25周岁之间
// if (age >= 16 && age <= 25) {
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 10) {
// that.userInfo.certiexpiredate = ''
// that.$refs.certiexpiredate.date = ''
// return that.$toast('16周岁~25周岁的证件有效期为10年')
// }
// //年龄在26-45周岁之间
// } else if (age >= 26 && age <= 45) {
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 20) {
// that.userInfo.certiexpiredate = ''
// that.$refs.certiexpiredate.date = ''
// return that.$toast('26周岁~45周岁的证件有效期为20年')
// }
// //此外的年龄段不支持
// } else {
// that.userInfo.certiexpiredate = ''
// that.$refs.certiexpiredate.date = ''
// return that.$toast('身份证不支持此年龄段')
// }
// }
}
break
case '2': {
//出生日期
//如果录入日期晚于当前日期
if (Date.parse(val) > Date.parse(new Date())) {
that.userInfo.birthday = ''
that.$refs.birthday.date = ''
return that.$toast('出生日期不晚于当日')
}
//长期判断
if (that.userInfo.idType == '1') {
// 计算年龄
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// 长期按钮是否禁用
that.effectiveDateTypeAble = age <= 45
}
//出生证有效期
if (that.userInfo.idType == '3' && that.userInfo.idNo.length != 15 && that.userInfo.idNo.length != 18) {
let exipreDate = Date.parse(val) + Date.parse('1972-12-31')
that.userInfo.certificateValidate = val
that.userInfo.certiexpiredate = that.timeStampFormat(exipreDate)
that.idLimit = true
break
case '1':
{
console.log('证件截止日期')
//证件截止日期
//如果已经勾选了长期
if (that.userInfo.effectiveDateType) {
//清空数据并返回
that.userInfo.certiexpiredate = ''
that.$refs.certiexpiredate.date = ''
return
}
//如果录入日期早于当前日期
if (Date.parse(val) < Date.parse(new Date())) {
that.userInfo.certiexpiredate = ''
that.$refs.certiexpiredate.date = ''
return that.$toast('您的证件已过期')
}
//不同证件类型的判断
// if (that.userInfo.idType) {
// //获取年龄
// let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// console.log(age)
// //年龄在16-25周岁之间
// if (age >= 16 && age <= 25) {
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 10) {
// that.userInfo.certiexpiredate = ''
// that.$refs.certiexpiredate.date = ''
// return that.$toast('16周岁~25周岁的证件有效期为10年')
// }
// //年龄在26-45周岁之间
// } else if (age >= 26 && age <= 45) {
// if (new Date(val).getFullYear() - new Date(that.userInfo.certificateValidate).getFullYear() != 20) {
// that.userInfo.certiexpiredate = ''
// that.$refs.certiexpiredate.date = ''
// return that.$toast('26周岁~45周岁的证件有效期为20年')
// }
// //此外的年龄段不支持
// } else {
// that.userInfo.certiexpiredate = ''
// that.$refs.certiexpiredate.date = ''
// return that.$toast('身份证不支持此年龄段')
// }
// }
}
// 由日期算周岁
let age = dateUtils.jsGetAge(val)
that.userInfo.age = age
break
case '2':
{
//出生日期
//如果录入日期晚于当前日期
if (Date.parse(val) > Date.parse(new Date())) {
that.userInfo.birthday = ''
that.$refs.birthday.date = ''
return that.$toast('出生日期不晚于当日')
}
//长期判断
if (that.userInfo.idType == '1') {
let age = utilsAge.getAge(that.userInfo.birthday, new Date())
that.effectiveDateTypeAble = age <= 45
}
//出生证有效期
if (that.userInfo.idType == '3' && that.userInfo.idNo.length != 15 && that.userInfo.idNo.length != 18) {
let exipreDate = Date.parse(val) + Date.parse('1972-12-31')
that.userInfo.certificateValidate = val
that.userInfo.certiexpiredate = that.timeStampFormat(exipreDate)
that.idLimit = true
}
}
// 由日期算周岁
let age = dateUtils.jsGetAge(val)
that.userInfo.age = age
}
break
}
}
@@ -545,13 +572,17 @@ export function chooseCustomer(that, data, type) {
that.userInfo.mobile = data.customerPhone //移动电话
that.userInfo.email = data.email //电子邮箱
if (data.companyProvince.length) {
that.areaName = getAreaName([{
code: data.companyProvince
}, {
code: data.companyCity
}, {
code: data.companyArea
}]) //单位地址
that.areaName = getAreaName([
{
code: data.companyProvince
},
{
code: data.companyCity
},
{
code: data.companyArea
}
]) //单位地址
}
if (type != '3') {
@@ -581,20 +612,27 @@ export function chooseCustomer(that, data, type) {
that.userInfo.householdProvince = data.province //户籍省
that.userInfo.householdCity = data.city //户籍市
if (data.province.length) {
that.census = getAreaName([{
code: data.province
}, {
code: data.city
}]) //户籍
that.census = getAreaName([
{
code: data.province
},
{
code: data.city
}
]) //户籍
}
if (data.homeProvince.length) {
that.homeName = getAreaName([{
code: data.homeProvince
}, {
code: data.homeCity
}, {
code: data.homeArea
}]) //家庭地址
that.homeName = getAreaName([
{
code: data.homeProvince
},
{
code: data.homeCity
},
{
code: data.homeArea
}
]) //家庭地址
}
} else {
that.userInfo.province = data.homeProvince //家庭省
@@ -656,28 +694,30 @@ export function infoUpdate(that, type) {
if (chooseProductCodes && chooseProductCodes.length) {
let flag
switch (type) {
case '1': {
//取出local中的投被保险人信息
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
//如果 性别, 出生日期, 有无社保, 职业 发生变化
if (that.userInfo.sex != saleInsuredInfo.sex || that.userInfo.birthday != saleInsuredInfo.birthday) {
flag = true
case '1':
{
//取出local中的投被保险人信息
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
//如果 性别, 出生日期, 有无社保, 职业 发生变化
if (that.userInfo.sex != saleInsuredInfo.sex || that.userInfo.birthday != saleInsuredInfo.birthday) {
flag = true
}
}
}
break
case '2': {
//取出local中的被保险人信息
let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
//如果 性别, 出生日期, 有无社保, 职业 发生变化
if (
that.userInfo.sex != saleInsuredPersonInfo.sex ||
that.userInfo.birthday != saleInsuredPersonInfo.birthday ||
that.userInfo.medical != saleInsuredPersonInfo.medical ||
that.userInfo.occupationCode != saleInsuredPersonInfo.occupationCode
) {
flag = true
case '2':
{
//取出local中的被保险人信息
let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
//如果 性别, 出生日期, 有无社保, 职业 发生变化
if (
that.userInfo.sex != saleInsuredPersonInfo.sex ||
that.userInfo.birthday != saleInsuredPersonInfo.birthday ||
that.userInfo.medical != saleInsuredPersonInfo.medical ||
that.userInfo.occupationCode != saleInsuredPersonInfo.occupationCode
) {
flag = true
}
}
}
break
}
@@ -789,22 +829,20 @@ export function sureArea(that, area, type, flag = false) {
case '1': //单位地址
that.areaName = getAreaName(area)
if (flag) {
;
[that.userInfo.province, that.userInfo.city, that.userInfo.area] = [area[0].code, area[1].code, area[2].code]
;[that.userInfo.province, that.userInfo.city, that.userInfo.area] = [area[0].code, area[1].code, area[2].code]
} else {
;
[that.userInfo.companyProvince, that.userInfo.companyCity, that.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
;[that.userInfo.companyProvince, that.userInfo.companyCity, that.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
}
that.areaShow = false
break
case '2': //家庭地址
that.homeName = getAreaName(area);
[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
that.homeName = getAreaName(area)
;[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
that.homeShow = false
break
case '3': //户籍
that.census = getAreaName(area);
[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code]
that.census = getAreaName(area)
;[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code]
that.censusShow = false
break
}
@@ -853,8 +891,7 @@ export function getRelatedData(that, val) {
}
//如果证件校验不通过,恢复默认值
if (idToData(val).text) {
;
[that.userInfo.idNo, that.userInfo.sex, that.userInfo.birthday, that.effectiveDateTypeAble] = ['', '0', '', false]
;[that.userInfo.idNo, that.userInfo.sex, that.userInfo.birthday, that.effectiveDateTypeAble] = ['', '0', '', false]
return that.$toast(idToData(val).text)
}
that.userInfo.effectiveDateType = false
@@ -925,4 +962,70 @@ export function effectiveDataTypeChange(that, val) {
} else {
that.certiexpiredateRequired = true
}
}
}
//筛选未签署协议,获取签署当前页面协议后,跳转路径
/**
* @param {*} that 上下文
* @param {*} signList 协议list
*/
export function getAgreementNextPagePath(that, signList) {
let unsignedList = [],
nextPagePath = ''
that.signList.map(item => {
addKey(item)
filtUnsigned(item)
})
that.signList.sort(function(a, b) {
return a.key - b.key
})
if (unsignedList.length > 1) {
nextPagePath = unsignedList[1].path
} else {
nextPagePath = 'signContract'
}
//自定义key值排序用
function addKey(item) {
//13保险代理申请人健康声明 10承诺书 16广西保险销售从业人员信息公开承诺书
//15销售从业人员拒绝非法集资、非法放贷、金融诈骗承诺书 12担保书 11代理人基本福利保障知晓函 14个险销售人员代理合同
switch (item.type) {
case '13':
item.key = 1
item.path = 'healthNotice'
break
case '10':
item.key = 2
item.path = 'LetterOfCommitment'
break
case '16':
item.key = 3
item.path = 'MessageLetterOfCommitment'
break
case '15':
item.key = 4
item.path = 'IllegalLetterOfCommitment'
break
case '12':
item.key = 5
item.path = 'Guarantee'
break
case '11':
item.key = 6
item.path = 'LetterOfKnow'
break
case '14':
item.key = 7
item.path = 'paction'
break
}
}
//筛选未签名协议
function filtUnsigned(item) {
//signState 0-未签名 1-已签名
if (item.signState == '0') {
unsignedList.push(item)
}
}
that.nextPagePath = nextPagePath
}