diff --git a/api/controllers/wxapp/licheb/CusorderV2.php b/api/controllers/wxapp/licheb/CusorderV2.php index bf9eb844..3a8bf604 100644 --- a/api/controllers/wxapp/licheb/CusorderV2.php +++ b/api/controllers/wxapp/licheb/CusorderV2.php @@ -950,15 +950,19 @@ class CusorderV2 extends Wxapp //订单列表头部 protected function get_tabs() { - $where = [ - 'status' => 0, - 'biz_id' => $this->biz_id, - ]; + $group_id = $this->session['group_id']; + $uid = $this->session['uid']; + $where['status'] = 0; + if ($group_id == 1) { + $where['admin_id'] = $uid;//销售 + } else if ($group_id == 2 || $group_id == 3) {//店长/老板 + $where["biz_id = {$this->biz_id} or admin_id = {$uid}"] = null; + } else if ($group_id == 4) { + $where['biz_id'] = $this->biz_id; + $this->biz_id != 1 && $where['brand_id!='] = 3; //渠道经理过滤 + } $d_count = $this->orders_model->count($where); - $where = [ - 'status' => 1, - 'biz_id' => $this->biz_id, - ]; + $where['status'] = 1; $f_count = $this->orders_model->count($where); $lists = [ ['key' => 11, 'name' => "进行中({$d_count})"],