From 3976af97f1a177b5a3dc7fdc5f3ec5e87280d076 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 18 Apr 2025 13:47:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(admin):=20=E4=BB=93=E5=BA=93=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加了根据分类 ID 进行搜索的功能 - 如果请求中包含 'class_all' 参数,则在查询中加入相应的条件 - 通过 StoreProduct 模型获取符合条件的产品 ID 列表 - 如果没有符合条件的产品,则返回空数组 --- .../WarehouseProductStoregeLists.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/admin/lists/warehouse_product_storege/WarehouseProductStoregeLists.php b/app/admin/lists/warehouse_product_storege/WarehouseProductStoregeLists.php index e7f2c6932..ef9841873 100644 --- a/app/admin/lists/warehouse_product_storege/WarehouseProductStoregeLists.php +++ b/app/admin/lists/warehouse_product_storege/WarehouseProductStoregeLists.php @@ -88,6 +88,16 @@ class WarehouseProductStoregeLists extends BaseAdminDataLists implements ListsSe return []; } } + if($this->request->get('class_all')){ + $where[] = ['top_cate_id', 'in', $this->request->get('class_all')]; + } + $ids = StoreProduct::where($where)->column('id'); + if ($ids) { + $this->searchWhere[] = ['product_id', 'in', $ids]; + $this->ids = $ids; + } else { + return []; + } return WarehouseProductStorege::where($this->searchWhere) ->field(['id','is_verify','warehouse_id', 'product_id', 'nums', 'price', 'total_price', 'status']) ->limit($this->limitOffset, $this->limitLength) From b9e34a94d95491a9d8c2d718e1440bfd119b2d8d Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 18 Apr 2025 15:19:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor(xlsx):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BE=9B=E8=B4=A7=E5=87=BA=E5=BA=93=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E5=88=97=E6=A0=87=E9=A2=98=E5=92=8C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A1=AB=E5=85=85=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将"出库单价"、"出库总价"、"供货价"、"供货总价"等列 --- .../service/xlsx/OrderSupplyOutbound.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/common/service/xlsx/OrderSupplyOutbound.php b/app/common/service/xlsx/OrderSupplyOutbound.php index 1844a2d75..cdbd21ff5 100644 --- a/app/common/service/xlsx/OrderSupplyOutbound.php +++ b/app/common/service/xlsx/OrderSupplyOutbound.php @@ -48,10 +48,10 @@ class OrderSupplyOutbound $sheet->setCellValue('B3', '品名'); $sheet->setCellValue('C3', '单位'); $sheet->setCellValue('D3', '数量'); - $sheet->setCellValue('E3', '出库单价'); - $sheet->setCellValue('F3', '出库总价'); - $sheet->setCellValue('G3', '供货价'); - $sheet->setCellValue('H3', '供货总价'); + $sheet->setCellValue('E3', '进货单价'); + $sheet->setCellValue('F3', '进货总价'); + $sheet->setCellValue('G3', '零售单价'); + $sheet->setCellValue('H3', '零售总价'); $sheet->setCellValue('I3', '利润'); $sheet->setCellValue('J3', '备注'); @@ -71,10 +71,10 @@ class OrderSupplyOutbound $sheet->setCellValue('B' . ($k + 4), $v['store_name']); $sheet->setCellValue('C' . ($k + 4), $v['unit_name']); $sheet->setCellValue('D' . ($k + 4), $v['nums']); - $sheet->setCellValue('E' . ($k + 4), $v['price']); - $sheet->setCellValue('F' . ($k + 4), $v['total_price']); - $sheet->setCellValue('G' . ($k + 4), $v['purchase']); - $sheet->setCellValue('H' . ($k + 4), $v['pay_price']); + $sheet->setCellValue('E' . ($k + 4), $v['purchase']); + $sheet->setCellValue('F' . ($k + 4), $v['pay_price']); + $sheet->setCellValue('G' . ($k + 4), $v['price']); + $sheet->setCellValue('H' . ($k + 4), $v['total_price']); $sheet->setCellValue('I' . ($k + 4), $v['profit']); $sheet->mergeCells('J' . ($k + 4) . ':K' . $k + 4); $sheet->setCellValue('J' . ($k + 4), $v['mark']); @@ -84,7 +84,7 @@ class OrderSupplyOutbound $sheet->setCellValue('A' . ($count + 4),'合计'); $sheet->setCellValue('B' . ($count + 4),$count); - $sheet->setCellValue('J' . ($count + 4),$order['group_title']??''); + // $sheet->setCellValue('J' . ($count + 4),$order['group_title']??''); $sheet->setCellValue('A' . ($count + 5),'累计接单:'); $sheet->setCellValue('C' . ($count + 5),'预收金额:');