From a8e0cd003a23e4f6310fccd53904c50745a3dc9b Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 20 Jun 2024 17:43:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(system=5Fstore=5Fstorage):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=B9=E6=8D=AE=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system_store_storage/SystemStoreStorageController.php | 1 + .../lists/system_store_storage/SystemStoreStorageLists.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/store/controller/system_store_storage/SystemStoreStorageController.php b/app/store/controller/system_store_storage/SystemStoreStorageController.php index b910e9a4..be310492 100644 --- a/app/store/controller/system_store_storage/SystemStoreStorageController.php +++ b/app/store/controller/system_store_storage/SystemStoreStorageController.php @@ -28,6 +28,7 @@ class SystemStoreStorageController extends BaseAdminController // ] public function lists() { + $this->request->__set('status',-1); return $this->dataLists(new SystemStoreStorageLists()); } diff --git a/app/store/lists/system_store_storage/SystemStoreStorageLists.php b/app/store/lists/system_store_storage/SystemStoreStorageLists.php index c31918b0..bf3f6a85 100644 --- a/app/store/lists/system_store_storage/SystemStoreStorageLists.php +++ b/app/store/lists/system_store_storage/SystemStoreStorageLists.php @@ -46,10 +46,13 @@ class SystemStoreStorageLists extends BaseAdminDataLists implements ListsSearchI public function lists(): array { $this->searchWhere[] = ['store_id','=',$this->adminInfo['store_id']];//只显示当前门店的入库记录 + if($this->request->__get('status')==-1){ + $this->searchWhere[] = ['status','>',0]; + } return SystemStoreStorage::where($this->searchWhere) ->field(['id', 'store_id', 'admin_id', 'staff_id', 'product_id', 'nums','mark', 'status']) ->limit($this->limitOffset, $this->limitLength) - ->order(['id' => 'desc']) + ->order(['status' => 'aes']) ->select()->each(function ($item) { $item['system_store_name'] = SystemStore::where('id', $item['store_id'])->value('name'); $item['admin_name'] = Admin::where('id', $item['admin_id'])->value('name');