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

View File

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

View File

@@ -3,40 +3,37 @@
import DataDictionary from '@/assets/js/utils/data-dictionary' import DataDictionary from '@/assets/js/utils/data-dictionary'
import utilsAge from '@/assets/js/utils/age' import utilsAge from '@/assets/js/utils/age'
import dateUtils from '@/assets/js/utils/date-utils' import dateUtils from '@/assets/js/utils/date-utils'
import { import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail } from '@/api/ebiz/sale/sale'
saveOrUpdateOrderInfo,
getAuthCode,
getOrderDetail
} from '@/api/ebiz/sale/sale'
import getAreaName from '@/assets/js/utils/get-area-name' import getAreaName from '@/assets/js/utils/get-area-name'
// import idNoCheck from '@/assets/js/utils/idNoCheck' // import idNoCheck from '@/assets/js/utils/idNoCheck'
import { import { idToData } from './verification'
idToData let relationToInsured = [
} from './verification' {
let relationToInsured = [{ id: 2,
id: 2, text: '配偶'
text: '配偶' },
}, { {
id: 3, id: 3,
text: '父母' text: '父母'
}, { },
id: 4, {
text: '子女' id: 4,
}, { text: '子女'
id: 5, },
text: '其他' {
}] id: 5,
text: '其他'
}
]
//点击弹出组件 //点击弹出组件
export function selectComp(that, index, type = '') { export function selectComp(that, index, type = '') {
console.log(index) console.log(index)
that.currentPopupIndex = index that.currentPopupIndex = index
let title = '' let title = ''
if (index == 1) { if (index == 1) {
; ;[that.customerShowPicker, title] = [true, '客户列表']
[that.customerShowPicker, title] = [true, '客户列表']
} else if (index == 2) { } else if (index == 2) {
; ;[that.occupationShowPicker, title] = [true, '职业类别']
[that.occupationShowPicker, title] = [true, '职业类别']
} else if (index == 3) { } else if (index == 3) {
if (type == '1') { if (type == '1') {
//投保人 //投保人
@@ -44,11 +41,11 @@ export function selectComp(that, index, type = '') {
} else if (type == '2') { } else if (type == '2') {
//被保险人 //被保险人
localStorage.scanFromInsured = 'false' localStorage.scanFromInsured = 'false'
}; }
[that.isScan, title] = [true, '身份证扫描'] ;[that.isScan, title] = [true, '身份证扫描']
} else if (index == 4) { } else if (index == 4) {
localStorage.scanFromInsured = 0; localStorage.scanFromInsured = 0
[that.bankisScan, title] = [true, '银行卡扫描'] ;[that.bankisScan, title] = [true, '银行卡扫描']
} }
setTimeout(() => { setTimeout(() => {
@@ -68,13 +65,15 @@ function closeBtn(that) {
that.$jump({ that.$jump({
flag: 'webview_right_button', flag: 'webview_right_button',
extra: { extra: {
btns: [{ btns: [
img: that.$assetsUrl + 'images/del-close.png', {
route: { img: that.$assetsUrl + 'images/del-close.png',
flag: '', route: {
extra: {} flag: '',
extra: {}
}
} }
}] ]
} }
}) })
} }
@@ -86,7 +85,7 @@ function closeBtn(that) {
* @param {String} type 1 投保人; 2 被保险人; 3 受益人 * @param {String} type 1 投保人; 2 被保险人; 3 受益人
*/ */
export function appCallBack(that, type) { export function appCallBack(that, type) {
return function () { return function() {
let title let title
switch (type) { switch (type) {
case '1': case '1':
@@ -243,145 +242,171 @@ export function onConfirm(that, value, type) {
case '1': case '1':
that.userInfo.jobStatus = value.id that.userInfo.jobStatus = value.id
break break
case '2': { case '2':
//如果关系是本人 {
if (value.id == 1) { //如果关系是本人
//获取订单详情 if (value.id == 1) {
getOrderDetail({ //获取订单详情
orderNo: localStorage.orderNo getOrderDetail({
}).then(res => { orderNo: localStorage.orderNo
if (res.result == 0) { }).then(res => {
that.isAppnt = true if (res.result == 0) {
//获取投保人信息 that.isAppnt = true
let insuredInfo = res.orderDTO.appntDTO //获取投保人信息
//清空验证码 let insuredInfo = res.orderDTO.appntDTO
insuredInfo.authCode = '' //清空验证码
for (let key in that.userInfo) { insuredInfo.authCode = ''
that.userInfo[key] = insuredInfo[key] for (let key in that.userInfo) {
} that.userInfo[key] = insuredInfo[key]
that.userInfo.birthday = insuredInfo.birthday }
//户籍 that.userInfo.birthday = insuredInfo.birthday
that.sureArea([{ //户籍
code: insuredInfo.householdProvince that.sureArea(
}, { [
code: insuredInfo.householdCity {
}], '3') code: insuredInfo.householdProvince
//单位地址 },
that.sureArea([{ {
code: insuredInfo.companyProvince code: insuredInfo.householdCity
}, { }
code: insuredInfo.companyCity ],
}, { '3'
code: insuredInfo.companyArea )
}], '1') //单位地址
//家庭地址 that.sureArea(
that.sureArea([{ [
code: insuredInfo.homeProvince {
}, { code: insuredInfo.companyProvince
code: insuredInfo.homeCity },
}, { {
code: insuredInfo.homeArea code: insuredInfo.companyCity
}], '2') },
//是否长期 {
if (insuredInfo.effectiveDateType == 'false') { code: insuredInfo.companyArea
that.userInfo.effectiveDateType = false }
],
'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 { } else {
that.userInfo.effectiveDateType = true that.$toast(res.resultMessage)
that.userInfo.certiexpiredate = ''
that.$refs.certiexpiredate.date = ''
} }
//数据不是从用户列表拉取 })
that.fromCustomer = false } else {
that.userInfo.relationToAppnt = value.id that.isAppnt = false
//长期判断 //数据是否从用户列表拉取
if (that.userInfo.idType == '1') { if (that.fromCustomer) {
// 计算年龄 return (that.userInfo.relationToAppnt = value.id)
let age = utilsAge.getAge(that.userInfo.birthday, new Date()) }
// 长期按钮是否禁用 //如果关系不是本人(选了本人之后修改), 清空 userInfo 信息
that.effectiveDateTypeAble = age <= 45 for (var key in that.userInfo) {
if (!['rsnationType', 'sex', 'idType', 'effectiveDateType', 'medical'].includes(key)) {
that.userInfo[key] = ''
} }
} else {
that.$toast(res.resultMessage)
} }
}) that.userInfo.effectiveDateType = false
} else { that.effectiveDateTypeAble = false
that.isAppnt = false that.areaName = that.homeName = that.census = ''
//数据是否从用户列表拉取 that.userInfo.relationToAppnt = value.id
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] = ''
}
}
that.userInfo.effectiveDateType = false
that.effectiveDateTypeAble = false
that.areaName = that.homeName = that.census = ''
that.userInfo.relationToAppnt = value.id
} }
}
break break
case '3': { case '3':
//如果受益人是被保险人本人 {
if (value.id == 1) { //如果受益人是被保险人本人
//获取投保人数据 if (value.id == 1) {
getOrderDetail({ //获取投保人数据
orderNo: localStorage.orderNo getOrderDetail({
}).then(res => { orderNo: localStorage.orderNo
if (res.result == 0) { }).then(res => {
that.isInsured = true if (res.result == 0) {
//获取被保险人信息 that.isInsured = true
let insuredInfo = res.orderDTO.insuredDTOs[0] //获取被保险人信息
for (let key in that.userInfo) { let insuredInfo = res.orderDTO.insuredDTOs[0]
that.userInfo[key] = insuredInfo[key] 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)
} }
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
setTimeout(() => { })
that.userInfo.city = insuredInfo.homeCity //家庭市 } else {
that.userInfo.area = insuredInfo.homeArea //家庭区 that.isInsured = false
that.userInfo.province = insuredInfo.homeProvince //家庭省 for (var key in that.userInfo) {
that.areaName = getAreaName([{ if (!['rsnationType', 'sex', 'idType', 'bnfOrder', 'bnfType'].includes(key)) {
code: insuredInfo.homeProvince that.userInfo[key] = ''
}, {
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)
};
[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 break
} }
} else if (that.pickerType == '8') { } else if (that.pickerType == '8') {
@@ -411,91 +436,93 @@ export function onConfirm(that, value, type) {
export function onDateConfirm(that, val, type) { export function onDateConfirm(that, val, type) {
console.log(type) console.log(type)
switch (type) { switch (type) {
case '0': { case '0':
//证件起始日期 {
//如果录入日期早于出生日期或晚于当前日期 //证件起始日期
if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(that.userInfo.birthday)) { //如果录入日期早于出生日期或晚于当前日期
that.userInfo.certificateValidate = '' if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(that.userInfo.birthday)) {
that.$refs.certificateValidate.date = '' that.userInfo.certificateValidate = ''
return that.$toast('证件起始日期填写错误') 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()) let age = utilsAge.getAge(that.userInfo.birthday, new Date())
// 长期按钮是否禁用
that.effectiveDateTypeAble = age <= 45 that.effectiveDateTypeAble = age <= 45
} }
//出生证有效期 break
if (that.userInfo.idType == '3' && that.userInfo.idNo.length != 15 && that.userInfo.idNo.length != 18) { case '1':
let exipreDate = Date.parse(val) + Date.parse('1972-12-31') {
that.userInfo.certificateValidate = val console.log('证件截止日期')
that.userInfo.certiexpiredate = that.timeStampFormat(exipreDate) //证件截止日期
that.idLimit = true //如果已经勾选了长期
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':
let age = dateUtils.jsGetAge(val) {
that.userInfo.age = age //出生日期
//如果录入日期晚于当前日期
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 break
} }
} }
@@ -545,13 +572,17 @@ export function chooseCustomer(that, data, type) {
that.userInfo.mobile = data.customerPhone //移动电话 that.userInfo.mobile = data.customerPhone //移动电话
that.userInfo.email = data.email //电子邮箱 that.userInfo.email = data.email //电子邮箱
if (data.companyProvince.length) { if (data.companyProvince.length) {
that.areaName = getAreaName([{ that.areaName = getAreaName([
code: data.companyProvince {
}, { code: data.companyProvince
code: data.companyCity },
}, { {
code: data.companyArea code: data.companyCity
}]) //单位地址 },
{
code: data.companyArea
}
]) //单位地址
} }
if (type != '3') { if (type != '3') {
@@ -581,20 +612,27 @@ export function chooseCustomer(that, data, type) {
that.userInfo.householdProvince = data.province //户籍省 that.userInfo.householdProvince = data.province //户籍省
that.userInfo.householdCity = data.city //户籍市 that.userInfo.householdCity = data.city //户籍市
if (data.province.length) { if (data.province.length) {
that.census = getAreaName([{ that.census = getAreaName([
code: data.province {
}, { code: data.province
code: data.city },
}]) //户籍 {
code: data.city
}
]) //户籍
} }
if (data.homeProvince.length) { if (data.homeProvince.length) {
that.homeName = getAreaName([{ that.homeName = getAreaName([
code: data.homeProvince {
}, { code: data.homeProvince
code: data.homeCity },
}, { {
code: data.homeArea code: data.homeCity
}]) //家庭地址 },
{
code: data.homeArea
}
]) //家庭地址
} }
} else { } else {
that.userInfo.province = data.homeProvince //家庭省 that.userInfo.province = data.homeProvince //家庭省
@@ -656,28 +694,30 @@ export function infoUpdate(that, type) {
if (chooseProductCodes && chooseProductCodes.length) { if (chooseProductCodes && chooseProductCodes.length) {
let flag let flag
switch (type) { switch (type) {
case '1': { case '1':
//取出local中的投被保险人信息 {
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo) //取出local中的投被保险人信息
//如果 性别, 出生日期, 有无社保, 职业 发生变化 let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
if (that.userInfo.sex != saleInsuredInfo.sex || that.userInfo.birthday != saleInsuredInfo.birthday) { //如果 性别, 出生日期, 有无社保, 职业 发生变化
flag = true if (that.userInfo.sex != saleInsuredInfo.sex || that.userInfo.birthday != saleInsuredInfo.birthday) {
flag = true
}
} }
}
break break
case '2': { case '2':
//取出local中的被保险人信息 {
let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo) //取出local中的被保险人信息
//如果 性别, 出生日期, 有无社保, 职业 发生变化 let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
if ( //如果 性别, 出生日期, 有无社保, 职业 发生变化
that.userInfo.sex != saleInsuredPersonInfo.sex || if (
that.userInfo.birthday != saleInsuredPersonInfo.birthday || that.userInfo.sex != saleInsuredPersonInfo.sex ||
that.userInfo.medical != saleInsuredPersonInfo.medical || that.userInfo.birthday != saleInsuredPersonInfo.birthday ||
that.userInfo.occupationCode != saleInsuredPersonInfo.occupationCode that.userInfo.medical != saleInsuredPersonInfo.medical ||
) { that.userInfo.occupationCode != saleInsuredPersonInfo.occupationCode
flag = true ) {
flag = true
}
} }
}
break break
} }
@@ -789,22 +829,20 @@ export function sureArea(that, area, type, flag = false) {
case '1': //单位地址 case '1': //单位地址
that.areaName = getAreaName(area) that.areaName = getAreaName(area)
if (flag) { 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 { } 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 that.areaShow = false
break break
case '2': //家庭地址 case '2': //家庭地址
that.homeName = getAreaName(area); that.homeName = getAreaName(area)
[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code] ;[that.userInfo.homeProvince, that.userInfo.homeCity, that.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
that.homeShow = false that.homeShow = false
break break
case '3': //户籍 case '3': //户籍
that.census = getAreaName(area); that.census = getAreaName(area)
[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code] ;[that.userInfo.householdProvince, that.userInfo.householdCity] = [area[0].code, area[1].code]
that.censusShow = false that.censusShow = false
break break
} }
@@ -853,8 +891,7 @@ export function getRelatedData(that, val) {
} }
//如果证件校验不通过,恢复默认值 //如果证件校验不通过,恢复默认值
if (idToData(val).text) { 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) return that.$toast(idToData(val).text)
} }
that.userInfo.effectiveDateType = false that.userInfo.effectiveDateType = false
@@ -925,4 +962,70 @@ export function effectiveDataTypeChange(that, val) {
} else { } else {
that.certiexpiredateRequired = true 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
}