feat: 车间领料时完善提示添加物料名

This commit is contained in:
caoqianming 2025-09-26 09:10:59 +08:00
parent 2445ae53f1
commit c434c76605
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ def do_out(item: MIOItem):
raise ParseError(f"批次错误!{e}") raise ParseError(f"批次错误!{e}")
mb.count = mb.count - xcount mb.count = mb.count - xcount
if mb.count < 0: if mb.count < 0:
raise ParseError(f"{mb.batch}-批次库存不足,操作失败") raise ParseError(f"{mb.batch}-{str(mb.material)}-批次库存不足,操作失败")
else: else:
mb.save() mb.save()
@ -440,7 +440,7 @@ class InmService:
elif in_or_out == -1: elif in_or_out == -1:
mb.count = mb.count - change_count mb.count = mb.count - change_count
if mb.count < 0: if mb.count < 0:
raise ParseError(f"{mb.batch}-批次库存不足,操作失败") raise ParseError(f"{mb.batch}-{str(mb.material)}-批次库存不足,操作失败")
else: else:
mb.save() mb.save()
if tracking == Material.MA_TRACKING_SINGLE: if tracking == Material.MA_TRACKING_SINGLE: