From 8b2761b02700be14ee153499192e86f5f47adba2 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 31 Jan 2024 10:18:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0attendance=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=92=8C=E6=8E=92=E5=BA=8F=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hrm/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/hrm/views.py b/apps/hrm/views.py index 29624361..c21244d5 100755 --- a/apps/hrm/views.py +++ b/apps/hrm/views.py @@ -255,7 +255,8 @@ class AttendanceViewSet(CustomModelViewSet): 'user__belong_dept', 'user__post', 'shift', 'team'] filterset_fields = ['user', 'user__belong_dept', 'user__post', 'state', 'work_date', 'user__name', 'user__phone'] - ordering = ['-create_time'] + search_fields = ['user__name', 'user__phone'] + ordering = ['-work_date', '-create_time'] class ClockRecordViewSet(BulkCreateModelMixin, ListModelMixin, BulkDestroyModelMixin, CustomGenericViewSet):