feat: 增加route和routepack查询条件
This commit is contained in:
parent
4177ba93f8
commit
12fb18205d
|
@ -51,6 +51,8 @@ class RouteFilter(filters.FilterSet):
|
|||
"material_out": ["exact", "in"],
|
||||
"process": ["exact", "in"],
|
||||
"is_autotask": ["exact"],
|
||||
"routepack": ["exact"],
|
||||
"routepack__state": ["exact"],
|
||||
"mgroup": ["exact", "in", "isnull"],
|
||||
"mgroup__name": ["exact", "contains"],
|
||||
"mgroup__belong_dept": ["exact"],
|
||||
|
|
|
@ -186,7 +186,7 @@ class RoutePackViewSet(CustomModelViewSet):
|
|||
serializer_class = RoutePackSerializer
|
||||
search_fields = ['name']
|
||||
select_related_fields = ['material', 'create_by']
|
||||
filterset_fields = ['material']
|
||||
filterset_fields = ['material', 'state']
|
||||
|
||||
def update(self, request, *args, **kwargs):
|
||||
obj: RoutePack = self.get_object()
|
||||
|
|
Loading…
Reference in New Issue