diff --git a/sql/templates/sqlsubmit.html b/sql/templates/sqlsubmit.html index 4dc8a1526c..a455e0c239 100644 --- a/sql/templates/sqlsubmit.html +++ b/sql/templates/sqlsubmit.html @@ -27,7 +27,7 @@
@@ -333,6 +333,7 @@ element.find('[required]').each( function () { var fieldElement = $(this); + var fieldId = $(this).attr('id'); //如果为null则设置为'' var value = fieldElement.val() || ''; if (value) { @@ -343,6 +344,11 @@ result = false; return result; } + if(fieldId == "workflow_name" && value.length>=50){ + alert("上线单名称/工单名称不能超过50个字符!"); + result = false; + return result; + } } ); return result; @@ -564,10 +570,6 @@ obj[item.name] = item.value; return obj; }, {}) - if (formData.workflow_name.length>=50){ - alert("上线单名称/工单名称不能超过50个字符!") - return - } $.ajax({ type: "post", url: "/api/v1/workflow/",