diff --git a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php index bae45256..a4d78e86 100644 --- a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php +++ b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php @@ -105,15 +105,16 @@ class PurchaseProductOfferLogic extends BaseLogic 'buyer_nums' => $params['buyer_nums'], 'supplier_id' => $params['supplier_id'], 'price' => $params['purchase'], + 'outbound_price' => $params['outbound_price'], 'total_price' => $params['total_price'], ]); - $find=BeforehandOrderCartInfo::where(['bhoid'=>$params['bhoid'],'product_id'=>$offer['product_id']])->find(); - if($find){ - $find->purchase=$params['purchase']; - $find->total_price=bcmul($find['cart_num'],$params['price'],2); - $find->price=$params['price']; - $find->save(); - } + // $find=BeforehandOrderCartInfo::where(['bhoid'=>$params['bhoid'],'product_id'=>$offer['product_id']])->find(); + // if($find){ + // $find->purchase=$params['purchase']; + // $find->total_price=bcmul($find['cart_num'],$params['price'],2); + // $find->price=$params['price']; + // $find->save(); + // } Db::commit(); return true; } catch (\Throwable $e) { diff --git a/app/api/controller/purchase_product_offer/PurchaseProductOfferController.php b/app/api/controller/purchase_product_offer/PurchaseProductOfferController.php index 658a806f..d6df678f 100644 --- a/app/api/controller/purchase_product_offer/PurchaseProductOfferController.php +++ b/app/api/controller/purchase_product_offer/PurchaseProductOfferController.php @@ -29,11 +29,15 @@ class PurchaseProductOfferController extends BaseApiController return $this->dataLists(new PurchaseProductOfferLists()); } + /** + * 提交采购信息 + */ public function offer_update(){ $params=$this->request->post(); $data=[ 'buyer_nums'=>$params['nums'], 'price'=>$params['price'], + 'outbound_price'=>$params['outbound_price'], 'total_price'=>$params['total_price'], 'buyer_confirm'=>1, ]; @@ -43,6 +47,18 @@ class PurchaseProductOfferController extends BaseApiController }else{ return $this->fail('提交失败'); } - } + + /** + * 出库上浮比例列表 + */ + public function outbound_floating_lv(){ + $data[]=[ + ['name'=>'干货/5','value'=>0.05], + ['name'=>'鲜货/15','value'=>0.15], + ['name'=>'粮油/5','value'=>0.05], + ]; + return $this->success('ok',$data); + } + } \ No newline at end of file