From d5a9066616135321c69e82c3925e97723e921ace Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 16 Oct 2024 09:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=85=A5=E5=BA=93=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改了采购产品报价的查询条件,从 'buyer_nums' 更改为 'buyer_confirm' - 增加了商品采购信息设置的提示信息 - 调整了仓储ID检查的位置,提高了代码逻辑清晰度 --- .../BeforehandOrderCartInfoLogic.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php index 0259c9ff5..be9419832 100644 --- a/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php +++ b/app/admin/logic/beforehand_order_cart_info/BeforehandOrderCartInfoLogic.php @@ -127,10 +127,13 @@ class BeforehandOrderCartInfoLogic extends BaseLogic if($params['bhoid']<=0){ throw new BusinessException('参数错误'); } - $count = PurchaseProductOffer::where(['order_id' => $params['bhoid'], 'is_storage' => 0, 'buyer_nums' => 0])->count('id'); + $count = PurchaseProductOffer::where(['order_id' => $params['bhoid'], 'buyer_confirm' => 0])->count('id'); $beforehandOrder = BeforehandOrder::where('id', $params['bhoid'])->field('order_type,warehousing_id')->find(); - if ($count > 0 || $beforehandOrder['warehousing_id'] > 0) { + if ($count > 0) { + throw new BusinessException('还有商品正在采购中,请先设置采购信息在入库'); + } + if ($beforehandOrder['warehousing_id'] > 0) { throw new BusinessException('请勿重复入库'); } $offer_list = PurchaseProductOffer::where(['order_id' => $params['bhoid'], 'is_storage' => 0])->select();