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