From 5eac4240fbd63ce306e737686f1340fa991fd7d9 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 15 Jul 2025 13:47:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=87=BA=E5=85=A5=E5=BA=93=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BC=BA=E5=B0=91=E6=98=8E=E7=BB=86=E4=B8=8D=E8=AE=A9?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/inm/services.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/inm/services.py b/apps/inm/services.py index 010ee51f..a4ac8fee 100644 --- a/apps/inm/services.py +++ b/apps/inm/services.py @@ -271,6 +271,9 @@ class InmService: """ 更新库存, 支持反向操作 """ + if not MIOItem.objects.filter(mio=instance).exists(): + raise ParseError("出入库记录缺失明细,无法操作") + if instance.type == MIO.MIO_TYPE_PUR_IN: # 需要更新订单 # 这里还需要对入厂检验进行处理 if is_reverse: