diff --git a/app/admin/controller/system_store_storage/SystemStoreStorageController.php b/app/admin/controller/system_store_storage/SystemStoreStorageController.php index a243014d4..c584b8c19 100644 --- a/app/admin/controller/system_store_storage/SystemStoreStorageController.php +++ b/app/admin/controller/system_store_storage/SystemStoreStorageController.php @@ -99,7 +99,8 @@ class SystemStoreStorageController extends BaseAdminController */ public function batchConfirm() { - SystemStoreStorageLogic::editAll([], $this->adminId); + $params = $this->request->post(); + SystemStoreStorageLogic::editAll($params, $this->adminId); return $this->success('操作成功',[]); } diff --git a/app/admin/lists/store_branch_product/StoreBranchProductLists.php b/app/admin/lists/store_branch_product/StoreBranchProductLists.php index adf157c90..906db345e 100644 --- a/app/admin/lists/store_branch_product/StoreBranchProductLists.php +++ b/app/admin/lists/store_branch_product/StoreBranchProductLists.php @@ -152,6 +152,7 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI { $data = [ 'product_id' => '商品ID', + 'system_store_name' => '门店', 'store_name' => '商品名称', 'store_info' => '规格', 'unit_name' => '单位', diff --git a/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php b/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php index a98d38016..3ee63283c 100644 --- a/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php +++ b/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php @@ -96,9 +96,13 @@ class SystemStoreStorageLogic extends BaseLogic public static function editAll(array $params, $adminId = 0): bool { $where = ['status' => 0]; - if (isset($params['store_id'])) { + if (!empty($params['store_id'])) { $where['store_id'] = $params['store_id']; } + if (!empty($params['product_name'])) { + $productIds = StoreProduct::where('store_name', 'like', '%' . $params['product_name'] . '%')->column('id'); + $where[] = ['product_id', 'in', $productIds]; + } $list = SystemStoreStorage::where($where)->column('id'); foreach ($list as $item) { $params['id'] = $item;