修改产品分解表结构
This commit is contained in:
parent
a535c1dc50
commit
4bab6de73d
|
@ -0,0 +1,26 @@
|
||||||
|
# Generated by Django 3.2.6 on 2021-10-12 08:57
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('mtm', '0019_auto_20211012_0901'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='subproduction',
|
||||||
|
name='create_by',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subproduction_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='subproduction',
|
||||||
|
name='update_by',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subproduction_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -128,7 +128,7 @@ class RecordFormField(CommonAModel):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SubProduction(BaseModel):
|
class SubProduction(CommonAModel):
|
||||||
"""
|
"""
|
||||||
产品生产分解
|
产品生产分解
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -69,7 +69,7 @@ class StepViewSet(OptimizationMixin, CreateUpdateModelAMixin, CreateModelMixin,
|
||||||
return StepDetailSerializer
|
return StepDetailSerializer
|
||||||
return StepSerializer
|
return StepSerializer
|
||||||
|
|
||||||
class SubProductionViewSet(PageOrNot, CreateModelMixin, UpdateModelMixin, ListModelMixin, DestroyModelMixin, GenericViewSet):
|
class SubProductionViewSet(CreateUpdateModelAMixin, ModelViewSet):
|
||||||
"""
|
"""
|
||||||
产品生产分解增删改查
|
产品生产分解增删改查
|
||||||
"""
|
"""
|
||||||
|
@ -80,7 +80,7 @@ class SubProductionViewSet(PageOrNot, CreateModelMixin, UpdateModelMixin, ListMo
|
||||||
serializer_class = SubProductionSerializer
|
serializer_class = SubProductionSerializer
|
||||||
ordering = ['sort']
|
ordering = ['sort']
|
||||||
|
|
||||||
class InputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
|
class InputMaterialViewSet(ModelViewSet):
|
||||||
"""
|
"""
|
||||||
输入物料-增删改查
|
输入物料-增删改查
|
||||||
"""
|
"""
|
||||||
|
@ -97,7 +97,7 @@ class InputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
|
||||||
return InputMaterialUpdateSerializer
|
return InputMaterialUpdateSerializer
|
||||||
return InputMaterialSerializer
|
return InputMaterialSerializer
|
||||||
|
|
||||||
class OutputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
|
class OutputMaterialViewSet(ModelViewSet):
|
||||||
"""
|
"""
|
||||||
输出物料-增删改查
|
输出物料-增删改查
|
||||||
"""
|
"""
|
||||||
|
@ -114,7 +114,7 @@ class OutputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
|
||||||
return OutputMaterialUpdateSerializer
|
return OutputMaterialUpdateSerializer
|
||||||
return OutputMaterialSerializer
|
return OutputMaterialSerializer
|
||||||
|
|
||||||
class UsedStepViewSet(OptimizationMixin, CreateUpdateModelAMixin, CreateModelMixin, DestroyModelMixin, ListModelMixin, GenericViewSet):
|
class UsedStepViewSet(OptimizationMixin, CreateModelMixin, DestroyModelMixin, ListModelMixin, GenericViewSet):
|
||||||
"""
|
"""
|
||||||
产品生产子工序表
|
产品生产子工序表
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue