From 195d71519b65b1068334700bacc13d8891744b27 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 20 Dec 2024 10:28:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(beforehand=5Forder):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=84=E6=A0=87=E9=A2=98=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=AE=A2=E5=8D=95=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在订单导出时添加用户组标题字段 - 优化订单数据查询,增加 uid 字段 - 在 OrderSupplyOutbound 服务中添加用户组标题的导出 --- app/admin/lists/beforehand_order/BeforehandOrderLists.php | 4 ++-- app/admin/logic/beforehand_order/BeforehandOrderLogic.php | 5 +++++ app/common/service/xlsx/OrderSupplyOutbound.php | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/admin/lists/beforehand_order/BeforehandOrderLists.php b/app/admin/lists/beforehand_order/BeforehandOrderLists.php index 9b2e84200..d4a90faa2 100644 --- a/app/admin/lists/beforehand_order/BeforehandOrderLists.php +++ b/app/admin/lists/beforehand_order/BeforehandOrderLists.php @@ -81,9 +81,9 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte $oid=WarehouseOrder::where('financial_pm',0)->where('code','like','%'.$order_ck)->column('id'); $this->searchWhere[] = ['outbound_id','in',$oid]; } - $file=['id', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file']; + $file=['id','uid', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file']; if($export==2){ - $file=['id', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file','other_data']; + $file=['id','uid', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file','other_data']; } return BeforehandOrder::where($this->searchWhere) ->field($file) diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index a3fa8edd9..455d9a580 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -22,6 +22,7 @@ use app\common\model\store_product_unit\StoreProductUnit; use app\common\model\system_store\SystemStore; use app\common\model\user\User; use app\common\model\user\UserAddress; +use app\common\model\user_ship\UserShip; use app\common\model\warehouse_order\WarehouseOrder; use app\common\model\warehouse_product\WarehouseProduct; use app\common\model\warehouse_product_return\WarehouseProductReturn; @@ -893,6 +894,10 @@ class BeforehandOrderLogic extends BaseLogic $order['pay_price'] = $pay_price; $order['total_profit'] = $total_profit; $order['total_price'] = $total_price; + $order['group_title'] = ''; + if($user_ship){ + $order['group_title'] = UserShip::where('id',$user_ship)->value('title'); + } $file_path = $order_info->export($data, $order, $other_data, 2); return $file_path; } diff --git a/app/common/service/xlsx/OrderSupplyOutbound.php b/app/common/service/xlsx/OrderSupplyOutbound.php index 52d8f1db6..fbd6fa44d 100644 --- a/app/common/service/xlsx/OrderSupplyOutbound.php +++ b/app/common/service/xlsx/OrderSupplyOutbound.php @@ -83,6 +83,8 @@ class OrderSupplyOutbound $sheet->setCellValue('A' . ($count + 4),'合计'); $sheet->setCellValue('B' . ($count + 4),$count); + $sheet->setCellValue('J' . ($count + 4),$order['group_title']??''); + $sheet->setCellValue('A' . ($count + 5),'累计接单:'); $sheet->setCellValue('C' . ($count + 5),'预收金额:'); $sheet->setCellValue('D' . ($count + 5),0);