Commit 46cce622 authored by 李晓兵's avatar 李晓兵

'我的切换角色'

parents 93263f19 58e7fc5c
Pipeline #3921 canceled with stages
...@@ -231,11 +231,6 @@ export default { ...@@ -231,11 +231,6 @@ export default {
next(vm => { next(vm => {
vm.userQuery() vm.userQuery()
vm.numQuery() vm.numQuery()
if (vm.user_bp_type === 'AGENT') {
vm.isAGENT = true
} else {
vm.isAGENT = false
}
}) })
next() next()
}, },
...@@ -504,6 +499,7 @@ export default { ...@@ -504,6 +499,7 @@ export default {
user_bp_name: this.user_bp_name, user_bp_name: this.user_bp_name,
isAGENT: this.isAGENT, isAGENT: this.isAGENT,
status: 'APPROVED', status: 'APPROVED',
isMultiRole: this.isMultiRole,
}, },
}) })
} else { } else {
...@@ -514,6 +510,7 @@ export default { ...@@ -514,6 +510,7 @@ export default {
user_bp_name: this.user_bp_name, user_bp_name: this.user_bp_name,
isAGENT: this.isAGENT, isAGENT: this.isAGENT,
status: 'APPROVED', status: 'APPROVED',
isMultiRole: this.isMultiRole,
}, },
}) })
} }
...@@ -549,6 +546,16 @@ export default { ...@@ -549,6 +546,16 @@ export default {
vm.user_bp_type = res.info.user_bp_type vm.user_bp_type = res.info.user_bp_type
vm.user_phone = res.info.user_phone vm.user_phone = res.info.user_phone
vm.watchBpStatus() vm.watchBpStatus()
if (vm.user_bp_type === 'AGENT') {
vm.isAGENT = true
} else {
vm.isAGENT = false
}
if (vm.user_bp_type === 'GUTA' || vm.user_bp_type === 'TENANT') {
vm.isMultiRole = true
} else {
vm.isMultiRole = false
}
} else { } else {
this.hlsPopup.showLongCenter(res.message) this.hlsPopup.showLongCenter(res.message)
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<h-content class="content"> <h-content class="content">
<div v-show="tabNum==0"> <div v-show="tabNum==0">
<list-item :item-height="44"> <list-item :item-height="44">
<item v-if="!isApproved" :showArrow="true" @click.native="selectIdTypeOnly()"> <item v-if="(isApproved&&!isMultiRole)||!isApproved" :showArrow="true">
<div slot="name" class="required">客户类型</div> <div slot="name" class="required">客户类型</div>
<input <input
slot="content" slot="content"
...@@ -26,16 +26,16 @@ ...@@ -26,16 +26,16 @@
type="text" type="text"
readonly readonly
onfocus="this.blur()" onfocus="this.blur()"
@click="selectIdType()" @click="selectIdTypeOnly()"
> >
</item> </item>
<item v-if="isApproved" :showArrow="true" @click.native="selectIdType()"> <item v-if="isApproved&&isMultiRole" :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>
<span v-for="(item,index) in bp_type" :key="index"> <span>
{{ item.bp_type_n }} {{ multiBpType.bp_type_n }}
<img src="@/assets/userBind/deleteTag.png" @click.stop @click="deleteBP(item)" > <img v-if="multiBpType.bp_type_n" src="@/assets/userBind/deleteTag.png" @click.stop @click="deleteBP" >
</span> </span>
</div> </div>
</item> </item>
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<div slot="name" class="required">办事处代码</div> <div slot="name" class="required">办事处代码</div>
<input slot="content" v-model="baseInfo.business_license_num" placeholder="请输入办事处代码" > <input slot="content" v-model="baseInfo.business_license_num" placeholder="请输入办事处代码" >
</item> </item>
<button v-if="isAddNewType" class="type-save">新增角色</button>
</list-item> </list-item>
<div class="userInfo">客户信息</div> <div class="userInfo">客户信息</div>
<div class="upload-id-card"> <div class="upload-id-card">
...@@ -458,7 +459,7 @@ export default { ...@@ -458,7 +459,7 @@ export default {
data () { data () {
return { return {
list: {}, list: {},
bp_type: [], isAddNewType: false,
fromPromisePay: false, fromPromisePay: false,
hasSP: false, hasSP: false,
isPaople: false, isPaople: false,
...@@ -468,9 +469,14 @@ export default { ...@@ -468,9 +469,14 @@ 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,
isSelected: false, isSelected: false,
tabNum: 0, tabNum: 0,
from: false, from: false,
multiBpType: {
bp_type_n: '',
bp_type: '',
},
cityList: [], cityList: [],
provinceList: [], provinceList: [],
upload_list: [], // 上传图片列表 upload_list: [], // 上传图片列表
...@@ -615,12 +621,10 @@ export default { ...@@ -615,12 +621,10 @@ export default {
this.getinvoiceList() this.getinvoiceList()
}, },
methods: { methods: {
deleteBP (e) { deleteBP () {
this.bp_type.forEach(i => { this.multiBpType.bp_type_n = ''
if (i.bp_type_n === e.bp_type_n) { this.multiBpType.bp_type = ''
this.bp_type.splice(i, 1) this.isAddNewType = false
}
})
}, },
basicInfoQuery () { basicInfoQuery () {
let vm = this let vm = this
...@@ -1342,20 +1346,24 @@ export default { ...@@ -1342,20 +1346,24 @@ export default {
}, },
selectIdType (e) { selectIdType (e) {
let vm = this let vm = this
let List
if (vm.baseInfo.bp_type === 'TENANT') {
List = vm.typeList.filter(i => {
return i.code === 'GUTA'
})
} else if (vm.baseInfo.bp_type === 'GUTA') {
List = vm.typeList.filter(i => {
return i.code === 'TENANT'
})
}
vm.hlsPopup.selectList({ vm.hlsPopup.selectList({
list: vm.typeList, list: List,
code: 'bp_type', code: 'bp_type',
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
// vm.baseInfo.bp_type = obj.bp_type vm.multiBpType.bp_type = obj.bp_type
// vm.baseInfo.bp_type_n = obj.bp_type_n vm.multiBpType.bp_type_n = obj.bp_type_n
let flag vm.isAddNewType = true
flag = vm.bp_type.some(i => {
return i.bp_type_n.indexOf(obj.bp_type_n) !== -1
})
if (!flag && obj.bp_type_n !== vm.baseInfo.bp_type_n) {
vm.bp_type.push({ bp_type: obj.bp_type, bp_type_n: obj.bp_type_n })
}
vm.isSelected = true vm.isSelected = true
}, },
}) })
...@@ -1371,6 +1379,7 @@ export default { ...@@ -1371,6 +1379,7 @@ export default {
vm.baseInfo.bp_type_n = obj.bp_type_n vm.baseInfo.bp_type_n = obj.bp_type_n
}, },
}) })
vm.isSelected = true
}, },
getBankInfo () { getBankInfo () {
let vm = this let vm = this
...@@ -1612,6 +1621,16 @@ export default { ...@@ -1612,6 +1621,16 @@ export default {
text-align: right; text-align: right;
color: #666; color: #666;
} }
.type-save{
color: #fff;
width:80px;
height: 25px;
font-size:10px;
border-radius: 5px;
margin:5px 15px 5px 0px;
float: right;
background-color: @headerColor;
}
.typeBP { .typeBP {
span { span {
display: inline-block; display: inline-block;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<h-content class="content"> <h-content class="content">
<div v-show="tabNum==0"> <div v-show="tabNum==0">
<list-item :item-height="44"> <list-item :item-height="44">
<item :showArrow="true"> <item v-if="(isApproved&&!isMultiRole)||!isApproved" :showArrow="true">
<div slot="name" class="font-color required">客户类型</div> <div slot="name" class="font-color required">客户类型</div>
<input <input
slot="content" slot="content"
...@@ -28,6 +28,16 @@ ...@@ -28,6 +28,16 @@
@click="selectIdType()" @click="selectIdType()"
> >
</item> </item>
<item v-if="isApproved&&isMultiRole" :showArrow="true" @click.native="selectIdMultiType()">
<div slot="name" class="required">客户类型</div>
<div slot="content" class="typeBP">
<span>{{ baseInfo.bp_type_n }}</span>
<span>
{{ multiBpType.bp_type_n }}
<img v-if="multiBpType.bp_type_n" src="@/assets/userBind/deleteTag.png" @click.stop @click="deleteBP" >
</span>
</div>
</item>
<item v-if="bp_type_flag"> <item v-if="bp_type_flag">
<div slot="name">{{ typeName }}</div> <div slot="name">{{ typeName }}</div>
<input <input
...@@ -38,6 +48,7 @@ ...@@ -38,6 +48,7 @@
> >
<!-- <input v-if="!bpClass_flag" slot="content" :placeholder="type" v-model="baseInfo.business_license_num" > --> <!-- <input v-if="!bpClass_flag" slot="content" :placeholder="type" v-model="baseInfo.business_license_num" > -->
</item> </item>
<button v-if="isAddNewType" class="type-save">新增角色</button>
</list-item> </list-item>
<div class="userInfo martop">企业信息</div> <div class="userInfo martop">企业信息</div>
<div class="upload-id-card"> <div class="upload-id-card">
...@@ -512,7 +523,9 @@ export default { ...@@ -512,7 +523,9 @@ export default {
bpClass: '', bpClass: '',
from: false, from: false,
isApproved: false, isApproved: false,
isAddNewType: false,
isAGENT: this.$route.params.isAGENT, isAGENT: this.$route.params.isAGENT,
isMultiRole: this.$route.params.isMultiRole,
img_url: {}, img_url: {},
typeList: [], typeList: [],
backList: [], backList: [],
...@@ -534,6 +547,10 @@ export default { ...@@ -534,6 +547,10 @@ export default {
bank_card_flag: false, bank_card_flag: false,
showModalValue: false, showModalValue: false,
type: '请输入业务经办姓名', type: '请输入业务经办姓名',
multiBpType: {
bp_type_n: '',
bp_type: '',
},
legal_personMsg: { legal_personMsg: {
id_card_no: null, id_card_no: null,
// legal_person: '', // legal_person: '',
...@@ -623,6 +640,7 @@ export default { ...@@ -623,6 +640,7 @@ export default {
if (vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') { if (vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') {
vm.type = '请输入业务经办员工代码' vm.type = '请输入业务经办员工代码'
vm.typeName = '业务经办人' vm.typeName = '业务经办人'
vm.bp_type_flag = true
} else if ( } else if (
vm.baseInfo.bp_type === 'AGENT' || vm.baseInfo.bp_type === 'AGENT' ||
vm.baseInfo.bp_type === 'OFFICE' || vm.baseInfo.bp_type === 'OFFICE' ||
...@@ -693,6 +711,35 @@ export default { ...@@ -693,6 +711,35 @@ export default {
next() next()
}, },
methods: { methods: {
deleteBP () {
this.multiBpType.bp_type_n = ''
this.multiBpType.bp_type = ''
this.isAddNewType = false
},
selectIdMultiType () {
let vm = this
let List
if (vm.baseInfo.bp_type === 'TENANT') {
List = vm.typeList.filter(i => {
return i.code === 'GUTA'
})
} else if (vm.baseInfo.bp_type === 'GUTA') {
List = vm.typeList.filter(i => {
return i.code === 'TENANT'
})
}
vm.hlsPopup.selectList({
list: List,
code: 'bp_type',
object: {},
returnItem: function (index, obj) {
vm.multiBpType.bp_type = obj.bp_type
vm.multiBpType.bp_type_n = obj.bp_type_n
vm.isAddNewType = true
vm.isSelected = true
},
})
},
getBankInfo () { getBankInfo () {
let vm = this let vm = this
// let bpId = window.localStorage.getItem('user_id') // let bpId = window.localStorage.getItem('user_id')
...@@ -1898,6 +1945,34 @@ export default { ...@@ -1898,6 +1945,34 @@ export default {
text-align: right; text-align: right;
color: #666; color: #666;
// padding-top:16px; // padding-top:16px;
}
.type-save{
color: #fff;
width:80px;
height: 25px;
font-size:10px;
border-radius: 5px;
margin:5px 15px 5px 0px;
float: right;
background-color: @headerColor;
}
.typeBP {
span {
display: inline-block;
padding: 1px 5px;
border-radius: 5px;
text-align: center;
line-height: 20px;
background-color: rgba(220, 220, 221, 0.26);
color: #666;
margin-right: 5px;
margin-top: 3px;
}
img {
width: 10px;
height: 10px;
margin-left: 1px;
}
} }
.tax{ .tax{
width:351px; width:351px;
......
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