moonsflyer 9 mēneši atpakaļ
vecāks
revīzija
0d9d362943

+ 14 - 4
application/admin/controller/qingdong/customer/Customer.php

@@ -61,6 +61,9 @@ class Customer extends Base
      */
     public function index()
     {
+        $staff_info = $this->_staff;
+        $group_ids = $staff_info['group_ids'];
+
         //设置过滤方法
         $this->request->filter(['strip_tags', 'trim']);
         $staff = Staff::info();
@@ -135,11 +138,18 @@ class Customer extends Base
 //                ->where($wheres)
 //                ->where('owner_staff_id != 0 and owner_staff_id is not null')
 //                ->order($sort, $order)->paginate($limit);
-            $list = $this->model->where($where)
-                ->where($wheres)
-                ->where('owner_staff_id != 0 and owner_staff_id is not null')
-                ->order($sort, $order)->paginate($limit);
 
+            if($group_ids>1){
+                $list = $this->model->where($where)
+                    ->where($wheres)
+                    ->where('owner_staff_id != 0 and owner_staff_id is not null')
+                    ->order($sort, $order)->paginate($limit);
+            }else{
+                $list = $this->model->where($where)
+                    ->where('owner_staff_id != 0 and owner_staff_id is not null')
+                    ->order($sort, $order)->paginate($limit);
+            }
+            
             $rows = $list->items();
 
             foreach ($rows as &$v) {