refactor(admin): 优化入库单确认流程
- 注释掉订单类型判断逻辑,统一入库单确认操作 - 移除不必要的 else 逻辑,简化代码结构
This commit is contained in:
parent
0ca77643f1
commit
9da7292a9e
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user