This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-ntc/src/main/webapp/WEB-INF/views/specific/specificServiceCfgForm.jsp

161 lines
6.3 KiB
Plaintext
Raw Normal View History

2018-03-17 17:09:19 +08:00
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title></title>
<script type="text/javascript">
var validateForm;
2018-03-17 17:09:19 +08:00
$(document).ready(function() {
//校验叶子节点有下级不得更改为叶子节点
jQuery.validator.addMethod("leafChange",function(value,element){
var flagLeafChange=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/specific/specificServiceCfg/ajaxLeafChange',
data:{parent:"${specificServiceCfg.specServiceId}",newIsLeaf:$("#isLeaf option:selected").val()},
success:function(data){
flagLeafChange=data;
}
});
return flagLeafChange;
},"<spring:message code='leafChange'/>");
2018-03-17 17:09:19 +08:00
$("#name").focus();
validateForm = $("#inputForm").validate({
/* rules:{
specServiceId:{
2018-03-17 17:09:19 +08:00
remote:'${ctx}/specific/specificServiceCfg/isIdRepeat?oldId=${specificServiceCfg.specServiceId}'
}
2018-03-17 17:09:19 +08:00
},
messages: {
specServiceId:{
remote:'<spring:message code="repeat"/>'
2018-03-17 17:09:19 +08:00
}
}, */
2018-03-17 17:09:19 +08:00
submitHandler: function(form){
if(!validateForm.form()) {
2018-03-17 17:09:19 +08:00
return false;
}
loading('<spring:message code="submitting"/>');
2018-03-17 17:09:19 +08:00
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
});
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
</div>
<h3 class="page-title">
<spring:message code="specific_service_cfg"/>
2018-03-17 17:09:19 +08:00
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i><c:if test="${not empty specificServiceCfg.specServiceId}"><spring:message code='edit'/></c:if><c:if test="${empty specificServiceCfg.specServiceId}"><spring:message code='add'/></c:if></div>
2018-03-17 17:09:19 +08:00
<div class="tools">
<!-- <a href="javascript:;" class="collapse"> </a>
<a href="#portlet-config" data-toggle="modal" class="config"> </a>
<a href="javascript:;" class="reload"> </a>
<a href="javascript:;" class="remove"> </a> -->
</div>
</div>
<div class="portlet-body form">
<div class="form-body">
<!-- BEGIN FORM-->
<form:form id="inputForm" modelAttribute="specificServiceCfg" action="${ctx}/specific/specificServiceCfg/saveOrUpdate" method="post" class="form-horizontal">
<input name="specServiceId" type="hidden" value="${specificServiceCfg.specServiceId}"/>
2018-03-17 17:09:19 +08:00
<form:hidden path="isValid" class="form-control"/>
<sys:message content="${message}"/>
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label>
<div class="col-md-4">
<c:set var="fatherName"><spring:message code="root_node"/></c:set>
<sys:treeselect id="specificServiceCfg" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${specificServiceCfg.parent.specServiceId eq '0'?fatherName:fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName}"
title="" url="/specific/specificServiceCfg/treeData" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_code"/>:</label>
2018-03-17 17:09:19 +08:00
<div class="col-md-4">
<input id="specServiceCode" name="specServiceCode" maxlength="50" range="[0,2147483647]" class="form-control required digits" value="${specificServiceCfg.specServiceCode}"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_name"/>:</label>
2018-03-17 17:09:19 +08:00
<div class="col-md-4">
<form:input path="specServiceName" htmlEscape="false" maxlength="64" class="form-control required noBlankSpace"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="group_id"/>:</label>
2018-03-17 17:09:19 +08:00
<div class="col-md-4">
<form:input path="groupId" htmlEscape="false" maxlength="50" range="[0,2147483647]" class="form-control digits" placeholder="0"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
<div class="col-md-4">
<form:select path="isLeaf" class="form-control leafChange">
<c:forEach items="${fns:getDictList('INT_YES_NO')}" var="dict">
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="protocol_desc"/>:</label>
2018-03-17 17:09:19 +08:00
<div class="col-md-4">
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="64" class="form-control"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-offset-3 col-md-9">
<shiro:hasPermission name="specific:service:edit"><button type="submit" class="btn btn-circle blue"><spring:message code="submit"/></button></shiro:hasPermission>
2018-03-17 17:09:19 +08:00
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"><spring:message code="cancel"/></button>
</div>
</div>
</div>
</form:form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>