From 9e3e6bd1c60ac1380ef2788ff1b32baa494e60f4 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 30 Oct 2023 16:46:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20material=E6=B7=BB=E5=8A=A0=E5=A4=A7?= =?UTF-8?q?=E7=B1=BB=E5=AD=97=E6=AE=B5=E5=8F=8A=E7=9B=B8=E5=BA=94=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mtm/filters.py | 1 + apps/mtm/models.py | 1 + 2 files changed, 2 insertions(+) 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)