diff --git a/apps/mtm/migrations/0065_material_count_safe_upper_alter_material_count_safe.py b/apps/mtm/migrations/0065_material_count_safe_upper_alter_material_count_safe.py new file mode 100644 index 00000000..479d1dfe --- /dev/null +++ b/apps/mtm/migrations/0065_material_count_safe_upper_alter_material_count_safe.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.27 on 2026-07-14 06:11 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mtm', '0064_process_clear_defect'), + ] + + operations = [ + migrations.AddField( + model_name='material', + name='count_safe_upper', + field=models.DecimalField(blank=True, decimal_places=3, max_digits=14, null=True, verbose_name='安全库存上限'), + ), + migrations.AlterField( + model_name='material', + name='count_safe', + field=models.DecimalField(blank=True, decimal_places=3, max_digits=14, null=True, verbose_name='安全库存数(下限)'), + ), + ] diff --git a/apps/mtm/models.py b/apps/mtm/models.py index 82a17ebc..dc935c44 100644 --- a/apps/mtm/models.py +++ b/apps/mtm/models.py @@ -98,7 +98,8 @@ class Material(CommonAModel): # count = models.DecimalField('总库存', max_digits=14, decimal_places=3, default=0) # count_mb = models.DecimalField('仓库库存', max_digits=14, decimal_places=3, default=0) # count_wm = models.DecimalField('车间库存', max_digits=14, decimal_places=3, default=0) - count_safe = models.DecimalField('安全库存数', max_digits=14, decimal_places=3, null=True, blank=True) + count_safe = models.DecimalField('安全库存数(下限)', max_digits=14, decimal_places=3, null=True, blank=True) + count_safe_upper = models.DecimalField('安全库存上限', max_digits=14, decimal_places=3, null=True, blank=True) week_esitimate_consume = models.DecimalField('周消耗预估', max_digits=14, decimal_places=3, null=True, blank=True) process = models.ForeignKey( Process, verbose_name='所用工序', on_delete=models.CASCADE, null=True, blank=True)