Commit 3d42ab3b by chongli

会服功能加入了校验

parent 37f85e38
<#assign pageJsContent> <#assign pageJsContent>
<script type="text/javascript"> <script type="text/javascript">
var thisTrChildren; var thisTrChildren;
$("input[name='supplierId']").click(function(){ $("input[name='supplierId']").click(function(){
thisTrChildren = $(this).parents("tr")[0].children; thisTrChildren = $(this).parents("tr")[0].children;
...@@ -193,6 +195,41 @@ $("#editGroupTr").on("click", "#editGroupButton", function () { ...@@ -193,6 +195,41 @@ $("#editGroupTr").on("click", "#editGroupButton", function () {
}); });
}); });
$("#batchCreateformButton").click(function(){
var zushu = $("input[name='zuShu']").val();
var jiange = $("input[name='jianGe']").val();
if(!isRealNum(zushu)){
alert('组数不是数字');
return;
}
if(!isRealNum(jiange)){
alert('时间间隔不是数字');
return;
}
$("#batchCreateform").submit();
});
$("#singleCreateformButton").click(function(){
var formatTeeTime = $("input[name='formatTeeTime']").val();
if(formatTeeTime==""){
alert('请输入开球时间');
return;
}
$("#singleCreateform").submit();
});
function isRealNum(val){
if(val === "" || val ==null){
return false;
}
if(!isNaN(val)){
return true;
}else{
return false;
}
}
</script> </script>
</#assign> </#assign>
...@@ -203,17 +240,17 @@ $("#editGroupTr").on("click", "#editGroupButton", function () { ...@@ -203,17 +240,17 @@ $("#editGroupTr").on("click", "#editGroupButton", function () {
</ul> </ul>
<form action='/market/eventGame/createGroupPost' method="post"> <form action='/market/eventGame/createGroupPost' method="post" id='batchCreateform'>
<input type="hidden" name="gameId" value="${eventGameGroupForm.gameId!}"/> <input type="hidden" name="gameId" value="${eventGameGroupForm.gameId!}"/>
组&nbsp;&nbsp;&nbsp;数&nbsp;&nbsp;&nbsp;:<input type="text" name="zuShu"/> 组&nbsp;&nbsp;&nbsp;数&nbsp;&nbsp;&nbsp;:<input type="text" name="zuShu"/>
&nbsp;每组间隔时间:<input type="text" name="jianGe"/> &nbsp;每组间隔时间:<input type="text" name="jianGe"/>
<input type=submit name="submit1" value="批量创建分组" style='margin-bottom: 10px;'> <input type='button' id="batchCreateformButton" value="批量创建分组" style='margin-bottom: 10px;'>
</form> </form>
<form action='/market/eventGame/createSingleGroupPost' method="post"> <form action='/market/eventGame/createSingleGroupPost' method="post" id='singleCreateform'>
<input type="hidden" name="gameId" value='${eventGameGroupForm.gameId!}'/> <input type="hidden" name="gameId" value='${eventGameGroupForm.gameId!}'/>
开球时间:<input type="time" name="formatTeeTime"/> 开球时间:<input type="time" name="formatTeeTime"/>
<input type=submit name="submit1" value="创建单个分组" style='margin-bottom: 10px;'> <input type='button' id="singleCreateformButton" value="创建单个分组" style='margin-bottom: 10px;'>
<input type='button' name="editGroupButton" value="修改分组" style='margin-left: 228px;margin-bottom: 10px;'> <input type='button' name="editGroupButton" value="修改分组" style='margin-left: 228px;margin-bottom: 10px;'>
</form> </form>
......
...@@ -74,10 +74,9 @@ ...@@ -74,10 +74,9 @@
<div id="course_container"> <div id="course_container">
<div class="row-fluid show-grid"> <div class="row-fluid show-grid">
<@form.hidden "eventGameForm.id"/> <@form.hidden "eventGameForm.id"/>
<@form.textInput "eventGameForm.gameName" "class=\"input-medium\"" "赛事名称" /> <@form.textInput path="eventGameForm.gameName" attributes="class=\"input-medium\" pattern=\".{1,64}\" required" label="赛事名称" required = true />
<@form.addonTextInput path="eventGameForm.courseId" attributes="class=\"input-medium\" required min=\"1\"" label="球场ID" addon="选择" addonType="button" type="number"/> <@form.addonTextInput path="eventGameForm.courseId" attributes="class=\"input-medium\" required min=\"1\"" label="球场ID" addon="选择" addonType="button" type="number"/>
<@form.textInput "eventGameForm.playDate" "class=\"input-medium\"" "赛事日期" /> <@form.textInput "eventGameForm.playDate" "class=\"input-medium\" required" "赛事日期"/>
<div class="control-group"> <div class="control-group">
<div class="controls"> <div class="controls">
<button type="submit" class="btn btn-primary">提交</button> <button type="submit" class="btn btn-primary">提交</button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment