Browse Source

处理BUG

wangcz 7 years ago
parent
commit
861d7c4b3c
1 changed files with 11 additions and 16 deletions
  1. 11 16
      pages/mobile/center/user/supplier/index.vue

+ 11 - 16
pages/mobile/center/user/supplier/index.vue

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