Commit bd01a791 authored by linxin's avatar linxin

角色切换部分

parent d06d56e7
Pipeline #4530 canceled with stages
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div slot="center">个人中心</div> <div slot="center">个人中心</div>
</h-header> </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"> <div class="card-top">
<img :src="upLoadObj" @click="checkType" > <img :src="upLoadObj" @click="checkType" >
<div class="sign"> <div class="sign">
...@@ -26,18 +26,18 @@ ...@@ -26,18 +26,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div v-if="multipleRole!=='GUTA'&&user_bp_type!=='GUTA'" class="card">
<div class="card-info"> <div class="card-info">
<div class="card-bottom"> <div class="card-bottom">
<div v-if="(user_bp_type!=='TENANT')&&(user_bp_type!=='GUTA')" @click="goStart"> <div v-if="(user_bp_type!=='TENANT')&&(user_bp_type!=='GUTA')" @click="goStart">
<img src="@/assets/myInfo/car.png" > <img src="@/assets/myInfo/car.png" >
<p>发车申请</p> <p>发车申请</p>
</div> </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" > <img src="@/assets/myInfo/pay.png" >
<p>首付还款</p> <p>首付还款</p>
</div> </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" > <img src="@/assets/myInfo/refund.png" >
<p>租金还款</p> <p>租金还款</p>
</div> </div>
...@@ -633,7 +633,11 @@ export default { ...@@ -633,7 +633,11 @@ export default {
} else if (index === 1) { } else if (index === 1) {
this.changePageHead() this.changePageHead()
} else if (index === 2) { } else if (index === 2) {
if (((vm.user_bp_type === 'TENANT') || (vm.user_bp_type === 'GUTA')) && (vm.user_bp_status === 'APPROVED')) {
this.$refs.roleSwitchRoleList.show() this.$refs.roleSwitchRoleList.show()
} else {
hlsPopup.showLongCenter('您当前尚无可用角色')
}
} }
}, },
}) })
...@@ -1013,9 +1017,15 @@ export default { ...@@ -1013,9 +1017,15 @@ export default {
border: 1px solid #00469c; border: 1px solid #00469c;
} }
} }
.has{
height:206px;
}
.antiHas{
height:3.12rem;
}
.top { .top {
width: 100%; width: 100%;
height: 206px; // height: 206px;
background: url("../../assets/myInfo/back.png") no-repeat; background: url("../../assets/myInfo/back.png") no-repeat;
background-size: 100% 156px; background-size: 100% 156px;
background-color: #efefef; background-color: #efefef;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
@click="selectIdTypeOnly()" @click="selectIdTypeOnly()"
> >
</item> </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="name" class="required">客户类型</div>
<div slot="content" class="typeBP"> <div slot="content" class="typeBP">
<span>{{ baseInfo.bp_type_n }}</span> <span>{{ baseInfo.bp_type_n }}</span>
...@@ -30,6 +30,13 @@ ...@@ -30,6 +30,13 @@
</span> </span>
</div> </div>
</item> </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)"> <item v-if="(isPaople&&from)||(isPaople&&isSelected)">
<div slot="name" class="required">业务经办人</div> <div slot="name" class="required">业务经办人</div>
<input slot="content" v-model="baseInfo.agent_username" placeholder="请输入业务经办员工代码" > <input slot="content" v-model="baseInfo.agent_username" placeholder="请输入业务经办员工代码" >
...@@ -319,8 +326,9 @@ export default { ...@@ -319,8 +326,9 @@ export default {
isApproved: false, isApproved: false,
isSave: false, isSave: false,
isAGENT: this.$route.params.isAGENT, isAGENT: this.$route.params.isAGENT,
isMultiRole: this.$route.params.isMultiRole, isMultiRole: this.$route.params.isMultiRole, // 能否选择多角色
isSelected: false, isSelected: false,
hasMultiRole: false, // 是否有第二个角色
from: false, from: false,
multiBpType: { multiBpType: {
bp_type_n: '', bp_type_n: '',
...@@ -336,6 +344,10 @@ export default { ...@@ -336,6 +344,10 @@ export default {
maritalList: [], maritalList: [],
districtList: [], districtList: [],
img_url: {}, img_url: {},
multiRole: {
bp_type_n: '',
bp_type: '',
}, // 查询出来的第二个角色
baseInfo: { baseInfo: {
bp_type_n: '', bp_type_n: '',
academic_background_n: '', academic_background_n: '',
...@@ -468,6 +480,7 @@ export default { ...@@ -468,6 +480,7 @@ export default {
vm.from = true vm.from = true
vm.basicInfoQuery() vm.basicInfoQuery()
vm.loadItemList() // 附件查询 vm.loadItemList() // 附件查询
vm.checkHasmultiple()// 查询是否有新角色
} else if (from.name === 'UserBind') { } else if (from.name === 'UserBind') {
vm.list = {} vm.list = {}
vm.multiBpType = { vm.multiBpType = {
...@@ -762,6 +775,33 @@ export default { ...@@ -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 () { bindCheck () {
let vm = this let vm = this
......
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