From 58c10eacceafb9ff37a50b136c331756f446582b Mon Sep 17 00:00:00 2001 From: "kang.peng" Date: Thu, 30 Nov 2023 14:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96:=E4=B8=8A=E7=BA=BF=E5=8D=95?= =?UTF-8?q?=E5=90=8D=E7=A7=B0/=E5=B7=A5=E5=8D=95=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=B6=85=E8=BF=8750=E4=B8=AA=E5=AD=97=E7=AC=A6=E6=97=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/templates/sqlsubmit.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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/",