diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index 55f85fbb7..1a2c03045 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -180,17 +180,6 @@ class BeforehandOrderLogic extends BaseLogic $product = StoreProduct::where('id', $v['product_id'])->find(); $find = StoreProductLogic::ordinary($product, $params['store_id'], 0, $product); } - if (in_array($order['order_type'], [2, 3])) { - if (isset($v['purchase']) && $v['purchase'] > 0) { - $purchase = $v['purchase']; - } else { - $purchase = StoreProduct::where('id', $v['product_id'])->withTrashed()->value('purchase'); - $find['purchase'] = $purchase; - // $purchase = $v['price']; - } - $find->save(['price' => $v['price'], 'vip_price' => $v['price'], 'cost' => $v['price'], 'purchase' => $purchase]); - } - $cart_select[$k]['price'] = $v['price']; //判断如果采购价小于售价,则采购价等于售价 @@ -228,13 +217,10 @@ class BeforehandOrderLogic extends BaseLogic $cart_select[$k]['name'] = $find['store_name']; $cart_select[$k]['store_id'] = $params['store_id'] ?? 0; - $total_price = bcadd($total_price, $total_prices, 2); $pay_price = bcadd($pay_price, $total_prices, 2); $cost_price = bcadd($pay_price, $cart_select[$k]['total_purchase'], 2); } - $user = User::where('id', $params['user_id'])->find(); - $order_id = getNewOrderId('PF'); $code = rand(1, 10) . '-' . substr($order_id, -5);