diff --git a/app/store/controller/system_store_storage/SystemStoreStorageController.php b/app/store/controller/system_store_storage/SystemStoreStorageController.php index b910e9a4e..be3104922 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 c31918b02..bf3f6a857 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');