feat: material添加大类字段及相应过滤条件

This commit is contained in:
caoqianming 2023-10-30 16:46:23 +08:00
parent 6c14e8c8fd
commit 9e3e6bd1c6
2 changed files with 2 additions and 0 deletions

View File

@ -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"],

View File

@ -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)