|
|
@@ -252,15 +252,11 @@
|
|
|
this.modalObj.type = 'add'
|
|
|
this.modalObj.customer = customer
|
|
|
this.$http.post(`/vendorDistribute/${customer.id}`).then(res => {
|
|
|
- customer.enTransfer = res.data.result
|
|
|
- if (this.enabled || customer.enTransfer) {
|
|
|
- this.$http.post(`/account/user/customer/${customer.vendorEnterprise.uu}`).then(data => {
|
|
|
- customer.userinfos = data.data
|
|
|
- this.modalObj.showModal = true
|
|
|
- this.modalObj.showModalList = customer.userinfos
|
|
|
- this.modalObj.originList = customer.userinfos
|
|
|
- this.init()
|
|
|
- })
|
|
|
+ if (this.enabled || res.data) {
|
|
|
+ this.modalObj.showModal = true
|
|
|
+ this.modalObj.showModalList = res.data
|
|
|
+ this.modalObj.originList = res.data
|
|
|
+ this.init()
|
|
|
} else {
|
|
|
this.onMind('您没有为当前客户分配用户的权限!')
|
|
|
}
|
|
|
@@ -271,23 +267,14 @@
|
|
|
this.modalObj.type = 'chance'
|
|
|
this.modalObj.customer = customer
|
|
|
this.$http.post(`/vendorDistribute/${customer.id}`).then(res => {
|
|
|
- customer.enTransfer = res.data.result
|
|
|
- if (this.enabled || customer.enTransfer) {
|
|
|
+ if (this.enabled || res.data) {
|
|
|
this.$http.get('/authentication').then(res => {
|
|
|
this.thisUser = res.data
|
|
|
})
|
|
|
- this.$http.post(`/account/user/customer/${customer.vendorEnterprise.uu}`).then(data => {
|
|
|
- customer.userinfos = data.data
|
|
|
- customer.userinfos.forEach(user => {
|
|
|
- if (this.$store.state.option.user.data.userUU === user.userUU && user.transfer) {
|
|
|
- this.transfer = true
|
|
|
- }
|
|
|
- })
|
|
|
- this.modalObj.showModal = true
|
|
|
- this.modalObj.showModalList = customer.userinfos
|
|
|
- this.modalObj.originList = customer.userinfos
|
|
|
- this.init()
|
|
|
- })
|
|
|
+ this.modalObj.showModal = true
|
|
|
+ this.modalObj.showModalList = res.data
|
|
|
+ this.modalObj.originList = res.data
|
|
|
+ this.init()
|
|
|
} else {
|
|
|
this.onMind('您没有为当前客户分配用户的权限!')
|
|
|
}
|