隶属大工序
This commit is contained in:
parent
465b33b0d0
commit
3aac6ed8b0
|
@ -0,0 +1,26 @@
|
||||||
|
# Generated by Django 3.2.6 on 2021-10-14 01:44
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('em', '0009_auto_20210916_1108'),
|
||||||
|
('mtm', '0021_auto_20211013_0856'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='subproduction',
|
||||||
|
name='process',
|
||||||
|
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='subproduction_process', to='mtm.process', verbose_name='隶属大工序'),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='step',
|
||||||
|
name='equipments',
|
||||||
|
field=models.ManyToManyField(related_name='step_equips', to='em.Equipment', verbose_name='使用设备'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -62,6 +62,7 @@ class StepDetailSerializer(serializers.ModelSerializer):
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
class SubProductionSerializer(serializers.ModelSerializer):
|
class SubProductionSerializer(serializers.ModelSerializer):
|
||||||
|
process_ = ProcessSimpleSerializer(source='process', read_only=True)
|
||||||
class Meta:
|
class Meta:
|
||||||
model = SubProduction
|
model = SubProduction
|
||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
|
|
|
@ -74,7 +74,7 @@ class SubProductionViewSet(CreateUpdateModelAMixin, ModelViewSet):
|
||||||
产品生产分解增删改查
|
产品生产分解增删改查
|
||||||
"""
|
"""
|
||||||
perms_map={'*':'*'}
|
perms_map={'*':'*'}
|
||||||
queryset = SubProduction.objects.all()
|
queryset = SubProduction.objects.select_related('process').all()
|
||||||
filterset_fields = ['product', 'process']
|
filterset_fields = ['product', 'process']
|
||||||
search_fields = ['name']
|
search_fields = ['name']
|
||||||
serializer_class = SubProductionSerializer
|
serializer_class = SubProductionSerializer
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 3.2.6 on 2021-10-14 01:44
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('wf', '0012_ticketflow_intervene_type'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='ticketflow',
|
||||||
|
name='transition',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='与worklow.Transition关联, 为空时表示认为干预的操作', null=True, on_delete=django.db.models.deletion.CASCADE, to='wf.transition', verbose_name='流转id'),
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue