This commit is contained in:
liu 2024-06-20 17:45:49 +08:00
commit 1a952e4c57
2 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ class SystemStoreStorageController extends BaseAdminController
// ]
public function lists()
{
$this->request->__set('status',-1);
return $this->dataLists(new SystemStoreStorageLists());
}

View File

@ -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');