From b500ad661509c1138872843380c52c99485fc0c6 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 25 Jun 2025 18:19:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20wpr=E6=B7=BB=E5=8A=A0=E5=AF=B9=E5=A4=96?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpmw/migrations/0007_wpr_number_out.py | 18 ++++++++++++++++++ apps/wpmw/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 apps/wpmw/migrations/0007_wpr_number_out.py diff --git a/apps/wpmw/migrations/0007_wpr_number_out.py b/apps/wpmw/migrations/0007_wpr_number_out.py new file mode 100644 index 00000000..2a5b8e49 --- /dev/null +++ b/apps/wpmw/migrations/0007_wpr_number_out.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2025-06-25 10:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('wpmw', '0006_auto_20250513_1100'), + ] + + operations = [ + migrations.AddField( + model_name='wpr', + name='number_out', + field=models.CharField(blank=True, max_length=50, null=True, unique=True, verbose_name='对外编号'), + ), + ] diff --git a/apps/wpmw/models.py b/apps/wpmw/models.py index 03d4f75f..77a8c3d8 100644 --- a/apps/wpmw/models.py +++ b/apps/wpmw/models.py @@ -16,6 +16,7 @@ class Wpr(BaseModel): """ number = models.CharField("编号", max_length=50, null=True, blank=True) + number_out = models.CharField("对外编号", max_length=50, null=True, blank=True, unique=True) version = models.PositiveIntegerField("版本号", default=9999) state = models.PositiveSmallIntegerField('状态', default=10, choices=WmStateOption.choices) material = models.ForeignKey(Material, verbose_name="当前物料形态", on_delete=models.CASCADE, related_name="material_wpr")