wugg hace 1 año
padre
commit
a91f65add3
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      app/admin/model/OrderOutChild.php

+ 1 - 0
app/admin/model/OrderOutChild.php

@@ -21,6 +21,7 @@ class OrderOutChild extends Model
         if ($outCode == '') throw new \Exception("工单发货单单号不能为空");
         $out = self::name("order_out")->where(["outCode" => $outCode, "is_del" => 0])->findOrEmpty();
         if ($out->isEmpty()) throw new \Exception("发货单信息未找到");
+        if($out['send_num']<=0) throw new \Exception("发货单{$outCode}发货数量不能小于1");
         if ($out['send_status'] != 1) throw new \Exception("发货单拆单状态有误");
         $sale = self::name("sale")->where(["orderCode" => $out['orderCode'], "is_del" => 0])->findOrEmpty();
         if ($sale->isEmpty()) throw new \Exception("订单信息未找到");