|
|
@@ -119,23 +119,14 @@
|
|
|
methods: {
|
|
|
async answerModal() {
|
|
|
if (this.modalObj.type !== 'add') {
|
|
|
- if (this.modalObj.customer.vendorEnterprise.uu) {
|
|
|
- // 当前用户是管理员时
|
|
|
- if (this.thisUser.sys) {
|
|
|
- this.$http.post(`/vendorDistribute/bindUserToVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(data => {
|
|
|
- this.onMind('转移成功!')
|
|
|
- this.closeModal()
|
|
|
- this.setSelect(true)
|
|
|
- }, err => {
|
|
|
- this.onMind(err.data)
|
|
|
- this.closeModal()
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.onMind('您没有权限转移!')
|
|
|
- }
|
|
|
- } else {
|
|
|
+ this.$http.post(`/vendorDistribute/bindUserToVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(data => {
|
|
|
+ this.onMind('转移成功!')
|
|
|
this.closeModal()
|
|
|
- }
|
|
|
+ this.setSelect(true)
|
|
|
+ }, err => {
|
|
|
+ this.onMind(err.data)
|
|
|
+ this.closeModal()
|
|
|
+ })
|
|
|
} else {
|
|
|
this.$http.post(`/vendorDistribute/bindVendor/${this.modalObj.customer.id}`, this.modalObj.originList).then(res => {
|
|
|
this.onMind('分配成功!')
|
|
|
@@ -260,6 +251,8 @@
|
|
|
} else {
|
|
|
this.onMind('您没有为当前客户分配用户的权限!')
|
|
|
}
|
|
|
+ }, err => {
|
|
|
+ this.onMind(err.data)
|
|
|
})
|
|
|
},
|
|
|
// 转移
|
|
|
@@ -278,6 +271,8 @@
|
|
|
} else {
|
|
|
this.onMind('您没有为当前客户分配用户的权限!')
|
|
|
}
|
|
|
+ }, err => {
|
|
|
+ this.onMind(err.data)
|
|
|
})
|
|
|
}
|
|
|
},
|