From 7ac3de3449a92a2c8af6ac647b67404d7d4da78e Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Wed, 23 Mar 2022 15:01:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=94=AE=E5=90=8E=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Forms/AfterSaleVerify.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Admin/Forms/AfterSaleVerify.php b/app/Admin/Forms/AfterSaleVerify.php index 59bf902c..046d8c46 100644 --- a/app/Admin/Forms/AfterSaleVerify.php +++ b/app/Admin/Forms/AfterSaleVerify.php @@ -60,8 +60,8 @@ class AfterSaleVerify extends Form implements LazyRenderable throw new BizException('退款金额不能大于商品实付金额'); } } - $num = (int) Arr::get($input, 'num', 0) ?: $afterSale->num ; - if($num > $afterSale->num){ + $num = (int) Arr::get($input, 'num', 0) ?: $afterSale->num; + if ($num > $afterSale->orderProduct->quantity) { throw new BizException('调整数量不能大于下单数量'); } $afterSaleService->verify($afterSale, $input['remarks3'], (int) Arr::get($input, 'amount', 0), $num);