diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index c9d9798cc..ba046d907 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -303,6 +303,10 @@ class BeforehandOrderLogic extends BaseLogic throw new BusinessException('该订单已创建出库单'); } $info = BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->select(); + $count = BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->where('cart_num',0)->count('id'); + if($count > 0){ + throw new BusinessException('订单中有数量为0的商品,请先处理'); + } Db::startTrans(); try { $arr = [