From 36016871daf87de78364f56c8e80654fbea408b2 Mon Sep 17 00:00:00 2001 From: lewis <604446095@qq.com> Date: Sat, 15 Feb 2025 14:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=A8=E5=BA=97=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lists/inventory_warehouse/InventoryWarehouseLists.php | 2 +- .../lists/warehouse_product/StoreWarehouseProductLists.php | 4 +++- app/admin/lists/warehouse_product/WarehouseProductLists.php | 2 +- app/common/model/beforehand_order/BeforehandOrder.php | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/admin/lists/inventory_warehouse/InventoryWarehouseLists.php b/app/admin/lists/inventory_warehouse/InventoryWarehouseLists.php index 201626785..d428c934e 100644 --- a/app/admin/lists/inventory_warehouse/InventoryWarehouseLists.php +++ b/app/admin/lists/inventory_warehouse/InventoryWarehouseLists.php @@ -27,7 +27,7 @@ class InventoryWarehouseLists extends BaseAdminDataLists implements ListsSearchI public function setSearch(): array { return [ - '=' => ['product_id'], + '=' => ['product_id', 'warehouse_id'], ]; } diff --git a/app/admin/lists/warehouse_product/StoreWarehouseProductLists.php b/app/admin/lists/warehouse_product/StoreWarehouseProductLists.php index c62e1aee4..fefdb4e9e 100644 --- a/app/admin/lists/warehouse_product/StoreWarehouseProductLists.php +++ b/app/admin/lists/warehouse_product/StoreWarehouseProductLists.php @@ -4,6 +4,7 @@ namespace app\admin\lists\warehouse_product; use app\admin\lists\BaseAdminDataLists; +use app\common\model\beforehand_order\BeforehandOrder; use app\common\model\warehouse_product\WarehouseProduct; use app\common\lists\ListsSearchInterface; use app\common\model\auth\Admin; @@ -65,7 +66,7 @@ class StoreWarehouseProductLists extends BaseAdminDataLists implements ListsSear $this->searchWhere[] = ['financial_pm', '=',0]; $this->searchWhere[] = ['order_type', 'in',[1, 2, 3, 4, 8]]; return WarehouseProduct::where($this->searchWhere) - ->field(['id', 'admin_id', 'store_id','product_id', 'nums', 'refund_nums', 'status', 'mark', 'create_time',]) + ->field(['id', 'admin_id', 'store_id','product_id', 'nums', 'refund_nums', 'status', 'mark', 'create_time', 'order_type']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) // ->withTrashed() @@ -96,6 +97,7 @@ class StoreWarehouseProductLists extends BaseAdminDataLists implements ListsSear $item->unit_name = StoreProductUnit::where('id', $find->unit)->value('name'); } } + $item->order_type_name = BeforehandOrder::getOrderTypeName($item->order_type); }) ->toArray(); } diff --git a/app/admin/lists/warehouse_product/WarehouseProductLists.php b/app/admin/lists/warehouse_product/WarehouseProductLists.php index 20c42fcbd..1c637e7ca 100644 --- a/app/admin/lists/warehouse_product/WarehouseProductLists.php +++ b/app/admin/lists/warehouse_product/WarehouseProductLists.php @@ -73,7 +73,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt } } return WarehouseProduct::where($this->searchWhere) - ->field(['id', 'code','pay_type','oid','admin_id','supplier_id', 'store_id', 'warehouse_id', 'product_id', 'financial_pm', 'batch', 'nums', 'price', 'purchase', 'cost', 'total_price', 'manufacture', 'expiration_date', 'status', 'mark', 'create_time','is_pay']) + ->field(['id', 'code','pay_type','oid','admin_id','supplier_id', 'store_id', 'warehouse_id', 'product_id', 'financial_pm', 'batch', 'nums', 'price', 'purchase', 'cost', 'total_price', 'manufacture', 'expiration_date', 'status', 'mark', 'create_time','is_pay', 'order_type']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) // ->withTrashed() diff --git a/app/common/model/beforehand_order/BeforehandOrder.php b/app/common/model/beforehand_order/BeforehandOrder.php index 1ec1322f3..f709fccac 100644 --- a/app/common/model/beforehand_order/BeforehandOrder.php +++ b/app/common/model/beforehand_order/BeforehandOrder.php @@ -29,8 +29,10 @@ class BeforehandOrder extends BaseModel 3 => '一条龙订单', 4 => '线上订单', 5 => '仓库补货', - 6 => '采购订单', - 7 => '其他订单', + 6 => '往期补单', + 7 => '采购订单', + 8 => '其他订单', + 9 => '往期补单', ]; return $typeMap[$type] ?? ''; }