fix: 日志多步骤导致的返工填写bug2
This commit is contained in:
parent
433218feed
commit
1e128041cd
|
@ -740,6 +740,8 @@ class MlogbInSerializer(CustomModelSerializer):
|
|||
route = attrs.get("route", None)
|
||||
if not route:
|
||||
raise ParseError("缺少工艺步骤")
|
||||
else:
|
||||
attrs["route"] = route
|
||||
else:
|
||||
route = mlog_route
|
||||
attrs["route"] = route
|
||||
|
|
|
@ -601,7 +601,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
|||
if material_out is None:
|
||||
raise ParseError('产物不可为空')
|
||||
# 如果是主要输入物料且是主批次,才需生成输出
|
||||
if route and route.material_in != material_in or mlogbin.parent is not None:
|
||||
if is_fix is False and route and route.material_in != material_in or mlogbin.parent is not None:
|
||||
return
|
||||
|
||||
wm_in: WMaterial = mlogbin.wm_in
|
||||
|
|
Loading…
Reference in New Issue