Merge pull request 'dev' (#429) from dev into main
Reviewed-on: https://gitea.lihaink.cn/mkm/multi-store/pulls/429
This commit is contained in:
commit
cb90aafd60
@ -92,6 +92,15 @@ class SystemStoreStorageLogic extends BaseLogic
|
||||
}
|
||||
}
|
||||
|
||||
public static function editAll(array $params): bool
|
||||
{
|
||||
$list = SystemStoreStorage::where(['store_id' => $params['store_id'], 'status' => 0])->column('id');
|
||||
foreach ($list as $item) {
|
||||
$params['id'] = $item;
|
||||
self::edit($params);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除门店入库记录
|
||||
|
@ -205,7 +205,7 @@ class WarehouseProductLogic extends BaseLogic
|
||||
try {
|
||||
$find = WarehouseOrder::where('id', $params['oid'])->find();
|
||||
if ($find) {
|
||||
$res = WarehouseProduct::where('id', $params['id'])->find();
|
||||
$res = WarehouseProduct::where('id', $params['id'])->withTrashed()->find();
|
||||
self::decStock($res);
|
||||
self::incStock($res, $params);
|
||||
$datas = [
|
||||
|
@ -42,5 +42,11 @@ class SystemStoreStorageController extends BaseAdminController
|
||||
return $this->success('操作成功');
|
||||
}
|
||||
|
||||
public function editAll()
|
||||
{
|
||||
$storeId = $this->request->adminInfo['store_id'] ?? 0;
|
||||
SystemStoreStorageLogic::editAll(['staff_id'=>$this->adminId,'admin_id'=>0, 'store_id'=>$storeId]);
|
||||
return $this->success('操作成功');
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user