diff --git a/app/crm/service/StockOrdersService.php b/app/crm/service/StockOrdersService.php index 872f995..f5d33e9 100644 --- a/app/crm/service/StockOrdersService.php +++ b/app/crm/service/StockOrdersService.php @@ -65,7 +65,9 @@ class StockOrdersService extends \app\common\service\StockOrdersService $config['where']['salesperson_id'] = $request->user->uid; } } elseif (in_array(1,$roles_id)) { //超管可以看所有的 - $config['where']['approval_status'] = ['>=',1]; + //$config['where']['approval_status'] = ['>=',1]; + $config['orWhere'][] = ['approval_status','>=',1]; + $config['orWhere'][] = ['salesperson_id','=',$request->user->uid]; unset($config['where']['salesperson_id']); }else{ $config['where']['salesperson_id'] = $request->user->uid;