2018-03-17 17:09:19 +08:00
|
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
|
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
|
2018-03-21 13:43:43 +08:00
|
|
|
<script type="text/javascript" src="${ctxStatic}/pages/scripts/specificServiceForm/specificServiceFormCfg.js"></script>
|
2018-03-17 17:09:19 +08:00
|
|
|
<title></title>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
jQuery.validator.addMethod("maxValue", function(value, element) {
|
2018-03-28 18:24:09 +08:00
|
|
|
return value >=0&&value<2100000000;
|
2018-03-17 17:09:19 +08:00
|
|
|
}, "请填写正确的协议id");
|
|
|
|
|
//校验叶子节点无上级不得选为叶子节点
|
|
|
|
|
jQuery.validator.addMethod("leafHasTree",function(value,element){
|
|
|
|
|
var flagLeafHasTree=false;
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:'post',
|
|
|
|
|
async:false,
|
|
|
|
|
url:'${ctx}/specific/specificServiceCfg/ajaxLeafHasTree',
|
|
|
|
|
data:{parentId:$("#specificServiceCfgId").val(),newIsLeaf:$("#isLeaf option:selected").val()},
|
|
|
|
|
success:function(data){
|
|
|
|
|
flagLeafHasTree=data;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return flagLeafHasTree;
|
|
|
|
|
},"该配置上级为根节点,不得设为叶子节点");
|
|
|
|
|
|
|
|
|
|
//校验叶子节点有下级不得更改为叶子节点
|
|
|
|
|
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;
|
|
|
|
|
},"该配置包含下级配置,不得改为叶子节点");
|
|
|
|
|
|
|
|
|
|
$("#name").focus();
|
|
|
|
|
$("#inputForm").validate({
|
|
|
|
|
rules:{
|
2018-03-21 18:19:03 +08:00
|
|
|
specServiceId:{
|
2018-03-17 17:09:19 +08:00
|
|
|
required:true,
|
|
|
|
|
digits:true,
|
2018-03-28 18:24:09 +08:00
|
|
|
max: 2100000000,
|
2018-03-17 17:09:19 +08:00
|
|
|
remote:'${ctx}/specific/specificServiceCfg/isIdRepeat?oldId=${specificServiceCfg.specServiceId}'
|
|
|
|
|
},
|
2018-03-21 18:19:03 +08:00
|
|
|
specServiceName:{
|
2018-03-28 18:24:09 +08:00
|
|
|
required:true,
|
|
|
|
|
maxlength:64
|
2018-03-17 17:09:19 +08:00
|
|
|
},
|
2018-03-21 18:19:03 +08:00
|
|
|
groupId:{
|
2018-03-21 13:43:43 +08:00
|
|
|
digits:true,
|
2018-03-28 18:24:09 +08:00
|
|
|
max:2100000000
|
2018-03-21 13:43:43 +08:00
|
|
|
},
|
2018-03-21 18:19:03 +08:00
|
|
|
isLeaf:{
|
2018-03-28 18:24:09 +08:00
|
|
|
//leafHasTree:true,
|
2018-03-17 17:09:19 +08:00
|
|
|
leafChange:true
|
2018-03-28 18:24:09 +08:00
|
|
|
},
|
|
|
|
|
specServiceDesc:{
|
|
|
|
|
maxlength:64
|
2018-03-17 17:09:19 +08:00
|
|
|
}
|
2018-03-28 18:24:09 +08:00
|
|
|
|
2018-03-17 17:09:19 +08:00
|
|
|
},
|
|
|
|
|
messages: {
|
2018-03-21 18:19:03 +08:00
|
|
|
specServiceId:{
|
2018-03-28 18:24:09 +08:00
|
|
|
required:'<spring:message code="required"/>',
|
|
|
|
|
digits:'<spring:message code="input_integer"/>',
|
|
|
|
|
max: '<spring:message code="input_integer"/>',
|
|
|
|
|
remote:'<spring:message code="repeat"/>'
|
2018-03-17 17:09:19 +08:00
|
|
|
},
|
2018-03-21 18:19:03 +08:00
|
|
|
specServiceName:{
|
2018-03-28 18:24:09 +08:00
|
|
|
required:'<spring:message code="required"/>',
|
|
|
|
|
maxlength:'<spring:message code="maxlength_64"/>'
|
2018-03-17 17:09:19 +08:00
|
|
|
},
|
2018-03-21 18:19:03 +08:00
|
|
|
groupId:{
|
2018-03-28 18:24:09 +08:00
|
|
|
digits:'<spring:message code="input_integer"/>',
|
|
|
|
|
max:'<spring:message code="input_integer"/>'
|
2018-03-21 13:43:43 +08:00
|
|
|
},
|
2018-03-21 18:19:03 +08:00
|
|
|
isLeaf:{
|
2018-03-28 18:24:09 +08:00
|
|
|
//leafHasTree:'该配置上级为根节点,不得设为叶子节点',
|
|
|
|
|
leafChange:'<spring:message code="leafChange"/>'
|
|
|
|
|
},
|
|
|
|
|
specServiceDesc:{
|
|
|
|
|
maxlength:'<spring:message code="maxlength_64"/>'
|
2018-03-17 17:09:19 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submitHandler: function(form){
|
|
|
|
|
if(!validateItem()) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
loading('正在提交,请稍等...');
|
|
|
|
|
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">
|
2018-03-21 13:43:43 +08:00
|
|
|
<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">
|
2018-03-28 18:24:09 +08:00
|
|
|
<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="oldId" type="hidden" value="${specificServiceCfg.specServiceId}"/>
|
|
|
|
|
<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">
|
2018-03-28 18:24:09 +08:00
|
|
|
<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.specServiceName eq 'root_node'?fatherName:fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName}"
|
2018-03-17 17:09:19 +08:00
|
|
|
title="菜单" url="/specific/specificServiceCfg/treeData" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
2018-03-22 16:27:56 +08:00
|
|
|
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_id"/>:</label>
|
2018-03-17 17:09:19 +08:00
|
|
|
<div class="col-md-4">
|
|
|
|
|
<input id="specServiceId" name="specServiceId" maxlength="50" class="form-control" value="${specificServiceCfg.specServiceId}"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
2018-03-22 16:27:56 +08:00
|
|
|
<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="50" class="form-control"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
2018-03-22 16:27:56 +08:00
|
|
|
<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">
|
2018-03-21 13:43:43 +08:00
|
|
|
<form:input path="groupId" htmlEscape="false" maxlength="50" class="form-control" 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">
|
2018-03-28 18:24:09 +08:00
|
|
|
<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">
|
2018-03-22 16:27:56 +08:00
|
|
|
<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="2000" class="form-control"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-actions">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-offset-3 col-md-9">
|
2018-03-28 18:24:09 +08:00
|
|
|
<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>
|