feat: process增加mtype

This commit is contained in:
caoqianming 2024-12-17 17:20:54 +08:00
parent 7d2d74ee80
commit 7937a632a0
2 changed files with 25 additions and 2 deletions

View File

@ -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='工序生产类型'),
),
]

View File

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