From 308fa4c7ad454d3fb25c10b0df25d65b8b38021e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 5 Sep 2024 11:37:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=A5=E5=BA=9F=E4=BA=A4=E6=8E=A5?= =?UTF-8?q?=E6=97=B6=E5=9B=BA=E5=AE=9Arecive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index 1e464be5..3e81f6c2 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -20,7 +20,6 @@ from django.utils.timezone import localdate from apps.qm.models import NotOkOption from apps.wf.serializers import TicketSimpleSerializer - class OtherLogSerializer(CustomModelSerializer): class Meta: model = OtherLog @@ -602,6 +601,10 @@ class HandoverSerializer(CustomModelSerializer): raise ParseError(f'第{ind+1}物料不合格,不能进行正常/检验交接') if wm.count_xtest is not None: raise ParseError(f'第{ind+1}物料检验中,不能进行交接') + if attrs['type'] == Handover.H_SCRAP: + attrs['recive_mgroup'] = attrs['send_mgroup'] + attrs['recive_dept'] = attrs['send_dept'] + attrs['recive_user'] = attrs['send_user'] return attrs class Meta: