子工序操作bug
This commit is contained in:
parent
b09b3996ac
commit
6aa30e9c6a
|
@ -186,6 +186,11 @@ class WpmTestRecordCreateSerializer(serializers.ModelSerializer):
|
|||
class Meta:
|
||||
model = TestRecord
|
||||
fields = ['form', 'record_data', 'is_testok', 'wproduct']
|
||||
|
||||
class WproductPutin(serializers.Serializer):
|
||||
"""
|
||||
半成品入库序列化
|
||||
"""
|
||||
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ class DoFormInit(CreateAPIView, GenericAPIView):
|
|||
# ret_0['subproduction_plan'] = data['subproduction_plan']
|
||||
if 'wproducts' in data and data['wproducts']:
|
||||
ret_0['wproducts'] = data['wproducts']
|
||||
splans = WProduct.objects.filter(id__in=data['wproducts']).values('subproduction_plan', flat=True)
|
||||
splans = WProduct.objects.filter(id__in=data['wproducts']).values_list('subproduction_plan', flat=True)
|
||||
# 调出所属子计划现有物料
|
||||
ret_0['input'] = WMaterialListSerializer(instance=WMaterial.objects.filter(subproduction_plan__in=splans), many=True).data
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue