优化系统业务管理校验
This commit is contained in:
@@ -138,11 +138,12 @@ public class SystemServiceController extends BaseController {
|
|||||||
return "true";
|
return "true";
|
||||||
} else {
|
} else {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
if (list.get(0).getId() == id) {
|
for (SystemServiceInfo info : list) {
|
||||||
return "true";
|
if (info.getIsValid() == 1 && info.getId().longValue() == id.longValue()) {
|
||||||
} else {
|
return "true";
|
||||||
return "false";
|
}
|
||||||
}
|
}
|
||||||
|
return "false";
|
||||||
} else {
|
} else {
|
||||||
return "false";
|
return "false";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
<select id="getSystemServiceByServiceId" resultType="systemServiceInfo">
|
<select id="getSystemServiceByServiceId" resultType="systemServiceInfo">
|
||||||
select
|
select
|
||||||
id
|
id, is_valid
|
||||||
from
|
from
|
||||||
system_service_info
|
system_service_info
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
top.window.scrollTo(0, 0);
|
top.window.scrollTo(0, 0);
|
||||||
|
if ("${systemServiceInfo.id}") {
|
||||||
|
$("[name=childTableFlag]").val("1");
|
||||||
|
}
|
||||||
|
|
||||||
$("#inputForm").validate({
|
$("#inputForm").validate({
|
||||||
ignore: [],
|
ignore: [],
|
||||||
rules: {
|
rules: {
|
||||||
@@ -49,7 +53,7 @@
|
|||||||
required:'<spring:message code="required"/>'
|
required:'<spring:message code="required"/>'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//submitHandler: function(form){
|
submitHandler: function(form){
|
||||||
/* $("[for=childTableFlag]").css("display", "none");
|
/* $("[for=childTableFlag]").css("display", "none");
|
||||||
var flag = true;
|
var flag = true;
|
||||||
var tables = document.getElementsByClassName("child-required");
|
var tables = document.getElementsByClassName("child-required");
|
||||||
@@ -73,16 +77,15 @@
|
|||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {*/
|
||||||
loading('LOADING...');
|
|
||||||
$("[disabled=disabled]").attr("disabled", false);
|
$("[disabled=disabled]").attr("disabled", false);
|
||||||
$("#submitBtn").attr("disabled", true);//防止重复提交
|
$("#submitBtn").attr("disabled", true);//防止重复提交
|
||||||
form.submit();
|
form.submit();
|
||||||
} else {
|
/*} else {
|
||||||
flag = true;
|
flag = true;
|
||||||
return false;
|
return false;
|
||||||
} */
|
} */
|
||||||
//},
|
},
|
||||||
errorContainer: "#messageBox",
|
errorContainer: "#messageBox",
|
||||||
errorPlacement: function(error, element) {
|
errorPlacement: function(error, element) {
|
||||||
$("#messageBox").text("<spring:message code='enter_error'/>");
|
$("#messageBox").text("<spring:message code='enter_error'/>");
|
||||||
@@ -326,7 +329,7 @@
|
|||||||
<shiro:hasPermission name="system:service:edit">
|
<shiro:hasPermission name="system:service:edit">
|
||||||
<div>
|
<div>
|
||||||
<button id="addBtn" type="button" class="btn btn-default" onclick="addDatatable()"><spring:message code="add"/></button>
|
<button id="addBtn" type="button" class="btn btn-default" onclick="addDatatable()"><spring:message code="add"/></button>
|
||||||
<input type="hidden" name="childTableFlag" value=""/>
|
<input type="hidden" name="childTableFlag" value="${id }"/>
|
||||||
<!-- <label for="childTableFlag" class="error" style="display:none"></label> -->
|
<!-- <label for="childTableFlag" class="error" style="display:none"></label> -->
|
||||||
</div>
|
</div>
|
||||||
</shiro:hasPermission>
|
</shiro:hasPermission>
|
||||||
|
|||||||
Reference in New Issue
Block a user