feat: process增加mtype
This commit is contained in:
parent
7d2d74ee80
commit
7937a632a0
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.2.12 on 2024-12-17 06:14
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('mtm', '0045_process_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='process',
|
||||
name='mtype',
|
||||
field=models.PositiveSmallIntegerField(choices=[(10, '常规'), (20, '切分'), (30, '合并')], default=10, verbose_name='工序生产类型'),
|
||||
),
|
||||
]
|
|
@ -1,7 +1,6 @@
|
|||
from django.db import models
|
||||
from apps.system.models import CommonAModel, Dictionary, CommonBModel, CommonADModel, File, BaseModel
|
||||
from django.db.models import Subquery, OuterRef
|
||||
from rest_framework.exceptions import ValidationError, ParseError
|
||||
from rest_framework.exceptions import ParseError
|
||||
from apps.utils.models import CommonBDModel
|
||||
|
||||
class Process(CommonBModel):
|
||||
|
@ -10,8 +9,14 @@ class Process(CommonBModel):
|
|||
"""
|
||||
PRO_PROD = 10
|
||||
RPO_TEST = 20
|
||||
|
||||
|
||||
PRO_NORMAL = 10
|
||||
PRO_DIV = 20
|
||||
PRO_MERGE = 30
|
||||
name = models.CharField('工序名称', max_length=100)
|
||||
type = models.PositiveSmallIntegerField("工序类型", default=PRO_PROD, choices=((PRO_PROD, '生产工序'), (RPO_TEST, '检验工序')))
|
||||
mtype = models.PositiveSmallIntegerField("工序生产类型", default=PRO_NORMAL, choices=((PRO_NORMAL, '常规'), (PRO_DIV, '切分'), (PRO_MERGE, '合并')))
|
||||
cate = models.CharField('大类', max_length=10, default='')
|
||||
sort = models.PositiveSmallIntegerField('排序', default=1)
|
||||
instruction = models.ForeignKey(
|
||||
|
|
Loading…
Reference in New Issue