From f9784e244d821dab3d89cf7e03476efc5c5d5a01 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 8 Dec 2021 14:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BA=A7=E5=93=81=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=86=9B=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/mtm/models.py | 12 +++++++++++- hb_server/apps/wpm/views.py | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hb_server/apps/mtm/models.py b/hb_server/apps/mtm/models.py index 5d39027..8cdde3a 100644 --- a/hb_server/apps/mtm/models.py +++ b/hb_server/apps/mtm/models.py @@ -130,6 +130,16 @@ class RecordFormField(CommonAModel): """ 记录字段表 """ + FIELD_STRING = 'string' + FIELD_INT = 'int' + FIELD_FLOAT = 'float' + FIELD_BOOL = 'boolean' + FIELD_DATE = 'date' + FIELD_TIME = 'time' + FIELD_DATETIME = 'datetime' + FIELD_RADIO = 'radio' + FIELD_CHECKBOX = 'checkbox' + FIELD_SELECT = 'select' field_type_choices = ( ('string', '字符串'), ('int', '整型'), @@ -143,7 +153,7 @@ class RecordFormField(CommonAModel): ('select', '单选下拉'), ('selects', '多选下拉'), ('textarea', '文本域'), - ('draw', '绘图') + ('draw', '绘图'), ) high_rule_choices = ( (1, '小于'), diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index eb6a25d..b4160b4 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -505,8 +505,9 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd oms_w = OperationMaterial.objects.filter(operation=op, type=SubprodctionMaterial.SUB_MA_TYPE_OUT, subproduction_progress__ismain=True) if len(oms_w) == 1: - newstep, hasNext = WpmServies.get_next_step(i.subproduction_plan, step) oms_w = oms_w[0] + # 校验单片数量是否正确, 暂时未写 + newstep, hasNext = WpmServies.get_next_step(oms_w.subproduction_plan, step) wproduct = WProduct() wproduct.material = oms_w.material wproduct.step = newstep