Commit bd01a791 authored by linxin's avatar linxin

角色切换部分

parent d06d56e7
Pipeline #4530 canceled with stages
......@@ -12,7 +12,7 @@
<div slot="center">个人中心</div>
</h-header>
<div class="top" style="margin-top:-1px;">
<div :class="['top',(multipleRole!=='GUTA'&&user_bp_type!=='GUTA')?'has':'antiHas']" style="margin-top:-1px;">
<div class="card-top">
<img :src="upLoadObj" @click="checkType" >
<div class="sign">
......@@ -26,18 +26,18 @@
</div>
</div>
</div>
<div class="card">
<div v-if="multipleRole!=='GUTA'&&user_bp_type!=='GUTA'" class="card">
<div class="card-info">
<div class="card-bottom">
<div v-if="(user_bp_type!=='TENANT')&&(user_bp_type!=='GUTA')" @click="goStart">
<img src="@/assets/myInfo/car.png" >
<p>发车申请</p>
</div>
<div v-if="(user_bp_type==='TENANT')&&(multipleRole!=='GUTA')" @click="changePay">
<div v-if="(user_bp_type==='TENANT')" @click="changePay">
<img src="@/assets/myInfo/pay.png" >
<p>首付还款</p>
</div>
<div v-if="(user_bp_type==='TENANT')&&(multipleRole!=='GUTA')" @click="changeRent">
<div v-if="(user_bp_type==='TENANT')" @click="changeRent">
<img src="@/assets/myInfo/refund.png" >
<p>租金还款</p>
</div>
......@@ -633,7 +633,11 @@ export default {
} else if (index === 1) {
this.changePageHead()
} else if (index === 2) {
this.$refs.roleSwitchRoleList.show()
if (((vm.user_bp_type === 'TENANT') || (vm.user_bp_type === 'GUTA')) && (vm.user_bp_status === 'APPROVED')) {
this.$refs.roleSwitchRoleList.show()
} else {
hlsPopup.showLongCenter('您当前尚无可用角色')
}
}
},
})
......@@ -1013,9 +1017,15 @@ export default {
border: 1px solid #00469c;
}
}
.has{
height:206px;
}
.antiHas{
height:3.12rem;
}
.top {
width: 100%;
height: 206px;
// height: 206px;
background: url("../../assets/myInfo/back.png") no-repeat;
background-size: 100% 156px;
background-color: #efefef;
......
......@@ -20,7 +20,7 @@
@click="selectIdTypeOnly()"
>
</item>
<item v-if="isApproved&&isMultiRole" :showArrow="true" @click.native="selectIdType()">
<item v-if="isApproved&&isMultiRole&&!hasMultiRole" :showArrow="true" @click.native="selectIdType()">
<div slot="name" class="required">客户类型</div>
<div slot="content" class="typeBP">
<span>{{ baseInfo.bp_type_n }}</span>
......@@ -30,6 +30,13 @@
</span>
</div>
</item>
<item v-if="isApproved&&isMultiRole&&hasMultiRole" :showArrow="true">
<div slot="name" class="required">客户类型</div>
<div slot="content" class="typeBP">
<span>{{ baseInfo.bp_type_n }}</span>
<span v-if="multiRole.bp_type_n">{{ multiRole.bp_type_n }}</span>
</div>
</item>
<item v-if="(isPaople&&from)||(isPaople&&isSelected)">
<div slot="name" class="required">业务经办人</div>
<input slot="content" v-model="baseInfo.agent_username" placeholder="请输入业务经办员工代码" >
......@@ -319,8 +326,9 @@ export default {
isApproved: false,
isSave: false,
isAGENT: this.$route.params.isAGENT,
isMultiRole: this.$route.params.isMultiRole,
isMultiRole: this.$route.params.isMultiRole, // 能否选择多角色
isSelected: false,
hasMultiRole: false, // 是否有第二个角色
from: false,
multiBpType: {
bp_type_n: '',
......@@ -336,6 +344,10 @@ export default {
maritalList: [],
districtList: [],
img_url: {},
multiRole: {
bp_type_n: '',
bp_type: '',
}, // 查询出来的第二个角色
baseInfo: {
bp_type_n: '',
academic_background_n: '',
......@@ -468,6 +480,7 @@ export default {
vm.from = true
vm.basicInfoQuery()
vm.loadItemList() // 附件查询
vm.checkHasmultiple()// 查询是否有新角色
} else if (from.name === 'UserBind') {
vm.list = {}
vm.multiBpType = {
......@@ -762,6 +775,33 @@ export default {
}
})
},
checkHasmultiple () {
let vm = this
let url = process.env.basePath + 'bp_role_check'
let param = {
bp_id: window.localStorage.getItem('bp_id'),
}
// vm.hlsPopup.showLoading('请稍后')
vm.hlsHttp.post(url, param).then(function (res) {
// vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hasMultiRole = true
debugger
if (vm.baseInfo.bp_type === 'TENANT') {
vm.multiRole.bp_type_n = '担保人'
vm.multiRole.bp_type = 'GUTA'
} else if (vm.baseInfo.bp_type === 'GUTA') {
vm.multiRole.bp_type_n = '承租人'
vm.multiRole.bp_type = 'TENANT'
}
} else {
debugger
vm.hasMultiRole = false
vm.multiRole.bp_type = ''
vm.multiRole.bp_type_n = ''
}
})
},
// 基本信息保存前校验
bindCheck () {
let vm = this
......@@ -808,8 +848,8 @@ export default {
window.localStorage.setItem('bp_name', vm.baseInfo.bp_name)
window.localStorage.setItem('bp_type', vm.baseInfo.bp_type)
window.localStorage.setItem('from', vm.from)
// vm.bindCheck()
vm.$router.push({
// vm.bindCheck()
vm.$router.push({
name: 'NPInvoiceInfo',
})
return res.bp_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment