Commit bca64697 by 朱继来

添加过滤条件

parent 197b8d9c
...@@ -1041,8 +1041,15 @@ Class OrderController extends Controller ...@@ -1041,8 +1041,15 @@ Class OrderController extends Controller
$info['online_sales_kefu_4'] = $perm->getUserByCondition(37, 62, 0); // 线上四组销售 $info['online_sales_kefu_4'] = $perm->getUserByCondition(37, 62, 0); // 线上四组销售
$info['offline_sales_chief'] = $perm->getUserByCondition(40, 90, 0); // 线下销售-39 线下销售总监-90 $info['offline_sales_chief'] = $perm->getUserByCondition(40, 90, 0); // 线下销售-39 线下销售总监-90
$offline_sales_chief = [];
foreach ($info['offline_sales_chief'] as $v) {
$offline_sales_chief[] = $v->userId;
}
// $info['offline_sales_all'] = $perm->getDepartmentUser(40, 62); // 线下销售各组人员 // $info['offline_sales_all'] = $perm->getDepartmentUser(40, 62); // 线下销售各组人员
$info['offline_sales_all'] = $perm->getUserByDepartmentId(40); // 线下销售各组人员 $info['offline_sales_all'] = $perm->getUserByDepartmentId(40, 0, 'userId not in ('.implode(',', $offline_sales_chief).')'); // 线下销售各组人员
$info['self_kefu'] = $perm->getUserByDepartmentId(38, 0); // 自营销售部 $info['self_kefu'] = $perm->getUserByDepartmentId(38, 0); // 自营销售部
......
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
/* 订单系统权限调整 --- 20200511 */ /* 订单系统权限调整 --- 20200511 */
// 获取部门人员 // 获取部门人员
public function getUserByDepartmentId($department_id, $status='') public function getUserByDepartmentId($department_id, $status='', $filter='')
{ {
$department_ids = []; $department_ids = [];
...@@ -411,6 +411,11 @@ ...@@ -411,6 +411,11 @@
$query->where('status', '=', $status); $query->where('status', '=', $status);
} }
}) })
->where(function($query) use($filter) {
if ($filter) {
$query->whereRaw($filter);
}
})
->select('userId', 'name', 'status') ->select('userId', 'name', 'status')
->get(); ->get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment