|
|
@@ -71,7 +71,7 @@ class WorkOrderFilters
|
|
|
if(isset($this->params['data']))
|
|
|
$this->id(explode(',',$this->params['data']));
|
|
|
|
|
|
- // 可见过滤
|
|
|
+
|
|
|
$this->afterFilter();
|
|
|
}
|
|
|
|
|
|
@@ -89,14 +89,17 @@ class WorkOrderFilters
|
|
|
$this->afterFilterOwner($orderQuery,$owner_ids,);
|
|
|
}
|
|
|
|
|
|
+ // 可见货主过滤
|
|
|
private function afterFilterOwner($orderQuery,$owner_ids)
|
|
|
{
|
|
|
if(Gate::allows('订单管理-工单处理-客服编辑') || Gate::allows('订单管理-工单处理-承运商编辑')){
|
|
|
+
|
|
|
}else if(Gate::allows('订单管理-工单处理-货主编辑')){
|
|
|
$orderQuery->whereIn('owner_id',$owner_ids);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 可见承运商过滤
|
|
|
private function afterFilterLogistic($orderQuery,$owner_ids,$logistic_ids)
|
|
|
{
|
|
|
if(Gate::allows('订单管理-工单处理-客服编辑') || Gate::allows('订单管理-工单处理-货主编辑')){
|
|
|
@@ -106,11 +109,8 @@ class WorkOrderFilters
|
|
|
} else if (Gate::allows('订单管理-工单处理-承运商编辑')){
|
|
|
$orderQuery->whereIn('logistic_id',array_values($logistic_ids));
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
public function beforeApply()
|
|
|
{
|
|
|
if ($this->orderPackageQuery){
|