Selaa lähdekoodia

add - 工单明细导出

liugc 1 vuosi sitten
vanhempi
commit
3b1170de46
2 muutettua tiedostoa jossa 18 lisäystä ja 1 poistoa
  1. 17 1
      app/adminapi/lists/works/ServiceWorkLists.php
  2. 1 0
      config/export.php

+ 17 - 1
app/adminapi/lists/works/ServiceWorkLists.php

@@ -194,7 +194,7 @@ class ServiceWorkLists extends BaseAdminDataLists implements ListsSearchInterfac
             ->where($this->searchWhere)
             ->where($this->queryWhere())
             ->where($this->queryDataWhere())
-            ->field(['id', 'spare_total', 'work_total','work_sn', 'real_name', 'mobile', 'address', 'title', 'category_type', 'goods_category_ids', 'goods_category_id', 'base_service_fee', 'service_fee', 'work_status','work_pay_status', 'service_status', 'dispatch_time', 'receive_time', 'appointment_time', 'finished_images', 'finished_time', 'master_worker_id', 'work_amount', 'work_type', 'create_time', 'update_time','lon', 'lat','appoint_approval','refund_approval','finally_door_time','property_activity_id','order_effective_id','estimated_finish_time','third_type'])
+            ->field(['id', 'spare_total', 'work_total','work_sn', 'real_name', 'mobile', 'address', 'title', 'category_type', 'goods_category_ids', 'goods_category_id', 'base_service_fee', 'service_fee', 'work_status','work_pay_status', 'service_status', 'dispatch_time', 'receive_time', 'appointment_time', 'finished_images', 'finished_time', 'master_worker_id', 'work_amount', 'work_type', 'create_time', 'update_time','lon', 'lat','appoint_approval','refund_approval','finally_door_time','property_activity_id','order_effective_id','estimated_finish_time','third_type','area_name'])
             ->limit($this->limitOffset, $this->limitLength)
             ->order(['id' => 'desc'])
             ->select()
@@ -213,4 +213,20 @@ class ServiceWorkLists extends BaseAdminDataLists implements ListsSearchInterfac
         return ServiceWork::where($this->searchWhere)->where($this->queryWhere())->where($this->queryDataWhere())->count();
     }
 
+    public function setExcelComplexFields(): array
+    {
+        $zh_cn_fields = [
+            '客户名字','工单编号','下单时间','手机号','服务内容','工程师',
+            '工单状态','消费金额','订单来源','完成时间','城市','服务类别'
+        ];
+        $data_fields = [
+            'real_name','work_sn','create_time','mobile','title','master_worker_id',
+            'service_status','work_total','third_type','finished_time','area_name','category_type'
+        ];
+        return [
+            'zh_cn_fields' => $zh_cn_fields,
+            'data_fields' => $data_fields
+        ];
+    }
+
 }

+ 1 - 0
config/export.php

@@ -17,5 +17,6 @@ return [
         '2' =>  'master_worker.MasterWorkerServiceOrderLists',
         '8' =>  'property.PropertyHeadLists',
         '9' =>  'sale.SalePerformanceLists',
+        '10' =>  'works.ServiceWorkLists',
     ],
 ];