feat: 如果是主要输入物料且是主批次,才需生成输出2

This commit is contained in:
caoqianming 2025-01-07 13:23:55 +08:00
parent 0e428f6c9d
commit ccac1aea87
1 changed files with 2 additions and 1 deletions

View File

@ -524,7 +524,8 @@ class MlogChangeSerializer(CustomModelSerializer):
class MlogbInSerializer(CustomModelSerializer):
class Meta:
model = Mlogb
fields = ['id', 'mlog', 'mtask', 'wm_in', 'count_use', 'count_pn_jgqbl', 'count_break', 'note']
fields = ['id', 'mlog', 'mtask', 'wm_in', 'count_use', 'count_pn_jgqbl',
'count_break', 'note', "is_main_batchin"]
extra_kwargs = {'count_use': {'required': True}, 'mtask': {'required': True}, 'wm_in': {'required': True}}
def validate(self, attrs):