修改批量入库
This commit is contained in:
parent
e2014342bd
commit
c12a519bcd
@ -99,7 +99,8 @@ class SystemStoreStorageController extends BaseAdminController
|
|||||||
*/
|
*/
|
||||||
public function batchConfirm()
|
public function batchConfirm()
|
||||||
{
|
{
|
||||||
SystemStoreStorageLogic::editAll([], $this->adminId);
|
$params = $this->request->post();
|
||||||
|
SystemStoreStorageLogic::editAll($params, $this->adminId);
|
||||||
return $this->success('操作成功',[]);
|
return $this->success('操作成功',[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,7 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI
|
|||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'product_id' => '商品ID',
|
'product_id' => '商品ID',
|
||||||
|
'system_store_name' => '门店',
|
||||||
'store_name' => '商品名称',
|
'store_name' => '商品名称',
|
||||||
'store_info' => '规格',
|
'store_info' => '规格',
|
||||||
'unit_name' => '单位',
|
'unit_name' => '单位',
|
||||||
|
@ -96,9 +96,13 @@ class SystemStoreStorageLogic extends BaseLogic
|
|||||||
public static function editAll(array $params, $adminId = 0): bool
|
public static function editAll(array $params, $adminId = 0): bool
|
||||||
{
|
{
|
||||||
$where = ['status' => 0];
|
$where = ['status' => 0];
|
||||||
if (isset($params['store_id'])) {
|
if (!empty($params['store_id'])) {
|
||||||
$where['store_id'] = $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');
|
$list = SystemStoreStorage::where($where)->column('id');
|
||||||
foreach ($list as $item) {
|
foreach ($list as $item) {
|
||||||
$params['id'] = $item;
|
$params['id'] = $item;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user