Skip to content

Commit

Permalink
优化:上线单名称/工单名称超过50个字符时增加提示。 (#2426)
Browse files Browse the repository at this point in the history
* 优化:上线单名称/工单名称超过50个字符时增加提示。

* 优化:上线单名称/工单名称超过50个字符时增加提示。

---------

Co-authored-by: kang.peng <kang.peng@qx.com>
  • Loading branch information
pengkang1991 and kang.peng authored Nov 30, 2023
1 parent b9d4cca commit fd0c974
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sql/templates/sqlsubmit.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="form-group">
<input id="workflow_name" type="text" autocomplete="off" name="workflow_name"
class="form-control"
data-name="上线单名称" data-placeholder="请输入上线单名称"
data-name="上线单名称" data-placeholder="请输入上线单名称!"
placeholder="请输入上线单名称,如:XX项目会员功能建表"
required>
</div>
Expand Down Expand Up @@ -333,6 +333,7 @@ <h4 class="modal-title text-danger">提交信息确认</h4>
element.find('[required]').each(
function () {
var fieldElement = $(this);
var fieldId = $(this).attr('id');
//如果为null则设置为''
var value = fieldElement.val() || '';
if (value) {
Expand All @@ -343,6 +344,11 @@ <h4 class="modal-title text-danger">提交信息确认</h4>
result = false;
return result;
}
if(fieldId == "workflow_name" && value.length>=50){
alert("上线单名称/工单名称不能超过50个字符!");
result = false;
return result;
}
}
);
return result;
Expand Down

0 comments on commit fd0c974

Please sign in to comment.