sth
This commit is contained in:
parent
08459b02df
commit
2be096d0fe
|
|
@ -62,7 +62,7 @@ class Configorder extends Backend
|
||||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
->tab(Order::TAB_SETTING)
|
->tab(Order::TAB_SETTING)
|
||||||
->configauth($this->auth,'dispatch_admin_id')
|
->dispatcherauth($this->auth,'dispatch_admin_id')
|
||||||
//->areaauth($this->auth)
|
//->areaauth($this->auth)
|
||||||
->with(['dispatchadmin'])
|
->with(['dispatchadmin'])
|
||||||
->where($where);
|
->where($where);
|
||||||
|
|
|
||||||
|
|
@ -617,14 +617,10 @@ class Auth extends \fast\Auth
|
||||||
* @param $uid
|
* @param $uid
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isAdminGroup($uid = null){
|
public function isDispatcher($uid = null){
|
||||||
$adminGroupIds = [1,11];
|
$dispatcherGroupId = 6;
|
||||||
$groupIds = $this->getGroupIds($uid);
|
$groupIds = $this->getGroupIds($uid);
|
||||||
$adminGroupIds = array_intersect($groupIds,$adminGroupIds);
|
return in_array($dispatcherGroupId,$groupIds);
|
||||||
if(!empty($adminGroupIds)){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -248,9 +248,9 @@ class Order extends Model
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeConfigauth($query, Auth $auth, string $admin_id_field='admin_id'){
|
public function scopeDispatcherauth($query, Auth $auth, string $admin_id_field='admin_id'){
|
||||||
|
|
||||||
if(!$auth->isAdminGroup()){
|
if($auth->isDispatcher()){ //是派单员
|
||||||
$query->where('fa_order.'.$admin_id_field,$auth->id);
|
$query->where('fa_order.'.$admin_id_field,$auth->id);
|
||||||
}
|
}
|
||||||
return $query;
|
return $query;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user