|
@@ -7,6 +7,8 @@ namespace App\Service\Box;
|
|
|
use App\Model\Box;
|
|
|
use App\Model\BoxDetail;
|
|
|
use App\Model\Header_ext;
|
|
|
+use App\Model\Orders;
|
|
|
+use App\Model\OrdersProduct;
|
|
|
use App\Service\Service;
|
|
|
|
|
|
/**
|
|
@@ -151,9 +153,28 @@ class BoxHookService extends Service
|
|
|
public function boxDetail($data){
|
|
|
$box = new Box();
|
|
|
if(!isset($data['id'])) return [false,'id not found'];
|
|
|
- $list = $box->where('top_id',$data['id'])->get()->toArray();
|
|
|
-
|
|
|
- return [true,$list];
|
|
|
+ $model = OrdersProduct::where('del_time',0)->wherein('sale_orders_product_id',$data['id'])
|
|
|
+ ->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')
|
|
|
+ ->orderBy('id','desc')->get()->toArray();
|
|
|
+
|
|
|
+ $data = [
|
|
|
+ [
|
|
|
+ 'id' => 1,
|
|
|
+ 'out_order_no' => '销售订单号',
|
|
|
+ 'production_time' => '下生产时间时间戳',
|
|
|
+ 'customer_no' => '客户编码',
|
|
|
+ 'customer_name' => '客户名称',
|
|
|
+ 'product_no' => '产品编码',
|
|
|
+ 'product_title' => '产品名称',
|
|
|
+ 'product_size' => '产品规格',
|
|
|
+ 'type' => '1生产包装2备用包装',
|
|
|
+ 'is_box_num' => '已包装数量',
|
|
|
+ 'un_box_num' => '未包装',
|
|
|
+ 'sale_num' => '销售数量',
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+
|
|
|
+ return [true,$data];
|
|
|
|
|
|
}
|
|
|
|