Browse Source

处理BUG

wangcz 7 years ago
parent
commit
34fada9799
1 changed files with 10 additions and 23 deletions
  1. 10 23
      pages/mobile/center/user/supplier/index.vue

+ 10 - 23
pages/mobile/center/user/supplier/index.vue

@@ -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('您没有为当前客户分配用户的权限!')
           }