fix: wmaterial search bug3

This commit is contained in:
caoqianming 2025-03-20 09:37:07 +08:00
parent b327da2342
commit 5ae9e235df
1 changed files with 2 additions and 1 deletions

View File

@ -136,7 +136,8 @@ class WMaterialViewSet(ListModelMixin, CustomGenericViewSet):
serializer_class = WMaterialSerializer
select_related_fields = ['material', 'belong_dept', 'material__process', 'supplier']
search_fields = ['material__name',
'material__number', 'material__specification', 'batch', 'material__model', "defect__name", "notok_sign", 'material_ofrom']
'material__number', 'material__specification', 'batch', 'material__model', "defect__name", "notok_sign",
'material_ofrom__name', 'material_ofrom__specification', 'material_ofrom__model']
filterset_class = WMaterialFilter
ordering_fields = ["update_time", "state", "count", "count_xtest"]