diff --git a/apps/pm/migrations/0021_auto_20250317_1040.py b/apps/pm/migrations/0021_auto_20250317_1040.py new file mode 100644 index 00000000..556d4e16 --- /dev/null +++ b/apps/pm/migrations/0021_auto_20250317_1040.py @@ -0,0 +1,38 @@ +# Generated by Django 3.2.12 on 2025-03-17 02:40 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pm', '0020_mtaskb'), + ] + + operations = [ + migrations.AlterField( + model_name='mtask', + name='count', + field=models.DecimalField(decimal_places=1, default=1, max_digits=11, verbose_name='任务数'), + ), + migrations.AlterField( + model_name='mtask', + name='count_notok', + field=models.DecimalField(decimal_places=1, default=0, max_digits=11, verbose_name='不合格数'), + ), + migrations.AlterField( + model_name='mtask', + name='count_ok', + field=models.DecimalField(decimal_places=1, default=0, max_digits=11, verbose_name='合格数'), + ), + migrations.AlterField( + model_name='mtask', + name='count_real', + field=models.DecimalField(decimal_places=1, default=0, max_digits=11, verbose_name='实际生产数'), + ), + migrations.AlterField( + model_name='mtaskb', + name='count', + field=models.DecimalField(decimal_places=1, default=0, max_digits=11, verbose_name='任务数'), + ), + ] diff --git a/apps/pm/models.py b/apps/pm/models.py index 975597b4..56496c43 100644 --- a/apps/pm/models.py +++ b/apps/pm/models.py @@ -94,10 +94,10 @@ class Mtask(CommonADModel): material_out = models.ForeignKey( Material, verbose_name='产物', on_delete=models.CASCADE, related_name='mtask_material_out') is_count_utask = models.BooleanField('是否主任务统计', default=False) - count = models.PositiveIntegerField('任务数', default=1) - count_real = models.PositiveIntegerField('实际生产数', default=0) - count_ok = models.PositiveIntegerField('合格数', default=0) - count_notok = models.PositiveIntegerField('不合格数', default=0) + count = models.DecimalField('任务数', default=1, max_digits=11, decimal_places=1) + count_real = models.DecimalField('实际生产数', default=0, max_digits=11, decimal_places=1) + count_ok = models.DecimalField('合格数', default=0, max_digits=11, decimal_places=1) + count_notok = models.DecimalField('不合格数', default=0, max_digits=11, decimal_places=1) start_date = models.DateField('计划开工日期') end_date = models.DateField('计划完工日期') utask = models.ForeignKey( @@ -135,4 +135,4 @@ class Mtaskb(BaseModel): mtask = models.ForeignKey(Mtask, verbose_name='关联任务', on_delete=models.CASCADE, related_name='b_mtask') handle_user = models.ForeignKey( 'system.user', verbose_name='操作人', on_delete=models.CASCADE, related_name='mtaskb_handle_user') - count = models.PositiveIntegerField('任务数', default=0) \ No newline at end of file + count = models.DecimalField('任务数', default=0, max_digits=11, decimal_places=1) \ No newline at end of file