feat: 其他生产记录增加查询handle_date

This commit is contained in:
caoqianming 2023-12-20 15:17:31 +08:00
parent 85a49c4b0f
commit 0f2d2dbee9
1 changed files with 4 additions and 1 deletions

View File

@ -382,6 +382,9 @@ class OtherLogViewSet(CustomModelViewSet):
""" """
queryset = OtherLog.objects.all() queryset = OtherLog.objects.all()
serializer_class = OtherLogSerializer serializer_class = OtherLogSerializer
filterset_fields = ['product'] filterset_fields = {
"product": ["exact"],
"handle_date": ["exact", "gte", "lte"]
}
search_fields = ['product'] search_fields = ['product']
ordering = ['-handle_date', '-create_time'] ordering = ['-handle_date', '-create_time']