From 0bdd8a78a190ec2f6ac4f039b690a650fb22479b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 8 Nov 2021 13:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9qm=E8=A1=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0007_alter_testrecorditem_field_type.py | 18 ++++++++++++++++++ hb_server/apps/qm/models.py | 2 +- ...0007_alter_wproductrecorditem_field_type.py | 18 ++++++++++++++++++ hb_server/apps/wpm/models.py | 2 +- 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 hb_server/apps/qm/migrations/0007_alter_testrecorditem_field_type.py create mode 100644 hb_server/apps/wpm/migrations/0007_alter_wproductrecorditem_field_type.py diff --git a/hb_server/apps/qm/migrations/0007_alter_testrecorditem_field_type.py b/hb_server/apps/qm/migrations/0007_alter_testrecorditem_field_type.py new file mode 100644 index 0000000..70d454a --- /dev/null +++ b/hb_server/apps/qm/migrations/0007_alter_testrecorditem_field_type.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.6 on 2021-11-08 05:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('qm', '0006_testrecorditem_sort'), + ] + + operations = [ + migrations.AlterField( + model_name='testrecorditem', + name='field_type', + field=models.CharField(choices=[(1, '生产记录'), (2, '检验记录')], max_length=50, verbose_name='字段类型'), + ), + ] diff --git a/hb_server/apps/qm/models.py b/hb_server/apps/qm/models.py index f72b6a4..0174d40 100644 --- a/hb_server/apps/qm/models.py +++ b/hb_server/apps/qm/models.py @@ -59,7 +59,7 @@ class TestRecordItem(BaseModel): form_field = models.ForeignKey(RecordFormField, verbose_name='关联字段', on_delete=models.CASCADE, db_constraint=False) field_name = models.CharField('字段名', max_length=50) field_key = models.CharField('字段标识', max_length=50) - field_type = models.IntegerField('字段类型', choices=RecordForm.type_choices) + field_type = models.CharField('字段类型', choices=RecordForm.type_choices, max_length=50) field_value = models.JSONField('录入值', default=dict, blank=True) need_judge = models.BooleanField('是否需要判定', default=False) sort = models.IntegerField('排序号', default=1) diff --git a/hb_server/apps/wpm/migrations/0007_alter_wproductrecorditem_field_type.py b/hb_server/apps/wpm/migrations/0007_alter_wproductrecorditem_field_type.py new file mode 100644 index 0000000..47c78c2 --- /dev/null +++ b/hb_server/apps/wpm/migrations/0007_alter_wproductrecorditem_field_type.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.6 on 2021-11-08 05:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('wpm', '0006_rename_wproductrecorddetail_wproductrecorditem'), + ] + + operations = [ + migrations.AlterField( + model_name='wproductrecorditem', + name='field_type', + field=models.CharField(choices=[(1, '生产记录'), (2, '检验记录')], max_length=50, verbose_name='字段类型'), + ), + ] diff --git a/hb_server/apps/wpm/models.py b/hb_server/apps/wpm/models.py index a930c82..6325ae2 100644 --- a/hb_server/apps/wpm/models.py +++ b/hb_server/apps/wpm/models.py @@ -77,7 +77,7 @@ class WProductRecordItem(BaseModel): form_field = models.ForeignKey(RecordFormField, verbose_name='关联字段', on_delete=models.CASCADE, db_constraint=False) field_name = models.CharField('字段名', max_length=50) field_key = models.CharField('字段标识', max_length=50) - field_type = models.IntegerField('字段类型', choices=RecordForm.type_choices) + field_type = models.CharField('字段类型', choices=RecordForm.type_choices, max_length=50) field_value = models.JSONField('录入值', default=dict, blank=True) sort = models.IntegerField('排序号', default=1) wproduct_record = models.ForeignKey(WProductRecord, verbose_name='关联的生产记录', on_delete=models.CASCADE)