feat: mlogbin时从单个拆分为多个批次2

This commit is contained in:
caoqianming 2025-03-10 16:03:50 +08:00
parent 85cc38c842
commit 8f46507a6b
1 changed files with 1 additions and 3 deletions

View File

@ -589,8 +589,6 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
if mlogbin.count_use == wm_in.count: # 自动创建mlogbw if mlogbin.count_use == wm_in.count: # 自动创建mlogbw
for wpr in Wpr.objects.filter(wm=wm_in).order_by("number"): for wpr in Wpr.objects.filter(wm=wm_in).order_by("number"):
Mlogbw.objects.get_or_create(wpr=wpr, mlogb=mlogbin, defaults={"number": wpr.number}) Mlogbw.objects.get_or_create(wpr=wpr, mlogb=mlogbin, defaults={"number": wpr.number})
else:
raise ParseError("请提供消耗物料详细编号")
if qct is None and not (is_fix and mtype == Process.PRO_PROD): if qct is None and not (is_fix and mtype == Process.PRO_PROD):
mlog.qct = Qct.get(material_out, "process") mlog.qct = Qct.get(material_out, "process")