From 391e4082a67045d388c8a552f38e26fecb04697a Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Wed, 23 Mar 2022 14:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=8E=E5=8F=B0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E5=94=AE=E5=90=8E=E8=B0=83=E6=95=B4=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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Admin/Forms/AfterSaleVerify.php b/app/Admin/Forms/AfterSaleVerify.php index 0551ddf1..59bf902c 100644 --- a/app/Admin/Forms/AfterSaleVerify.php +++ b/app/Admin/Forms/AfterSaleVerify.php @@ -60,7 +60,11 @@ class AfterSaleVerify extends Form implements LazyRenderable throw new BizException('退款金额不能大于商品实付金额'); } } - $afterSaleService->verify($afterSale, $input['remarks3'], (int) Arr::get($input, 'amount', 0), (int) Arr::get($input, 'num', 0) ?: $afterSale->num); + $num = (int) Arr::get($input, 'num', 0) ?: $afterSale->num ; + if($num > $afterSale->num){ + throw new BizException('调整数量不能大于下单数量'); + } + $afterSaleService->verify($afterSale, $input['remarks3'], (int) Arr::get($input, 'amount', 0), $num); } elseif ($input['state'] == 1) {//需要补充资料 $afterSaleService->backApply($afterSale, $input['remarks1']); }