mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 20:56:45 +08:00
[IMP]【自助入司流程优化】协议签署,增加筛选已签署协议方法,签署协议时跳过已签署文件
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 = [{
|
||||
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: [{
|
||||
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,7 +242,8 @@ export function onConfirm(that, value, type) {
|
||||
case '1':
|
||||
that.userInfo.jobStatus = value.id
|
||||
break
|
||||
case '2': {
|
||||
case '2':
|
||||
{
|
||||
//如果关系是本人
|
||||
if (value.id == 1) {
|
||||
//获取订单详情
|
||||
@@ -261,27 +261,47 @@ export function onConfirm(that, value, type) {
|
||||
}
|
||||
that.userInfo.birthday = insuredInfo.birthday
|
||||
//户籍
|
||||
that.sureArea([{
|
||||
that.sureArea(
|
||||
[
|
||||
{
|
||||
code: insuredInfo.householdProvince
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: insuredInfo.householdCity
|
||||
}], '3')
|
||||
}
|
||||
],
|
||||
'3'
|
||||
)
|
||||
//单位地址
|
||||
that.sureArea([{
|
||||
that.sureArea(
|
||||
[
|
||||
{
|
||||
code: insuredInfo.companyProvince
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: insuredInfo.companyCity
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: insuredInfo.companyArea
|
||||
}], '1')
|
||||
}
|
||||
],
|
||||
'1'
|
||||
)
|
||||
//家庭地址
|
||||
that.sureArea([{
|
||||
that.sureArea(
|
||||
[
|
||||
{
|
||||
code: insuredInfo.homeProvince
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: insuredInfo.homeCity
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: insuredInfo.homeArea
|
||||
}], '2')
|
||||
}
|
||||
],
|
||||
'2'
|
||||
)
|
||||
//是否长期
|
||||
if (insuredInfo.effectiveDateType == 'false') {
|
||||
that.userInfo.effectiveDateType = false
|
||||
@@ -323,7 +343,8 @@ export function onConfirm(that, value, type) {
|
||||
}
|
||||
}
|
||||
break
|
||||
case '3': {
|
||||
case '3':
|
||||
{
|
||||
//如果受益人是被保险人本人
|
||||
if (value.id == 1) {
|
||||
//获取投保人数据
|
||||
@@ -342,13 +363,17 @@ export function onConfirm(that, value, type) {
|
||||
that.userInfo.city = insuredInfo.homeCity //家庭市
|
||||
that.userInfo.area = insuredInfo.homeArea //家庭区
|
||||
that.userInfo.province = insuredInfo.homeProvince //家庭省
|
||||
that.areaName = getAreaName([{
|
||||
that.areaName = getAreaName([
|
||||
{
|
||||
code: insuredInfo.homeProvince
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: insuredInfo.homeCity
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: insuredInfo.homeArea
|
||||
}]) //家庭地址
|
||||
}
|
||||
]) //家庭地址
|
||||
that.userInfo.village = insuredInfo.homeAddress //家庭详细地址
|
||||
}, 0)
|
||||
|
||||
@@ -368,8 +393,8 @@ export function onConfirm(that, value, type) {
|
||||
}
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
};
|
||||
[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
||||
}
|
||||
;[that.userInfo.relationToInsured, that.relationToAppnt] = [value.id, value.text]
|
||||
})
|
||||
} else {
|
||||
that.isInsured = false
|
||||
@@ -378,8 +403,8 @@ export function onConfirm(that, value, type) {
|
||||
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
|
||||
@@ -411,7 +436,8 @@ export function onConfirm(that, value, type) {
|
||||
export function onDateConfirm(that, val, type) {
|
||||
console.log(type)
|
||||
switch (type) {
|
||||
case '0': {
|
||||
case '0':
|
||||
{
|
||||
//证件起始日期
|
||||
//如果录入日期早于出生日期或晚于当前日期
|
||||
if (Date.parse(val) > Date.parse(new Date()) || Date.parse(val) < Date.parse(that.userInfo.birthday)) {
|
||||
@@ -426,7 +452,8 @@ export function onDateConfirm(that, val, type) {
|
||||
that.effectiveDateTypeAble = age <= 45
|
||||
}
|
||||
break
|
||||
case '1': {
|
||||
case '1':
|
||||
{
|
||||
console.log('证件截止日期')
|
||||
//证件截止日期
|
||||
//如果已经勾选了长期
|
||||
@@ -470,7 +497,8 @@ export function onDateConfirm(that, val, type) {
|
||||
// }
|
||||
}
|
||||
break
|
||||
case '2': {
|
||||
case '2':
|
||||
{
|
||||
//出生日期
|
||||
//如果录入日期晚于当前日期
|
||||
if (Date.parse(val) > Date.parse(new Date())) {
|
||||
@@ -494,7 +522,6 @@ export function onDateConfirm(that, val, type) {
|
||||
// 由日期算周岁
|
||||
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([{
|
||||
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([{
|
||||
that.census = getAreaName([
|
||||
{
|
||||
code: data.province
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: data.city
|
||||
}]) //户籍
|
||||
}
|
||||
]) //户籍
|
||||
}
|
||||
if (data.homeProvince.length) {
|
||||
that.homeName = getAreaName([{
|
||||
that.homeName = getAreaName([
|
||||
{
|
||||
code: data.homeProvince
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: data.homeCity
|
||||
}, {
|
||||
},
|
||||
{
|
||||
code: data.homeArea
|
||||
}]) //家庭地址
|
||||
}
|
||||
]) //家庭地址
|
||||
}
|
||||
} else {
|
||||
that.userInfo.province = data.homeProvince //家庭省
|
||||
@@ -656,7 +694,8 @@ export function infoUpdate(that, type) {
|
||||
if (chooseProductCodes && chooseProductCodes.length) {
|
||||
let flag
|
||||
switch (type) {
|
||||
case '1': {
|
||||
case '1':
|
||||
{
|
||||
//取出local中的投被保险人信息
|
||||
let saleInsuredInfo = JSON.parse(localStorage.saleInsuredInfo)
|
||||
//如果 性别, 出生日期, 有无社保, 职业 发生变化
|
||||
@@ -665,7 +704,8 @@ export function infoUpdate(that, type) {
|
||||
}
|
||||
}
|
||||
break
|
||||
case '2': {
|
||||
case '2':
|
||||
{
|
||||
//取出local中的被保险人信息
|
||||
let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
||||
//如果 性别, 出生日期, 有无社保, 职业 发生变化
|
||||
@@ -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
|
||||
@@ -926,3 +963,69 @@ export function effectiveDataTypeChange(that, val) {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user