zs 1 سال پیش
والد
کامیت
9845494cc1
2فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 3 1
      src/views/platGroup/group/detail.vue
  2. 3 1
      src/views/platGroup/group/index.vue

+ 3 - 1
src/views/platGroup/group/detail.vue

@@ -222,7 +222,9 @@ export default {
       res = await this.getDict({ code: 'group_status' });
       if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
       // 团长列表
-      res = await this.userQuery({ is_leader: '0' });
+      const data = { is_leader: '0' };
+      if (this.user.role.code == 'shopAdmin') data.shop = this.user.shop._id || this.user.shop.id;
+      res = await this.userQuery(data);
       if (this.$checkRes(res)) {
         for (const p1 of res.data) {
           p1.name = '团长' + '---' + p1.phone + '---' + p1.name;

+ 3 - 1
src/views/platGroup/group/index.vue

@@ -130,7 +130,9 @@ export default {
     },
     async leaderSearch(value) {
       this.loading = true;
-      let res = await this.userQuery({ name: value, is_leader: '0' });
+      const data = { name: value, is_leader: '0' };
+      if (this.user.role.code == 'shopAdmin') data.shop = this.user.shop._id || this.user.shop.id;
+      let res = await this.userQuery(data);
       if (this.$checkRes(res)) this.$set(this, 'leaderList', res.data);
       this.loading = false;
     },