feat: 工段添加code标识

This commit is contained in:
caoqianming 2024-12-12 11:10:01 +08:00
parent 0f920bae99
commit 80fd2090ad
3 changed files with 20 additions and 1 deletions

View File

@ -11,6 +11,7 @@ class MaterialFilter(filters.FilterSet):
fields = {
"id": ["exact", "in"],
"cate": ["exact", "in"],
"code": ["exact", "in", "isnull"],
"type": ["exact", "in"],
"is_hidden": ["exact"],
"is_assemb": ["exact"],

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2024-12-12 03:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mtm', '0043_srule'),
]
operations = [
migrations.AddField(
model_name='mgroup',
name='code',
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='标识'),
),
]

View File

@ -118,7 +118,7 @@ class Mgroup(CommonBModel):
"""
name = models.CharField('名称', max_length=50)
# code = models.CharField('标识', max_length=50, null=True, blank=True)
code = models.CharField('标识', max_length=50, null=True, blank=True)
cate = models.CharField(
'分类', max_length=50, default='section', help_text='section/other') # section是工段
shift_rule = models.CharField('班次规则', max_length=10, default='默认')