This commit is contained in:
commit
3dfaa774d8
|
@ -5808,7 +5808,12 @@ def apioperation(req):
|
|||
x['zyimg2'] = x['zyimg2'].split('?')
|
||||
else:
|
||||
x['zyimg2'] = []
|
||||
x['fxcs'] = [int(i) for i in x['fxcs'].split('?')]
|
||||
|
||||
x['fxcs'] = []
|
||||
for i in x['fxcs'].split('?'):
|
||||
if i:
|
||||
x['fxcs'].append(int(i))
|
||||
|
||||
x['fxcs_'] = list(Fxcs.objects.filter(
|
||||
id__in=x['fxcs']).values('id', 'fxfx', 'aqcs', 'cslx'))
|
||||
# 确认详情
|
||||
|
|
|
@ -5,6 +5,7 @@ from rest_framework.generics import ListAPIView
|
|||
from rest_framework.viewsets import ModelViewSet
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import generics
|
||||
from rest_framework import status
|
||||
|
||||
class EquipmentCheckFormAPIView(APIView):
|
||||
|
||||
|
@ -68,3 +69,9 @@ class EquipmentCheckFormDetailView(generics.RetrieveUpdateDestroyAPIView):
|
|||
queryset = EquipmentCheckForm.objects.all()
|
||||
serializer_class = EquipmentCheckFormSerializers
|
||||
|
||||
def destroy(self, request, *args, **kwargs):
|
||||
obj = EquipmentCheckForm.objects.get(id=kwargs['pk'])
|
||||
obj.deletemark=0
|
||||
obj.save()
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
|
Loading…
Reference in New Issue