|
|
@@ -100,10 +100,8 @@ class WorkOrderFilters
|
|
|
|
|
|
private function filterWorkOrderStatus()
|
|
|
{
|
|
|
- if (isset($this->params['is_end'])) return;
|
|
|
- $this->queryBuilder->where('status', '!=', 5); // 过滤已完成
|
|
|
$status = [];
|
|
|
- if (Gate::allows('订单管理-工单处理-客服编辑')) {
|
|
|
+ if (Gate::allows('订单管理-工单处理-宝时编辑')) {
|
|
|
$status[]= 4;
|
|
|
}
|
|
|
if (Gate::allows('订单管理-工单处理-承运商编辑')) {
|
|
|
@@ -112,6 +110,9 @@ class WorkOrderFilters
|
|
|
if (Gate::allows('订单管理-工单处理-货主编辑')) {
|
|
|
$status[]= 1;
|
|
|
}
|
|
|
+ if (!isset($this->params['is_end'])) {
|
|
|
+ $this->queryBuilder->where('status', '!=', 5); // 过滤已完成
|
|
|
+ }
|
|
|
$this->queryBuilder->whereIn('status',$status);
|
|
|
}
|
|
|
|
|
|
@@ -124,7 +125,7 @@ class WorkOrderFilters
|
|
|
|
|
|
private function afterFilterLogistic($logistic_ids)
|
|
|
{
|
|
|
- if (Gate::allows('订单管理-工单处理-承运商编辑')) {
|
|
|
+ if (Gate::allows('订单管理-工单处理-承运商编辑') && !Gate::allows('订单管理-工单处理-宝时编辑')) {
|
|
|
$this->queryBuilder->whereIn('logistic_id', array_values($logistic_ids));
|
|
|
}
|
|
|
}
|