+
+
+
+
+
+
+ {{ scope.row.teststate }}
+
+
+ {{ scope.row.detnumber }}
+
+
+ {{ scope.row.certunit_.name }}
+
+
+ {{ scope.row.sampledec }}
+
+
+ {{ scope.row.charge }}
+
+
+ {{ scope.row.testorg_.name}}
+
+
+ {{ scope.row.testitem}}
+
+
+
+
+
+
+ 任务反馈
+
+
+
+
+
-
+
diff --git a/server/apps/project/views.py b/server/apps/project/views.py
index c3e4d29..b5e2921 100644
--- a/server/apps/project/views.py
+++ b/server/apps/project/views.py
@@ -78,7 +78,7 @@ class CertappViewset(PageOrNot, RbacFilterSet, ModelViewSet):
queryset = CertApp.objects.all()
serializer_class = CertappSerializer
ordering = ['-create_time']
- filterset_fields = ['state', 'project', 'cert_field']
+ filterset_fields = ['state', 'project','cert_field']
# filterset_class = CertAppFilter
@@ -197,7 +197,7 @@ class CertappunitViewset(PageOrNot, ModelViewSet):
perms_map={'get': '*', '*':'certapp_view'}
queryset = Certappunit.objects.all()
serializer_class = CertappunitSerializer
- filterset_fields = ['certapp']
+ filterset_fields = ['certapp','teststate']
ordering= ['-id']
@action(methods=['put'], detail=True, perms_map={'put':'certapp_access'}, url_name='certappunit_access')
@@ -237,6 +237,10 @@ class CertappunitViewset(PageOrNot, ModelViewSet):
obj.inspectionstate = "待检验"
obj.save()
return Response(status=status.HTTP_200_OK)
+ elif obj.teststate == "待提交CTC":
+ obj.teststate = request.data['teststate']
+ obj.save()
+ return Response(status=status.HTTP_200_OK)
else:
return Response('检测任务异常,操作失败', status=status.HTTP_400_BAD_REQUEST)
@action(methods=['put'], detail=True, perms_map={'put':'certapp_createsamples'}, url_name='certappunit_createsamples')