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