Browse Source

返修工单列表

whitefang 1 năm trước cách đây
mục cha
commit
237be36a28

+ 4 - 1
app/workerapi/lists/ReturnWorkLists.php

@@ -45,7 +45,10 @@ class ReturnWorkLists extends BaseWorkerDataLists implements ListsSearchInterfac
      */
      */
     public function lists(): array
     public function lists(): array
     {
     {
-        return ReturnWork::where($this->searchWhere)
+        return ReturnWork::with(['service_work'=>function ($query) {
+            $query->field(['id', 'work_sn', 'address', 'title', 'work_status', 'service_status', 'work_pay_status','appointment_time','receive_time','base_service_fee','service_fee'])->append(['work_status_text','service_status_text']);
+        }])
+        ->where($this->searchWhere)
             ->where($this->querySearch())
             ->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'])
             ->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)
             ->limit($this->limitOffset, $this->limitLength)