#I7P8VW 修复销售机会归属人筛选bug

This commit is contained in:
HDM58\hdm58 2023-08-03 16:25:46 +08:00
parent d9c2354b5b
commit 919e138e02

View File

@ -38,21 +38,19 @@ class Chance extends BaseController
$uid = $this->uid; $uid = $this->uid;
$auth = isAuth($uid,'customer_admin'); $auth = isAuth($uid,'customer_admin');
if (empty($param['uid'])) {
if($auth==0){ if($auth==0){
$dids = get_department_role($this->uid); $dids = get_department_role($this->uid);
if(!empty($dids)){ if(!empty($dids)){
$whereOr[] =['c.belong_did', 'in', $dids]; $whereOr[] =['c.belong_did', 'in', $dids];
if (!empty($param['uid'])) {
$where[] = ['c.belong_uid', '=', $param['uid']];
}
} }
$whereOr[] =['c.belong_uid', '=', $uid]; $whereOr[] =['c.belong_uid', '=', $uid];
$whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',c.share_ids)")]; $whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',c.share_ids)")];
} }
else{
if (!empty($param['uid'])) {
$where[] = ['c.belong_uid', '=', $param['uid']];
} }
else{
$where[] = ['a.belong_uid', '=', $param['uid']];
} }
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit']; $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];