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