|
|
@@ -97,26 +97,29 @@ class WorkOrderFilters
|
|
|
|
|
|
$this->afterFileIssueType();
|
|
|
|
|
|
- $this->filterWorkOrderStatus();
|
|
|
+ $this->filterStatus();
|
|
|
}
|
|
|
|
|
|
- private function filterWorkOrderStatus()
|
|
|
+ private function filterStatus()
|
|
|
{
|
|
|
$status = [];
|
|
|
- if (Gate::allows('订单管理-工单处理-宝时编辑')) {
|
|
|
+
|
|
|
+ if (Gate::allows('订单管理-工单处理-宝时编辑')){
|
|
|
array_push($status,1,4);
|
|
|
}
|
|
|
- if (Gate::allows('订单管理-工单处理-承运商编辑')) {
|
|
|
- array_push($status,3,6);
|
|
|
+ if (Gate::allows('订单管理-工单处理-货主编辑')){
|
|
|
+ array_push($status,1,2,3,4,6);
|
|
|
}
|
|
|
- if (Gate::allows('订单管理-工单处理-货主编辑')) {
|
|
|
- array_push($status,2);
|
|
|
+ if (Gate::allows('订单管理-工单处理-承运商编辑')){
|
|
|
+ array_push($status,1,2,3,4,6);
|
|
|
}
|
|
|
+
|
|
|
if (!isset($this->params['is_end'])) {
|
|
|
$this->queryBuilder->where('status', '!=', 5); // 过滤已完成
|
|
|
} else {
|
|
|
array_push($status,5);
|
|
|
}
|
|
|
+
|
|
|
$this->queryBuilder->whereIn('status',$status);
|
|
|
}
|
|
|
|
|
|
@@ -279,11 +282,11 @@ class WorkOrderFilters
|
|
|
public function status($status){
|
|
|
$status_list = [];
|
|
|
if ($status == '承运商处理'){
|
|
|
- array_push($status_list,3,6);
|
|
|
+ array_push($status_list,3);
|
|
|
} elseif ($status == '宝时处理') {
|
|
|
array_push($status_list,4,1);
|
|
|
} elseif ($status == '货主处理'){
|
|
|
- array_push($status_list,2);
|
|
|
+ array_push($status_list,2,6);
|
|
|
}
|
|
|
$this->queryBuilder->whereIn('status',$status_list);
|
|
|
}
|