fix: 返工校验输入物料选择错误
This commit is contained in:
parent
84380931fd
commit
439bfeb7d6
|
@ -703,6 +703,8 @@ class MlogbInSerializer(CustomModelSerializer):
|
|||
raise ParseError("请选择相应车间库存!")
|
||||
if is_fix: # 返修或复检
|
||||
if wm_in.state in [WMaterial.WM_REPAIR, WMaterial.WM_NOTOK]:
|
||||
pass
|
||||
else:
|
||||
raise ParseError('返修或复检需使用返修品/不合格品')
|
||||
elif wm_in.state != WMaterial.WM_OK:
|
||||
raise ParseError('非合格品不可使用')
|
||||
|
|
|
@ -583,7 +583,7 @@ class MlogbInViewSet(CreateModelMixin, UpdateModelMixin, DestroyModelMixin, Cust
|
|||
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})
|
||||
|
||||
if qct is None and not (is_fix and mtype == Process.PRO_PROD):
|
||||
if qct is None:
|
||||
mlog.qct = Qct.get(material_out, "process")
|
||||
mlog.save(update_fields = ["qct"])
|
||||
|
||||
|
|
Loading…
Reference in New Issue