diff --git a/apps/mtm/filters.py b/apps/mtm/filters.py index a04142dd..b45c2daf 100644 --- a/apps/mtm/filters.py +++ b/apps/mtm/filters.py @@ -10,6 +10,7 @@ class MaterialFilter(filters.FilterSet): model = Material fields = { "id": ["exact", "in"], + "cate": ["exact", "in"], "type": ["exact", "in"], "is_hidden": ["exact"], "is_assemb": ["exact"], diff --git a/apps/mtm/models.py b/apps/mtm/models.py index 0f38008d..09b7ae52 100644 --- a/apps/mtm/models.py +++ b/apps/mtm/models.py @@ -43,6 +43,7 @@ class Material(CommonAModel): ) name = models.CharField('名称', max_length=50) + cate = models.CharField('大类', max_length=20, default='') number = models.CharField('编号', max_length=100, null=True, blank=True) specification = models.CharField( '型号', max_length=100, null=True, blank=True)