下属客户列表数据问题修正
This commit is contained in:
parent
b3d604d3d8
commit
739c5c8623
@ -44,7 +44,7 @@ class Index extends BaseController
|
|||||||
|
|
||||||
$uid = $this->uid;
|
$uid = $this->uid;
|
||||||
$auth = isAuth($uid,'customer_admin');
|
$auth = isAuth($uid,'customer_admin');
|
||||||
$dids = get_department_role($this->uid);
|
$dids = get_department_role($uid);
|
||||||
if($auth==0){
|
if($auth==0){
|
||||||
if($tab==1){
|
if($tab==1){
|
||||||
$whereOr[] =['a.belong_uid', '=', $uid];
|
$whereOr[] =['a.belong_uid', '=', $uid];
|
||||||
@ -55,6 +55,7 @@ class Index extends BaseController
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$whereOr[] =['a.belong_did', '=', 0];
|
$whereOr[] =['a.belong_did', '=', 0];
|
||||||
|
$where[] =['a.belong_uid', '>', 0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if($tab==3){
|
else if($tab==3){
|
||||||
@ -76,6 +77,10 @@ class Index extends BaseController
|
|||||||
if(!empty($dids)){
|
if(!empty($dids)){
|
||||||
$whereOr[] =['a.belong_did', 'in', $dids];
|
$whereOr[] =['a.belong_did', 'in', $dids];
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
$whereOr[] =['a.belong_did', '=', 0];
|
||||||
|
$where[] =['a.belong_uid', '>', 0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if($tab==3){
|
else if($tab==3){
|
||||||
$whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',a.share_ids)")];
|
$whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',a.share_ids)")];
|
||||||
@ -372,10 +377,11 @@ class Index extends BaseController
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($param['id']) && $param['id'] > 0) {
|
if (!empty($param['id']) && $param['id'] > 0) {
|
||||||
$id = get_params("id");
|
$sea = isset($param['sea']) ? $param['sea'] : 0;
|
||||||
//查看权限判断
|
//查看权限判断
|
||||||
$customer = customer_auth($this->uid,$id);
|
$customer = customer_auth($this->uid,$param['id']);
|
||||||
$detail = (new CustomerList())->detail($id);
|
$detail = (new CustomerList())->detail($param['id']);
|
||||||
|
View::assign('sea', $sea);
|
||||||
View::assign('detail', $detail);
|
View::assign('detail', $detail);
|
||||||
return view('edit');
|
return view('edit');
|
||||||
}
|
}
|
||||||
@ -397,6 +403,9 @@ class Index extends BaseController
|
|||||||
|
|
||||||
$detail = (new CustomerList())->detail($id);
|
$detail = (new CustomerList())->detail($id);
|
||||||
$contact = Db::name('CustomerContact')->where(['is_default'=>1,'cid'=>$id])->find();
|
$contact = Db::name('CustomerContact')->where(['is_default'=>1,'cid'=>$id])->find();
|
||||||
|
//是否是客户管理员
|
||||||
|
$auth = isAuth($this->uid,'customer_admin');
|
||||||
|
View::assign('auth', $auth);
|
||||||
View::assign('contact', $contact);
|
View::assign('contact', $contact);
|
||||||
View::assign('detail', $detail);
|
View::assign('detail', $detail);
|
||||||
return view();
|
return view();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user