feat: 修改物料清单默认排序
This commit is contained in:
parent
1a65e95127
commit
9ff3ee2040
|
@ -30,9 +30,10 @@ class MaterialViewSet(CustomModelViewSet):
|
|||
search_fields = ['name', 'code', 'number', 'specification']
|
||||
select_related_fields = ['process']
|
||||
ordering = ['sort', 'id', 'number', 'name']
|
||||
ordering_fields = ['sort', 'id', 'number', 'name', 'type', 'process']
|
||||
ordering_fields = ['name', 'model', 'specification',
|
||||
'type', 'process', 'process__sort', 'sort', 'id', 'number']
|
||||
|
||||
@action(methods=['post'], detail=False, serializer_class=Serializer)
|
||||
@action(methods=['post'], detail=False, serializer_class=Serializer, perms_map={'post': 'material.create'})
|
||||
@transaction.atomic
|
||||
def daoru(self, request, *args, **kwargs):
|
||||
"""导入物料
|
||||
|
|
Loading…
Reference in New Issue