不检验也可入库

This commit is contained in:
caoqianming 2021-11-24 10:56:42 +08:00
parent 277a1419b6
commit 0ddb860f20
2 changed files with 5 additions and 5 deletions

View File

@ -149,9 +149,9 @@ class FIFOViewSet(ListModelMixin, GenericViewSet):
审核通过 审核通过
""" """
obj = self.get_object() obj = self.get_object()
for i in FIFOItem.objects.filter(fifo=obj): # for i in FIFOItem.objects.filter(fifo=obj):
if not i.is_testok: # if not i.is_testok:
raise APIException('未检验通过, 不可审核') # raise APIException('未检验通过, 不可审核')
if obj.is_audited: if obj.is_audited:
raise APIException('该入库记录已审核通过') raise APIException('该入库记录已审核通过')
with transaction.atomic(): with transaction.atomic():

View File

@ -92,8 +92,8 @@ class PickSerializer(serializers.Serializer):
spp = SubProductionProgress.objects.get(material=i['material'], subproduction_plan=sp, type=SubprodctionMaterial.SUB_MA_TYPE_IN) spp = SubProductionProgress.objects.get(material=i['material'], subproduction_plan=sp, type=SubprodctionMaterial.SUB_MA_TYPE_IN)
spp.count_pick = spp.count_pick + i['count'] spp.count_pick = spp.count_pick + i['count']
spp.save() spp.save()
if spp.count_pick > spp.count: # if spp.count_pick > spp.count:
raise exceptions.APIException('超过计划需求数') # raise exceptions.APIException('超过计划需求数')
if isLowLevel: if isLowLevel:
# 更新半成品表 # 更新半成品表
wids = IProduct.objects.filter(pk__in=[x.id for x in iproducts]).values_list('wproduct', flat=True) wids = IProduct.objects.filter(pk__in=[x.id for x in iproducts]).values_list('wproduct', flat=True)