修改产品分解表结构

This commit is contained in:
caoqianming 2021-10-12 16:58:32 +08:00
parent a535c1dc50
commit 4bab6de73d
3 changed files with 31 additions and 5 deletions

View File

@ -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='最后编辑人'),
),
]

View File

@ -128,7 +128,7 @@ class RecordFormField(CommonAModel):
class SubProduction(BaseModel):
class SubProduction(CommonAModel):
"""
产品生产分解
"""

View File

@ -69,7 +69,7 @@ class StepViewSet(OptimizationMixin, CreateUpdateModelAMixin, CreateModelMixin,
return StepDetailSerializer
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
ordering = ['sort']
class InputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
class InputMaterialViewSet(ModelViewSet):
"""
输入物料-增删改查
"""
@ -97,7 +97,7 @@ class InputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
return InputMaterialUpdateSerializer
return InputMaterialSerializer
class OutputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
class OutputMaterialViewSet(ModelViewSet):
"""
输出物料-增删改查
"""
@ -114,7 +114,7 @@ class OutputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
return OutputMaterialUpdateSerializer
return OutputMaterialSerializer
class UsedStepViewSet(OptimizationMixin, CreateUpdateModelAMixin, CreateModelMixin, DestroyModelMixin, ListModelMixin, GenericViewSet):
class UsedStepViewSet(OptimizationMixin, CreateModelMixin, DestroyModelMixin, ListModelMixin, GenericViewSet):
"""
产品生产子工序表
"""