Merge pull request 'fix(admin): 修复已出库订单修改价格的问题' (#500) from dev into main
Reviewed-on: #500
This commit is contained in:
commit
4565edfe15
@ -320,7 +320,11 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
|
|||||||
|
|
||||||
public static function syncPrice($params)
|
public static function syncPrice($params)
|
||||||
{
|
{
|
||||||
$cartInfo = BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->where('price', 0)->select()->toArray();
|
$outbound_id=BeforehandOrder::where('id', $params['bhoid'])->value('outbound_id');
|
||||||
|
if($outbound_id>0){
|
||||||
|
throw new BusinessException('该订单已出库,不能修改');
|
||||||
|
}
|
||||||
|
$cartInfo = BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->select()->toArray();
|
||||||
$productIds = array_column($cartInfo, 'product_id');
|
$productIds = array_column($cartInfo, 'product_id');
|
||||||
$products = StoreProduct::whereIn('id', $productIds)->select()->toArray();
|
$products = StoreProduct::whereIn('id', $productIds)->select()->toArray();
|
||||||
$products = reset_index($products, 'id');
|
$products = reset_index($products, 'id');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user