feat: wprlist默认排除已消耗的2
This commit is contained in:
parent
0673580d3b
commit
8afbc9a0b5
|
@ -16,7 +16,12 @@ class WprViewSet(CustomListModelMixin, CustomGenericViewSet):
|
|||
prefetch_related_fields = ["defects"]
|
||||
queryset = Wpr.objects.all()
|
||||
serializer_class = WprSerializer
|
||||
filterset_fields = ["mb", "wm", "state", "material", "defects"]
|
||||
filterset_fields = {
|
||||
"mb": ["exact", "isnull"],
|
||||
"wm": ["exact", "isnull"],
|
||||
"state": ["exact"],
|
||||
"defects": ["exact"]
|
||||
}
|
||||
ordering = ["-create_time"]
|
||||
ordering_fields = ["number", "create_time", "update_time"]
|
||||
search_fields = ["number", "material__name", "material__model", "material__specification"]
|
||||
|
|
Loading…
Reference in New Issue