feat: wpr修改排序按number
This commit is contained in:
parent
73bc1bac2e
commit
571e11cc8c
|
@ -353,7 +353,7 @@ class MIOItemwViewSet(CustomModelViewSet):
|
||||||
queryset = MIOItemw.objects.all()
|
queryset = MIOItemw.objects.all()
|
||||||
serializer_class = MIOItemwCreateUpdateSerializer
|
serializer_class = MIOItemwCreateUpdateSerializer
|
||||||
filterset_fields = ['mioitem']
|
filterset_fields = ['mioitem']
|
||||||
ordering = ["number"]
|
ordering = ["number", "create_time"]
|
||||||
ordering_fields = ["number", "create_time"]
|
ordering_fields = ["number", "create_time"]
|
||||||
|
|
||||||
def filter_queryset(self, queryset):
|
def filter_queryset(self, queryset):
|
||||||
|
|
|
@ -24,7 +24,7 @@ class WprViewSet(CustomListModelMixin, RetrieveModelMixin, CustomGenericViewSet)
|
||||||
"defects": ["exact"],
|
"defects": ["exact"],
|
||||||
"number": ["exact"]
|
"number": ["exact"]
|
||||||
}
|
}
|
||||||
ordering = ["-create_time"]
|
ordering = ["number", "create_time"]
|
||||||
ordering_fields = ["number", "create_time", "update_time"]
|
ordering_fields = ["number", "create_time", "update_time"]
|
||||||
search_fields = ["number", "material__name", "material__model", "material__specification"]
|
search_fields = ["number", "material__name", "material__model", "material__specification"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue