cqpCow 2 سال پیش
والد
کامیت
e3d09e1d3f
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      app/Service/ProductionOrderService.php

+ 4 - 2
app/Service/ProductionOrderService.php

@@ -251,7 +251,7 @@ class ProductionOrderService extends Service
 
 
     public function productionExport($data){
     public function productionExport($data){
         $model = OrdersProduct::where('del_time',0)
         $model = OrdersProduct::where('del_time',0)
-            ->select('id','order_no','out_order_no','out_order_no_time','customer_no','customer_name','table_header_mark','product_no','product_title','product_size','product_unit','order_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','out_crt_man','out_checker_man','out_checker_time','production_quantity','production_time','production_no','status','sale_orders_product_id')
+            ->select('production_time', 'production_no', 'out_order_no_time','out_order_no','customer_no','customer_name','table_header_mark','product_no','product_title','product_size','product_unit','order_quantity','production_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','out_crt_man','sale_orders_product_id')
             ->orderBy('id','desc');
             ->orderBy('id','desc');
 
 
         if(! empty($data['order_no'])) $model->where('order_no', 'LIKE', '%'.$data['order_no'].'%');
         if(! empty($data['order_no'])) $model->where('order_no', 'LIKE', '%'.$data['order_no'].'%');
@@ -291,11 +291,13 @@ class ProductionOrderService extends Service
         $production_map = $this->getProductionOrderQuantity($sale_orders_product_id);
         $production_map = $this->getProductionOrderQuantity($sale_orders_product_id);
 
 
         date_default_timezone_set("PRC");
         date_default_timezone_set("PRC");
+
+        $exportFields = ['production_time', 'production_no', 'out_order_no_time','out_order_no','customer_no','customer_name','table_header_mark','product_no','product_title','product_size','product_unit','order_quantity','production_quantity','not_production','technology_material','technology_name','wood_name','process_mark','table_body_mark','out_crt_man']; // 指定要导出的字段
         foreach ($data as $key => $value){
         foreach ($data as $key => $value){
             $data[$key]['out_order_no_time'] = $value['out_order_no_time'] ? date('Y-m-d',$value['out_order_no_time']) : '';
             $data[$key]['out_order_no_time'] = $value['out_order_no_time'] ? date('Y-m-d',$value['out_order_no_time']) : '';
-            $data[$key]['out_checker_time'] = $value['out_checker_time'] ? date('Y-m-d',$value['out_checker_time']) : '';
             $data[$key]['production_time'] = $value['production_time'] ? date('Y-m-d',$value['production_time']) : '';
             $data[$key]['production_time'] = $value['production_time'] ? date('Y-m-d',$value['production_time']) : '';
             $data[$key]['not_production'] = $value['order_quantity'] - ($production_map[$value['sale_orders_product_id']] ?? 0);
             $data[$key]['not_production'] = $value['order_quantity'] - ($production_map[$value['sale_orders_product_id']] ?? 0);
+            unset($data[$key]['sale_orders_product_id']);
         }
         }
 
 
         return $data;
         return $data;