Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3d42ab3b
authored
Jul 06, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会服功能加入了校验
parent
37f85e38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
7 deletions
src/main/webapp/WEB-INF/templates/market/createGroup.ftl
src/main/webapp/WEB-INF/templates/market/eventGameForm.ftl
src/main/webapp/WEB-INF/templates/market/createGroup.ftl
View file @
3d42ab3b
<#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;
...
@@ -192,6 +194,41 @@ $("#editGroupTr").on("click", "#editGroupButton", function () {
...
@@ -192,6 +194,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!}"/>
组 数 :<input type="text" name="zuShu"/>
组 数 :<input type="text" name="zuShu"/>
每组间隔时间:<input type="text" name="jianGe"/>
每组间隔时间:<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>
...
...
src/main/webapp/WEB-INF/templates/market/eventGameForm.ftl
View file @
3d42ab3b
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment