diff --git a/apps/mtm/migrations/0039_alter_material_unit_price.py b/apps/mtm/migrations/0039_alter_material_unit_price.py new file mode 100644 index 00000000..680c0623 --- /dev/null +++ b/apps/mtm/migrations/0039_alter_material_unit_price.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2024-07-31 10:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mtm', '0038_process_batch_append_equip'), + ] + + operations = [ + migrations.AlterField( + model_name='material', + name='unit_price', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=14, null=True, verbose_name='单价'), + ), + ] diff --git a/apps/mtm/models.py b/apps/mtm/models.py index c761200a..37b47f7e 100644 --- a/apps/mtm/models.py +++ b/apps/mtm/models.py @@ -73,7 +73,7 @@ class Material(CommonAModel): need_route = models.BooleanField('是否需要定义工艺路线', default=False) components = models.JSONField('组件', default=dict, null=False, blank=True) brothers = models.JSONField('兄弟件', default=list, null=False, blank=True) - unit_price = models.PositiveIntegerField('单价', null=True, blank=True) + unit_price = models.DecimalField('单价', max_digits=14, decimal_places=2, null=True, blank=True) into_wm = models.BooleanField('是否进入车间库存', default=True) class Meta: