领料bug
This commit is contained in:
parent
9bf2e94b53
commit
c0d8772a47
|
@ -57,7 +57,7 @@ class PickSerializer(serializers.Serializer):
|
|||
i['count'] = len(i['iproducts'])
|
||||
isLowLevel = True
|
||||
if i['count']>0:
|
||||
if 'iproducts' in i:
|
||||
if isLowLevel:
|
||||
iproducts = i.pop('iproducts')
|
||||
i['fifo'] = fifo
|
||||
i['is_testok'] = True # 默认检测合格
|
||||
|
@ -91,6 +91,7 @@ class PickSerializer(serializers.Serializer):
|
|||
spp.save()
|
||||
if spp.count_pick > spp.count:
|
||||
raise exceptions.APIException('超过计划需求数')
|
||||
if isLowLevel:
|
||||
# 更新半成品表
|
||||
wproducts = WProduct.objects.filter(pk__in=[x.wproduct for x in i['iproducts']])
|
||||
first_step = Step.objects.get(pk=sp.steps[0].id)
|
||||
|
|
Loading…
Reference in New Issue