From 9e26f416a506cba6660c98231f8c0c94ed14ebb7 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 31 Jul 2024 19:18:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=98=E6=9B=B4=E7=89=A9=E6=96=99?= =?UTF-8?q?=E5=8D=95=E4=BB=B7=E5=AD=97=E6=AE=B5=E4=B8=BA=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0039_alter_material_unit_price.py | 18 ++++++++++++++++++ apps/mtm/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 apps/mtm/migrations/0039_alter_material_unit_price.py 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: