|
|
@@ -27,6 +27,12 @@ class ReturnWorkLists extends BaseWorkerDataLists implements ListsSearchInterfac
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+ public function querySearch(): array
|
|
|
+ {
|
|
|
+ $where['master_worker_id'] = ['=',$this->userId];
|
|
|
+ return $where;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @notes 获取列表
|
|
|
@@ -40,6 +46,7 @@ class ReturnWorkLists extends BaseWorkerDataLists implements ListsSearchInterfac
|
|
|
public function lists(): array
|
|
|
{
|
|
|
return ReturnWork::where($this->searchWhere)
|
|
|
+ ->where($this->querySearch())
|
|
|
->field(['id', 'work_sn', 'service_work_id', 'issue_work_id', 'return_work_status', 'dispatch_time', 'appointment_time', 'finished_images', 'finished_time', 'master_worker_id', 'create_time', 'update_time'])
|
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
|
->order(['id' => 'desc'])
|
|
|
@@ -56,7 +63,7 @@ class ReturnWorkLists extends BaseWorkerDataLists implements ListsSearchInterfac
|
|
|
*/
|
|
|
public function count(): int
|
|
|
{
|
|
|
- return ReturnWork::where($this->searchWhere)->count();
|
|
|
+ return ReturnWork::where($this->searchWhere)->where($this->querySearch())->count();
|
|
|
}
|
|
|
|
|
|
}
|