refactor(admin): 优化入库单确认流程

- 注释掉订单类型判断逻辑,统一入库单确认操作
- 移除不必要的 else 逻辑,简化代码结构
This commit is contained in:
mkm 2025-01-08 15:27:02 +08:00
parent 0ca77643f1
commit 9da7292a9e

View File

@ -65,7 +65,7 @@ class SystemStoreStorageLogic extends BaseLogic
try {
$find=SystemStoreStorage::where(['id' => $params['id']])->find();
if($find){
if($find['order_type']==1){
// if($find['order_type']==1){
$find->save(['status'=>1,'staff_id'=>$params['staff_id']??0,'admin_id'=>$params['admin_id']??0,'mark'=>'入库时间:'.date('Y-m-d H:i:s',time())]);
$branch_product=StoreBranchProduct::where(['product_id'=>$find['product_id'],'store_id'=>$find['store_id']])->find();
if($branch_product){
@ -79,9 +79,9 @@ class SystemStoreStorageLogic extends BaseLogic
$storeBranchProduct->save();
SqlChannelLog('StoreBranchProduct', $storeBranchProduct['id'], $find['nums'], 1,Request()->url(),$admin_id);
}
}else{
$find->save(['status'=>1,'staff_id'=>$params['staff_id']??0,'admin_id'=>$params['admin_id']??0,'mark'=>'确认时间:'.date('Y-m-d H:i:s',time())]);
}
// }else{
// $find->save(['status'=>1,'staff_id'=>$params['staff_id']??0,'admin_id'=>$params['admin_id']??0,'mark'=>'确认时间:'.date('Y-m-d H:i:s',time())]);
// }
}
Db::commit();