1.修订业务辅助表-业务字典 业务辅助表=-系统字典管理平台

2.新增修改页面添加校验
     ①校验必填项
     ②校验itemCode是否重复
     ③校验父级与添加或修改配置的数据类型是否一致
     ④校验修改配置的数据类型类型与其下级数据类型是否一致
     ⑤无上级时、有下级时不得选为叶子节点
 3.待解决项:
    ①点击操作弹出项样式
    ②校验程序偶有存在报出提示但无法阻止提交 情况
This commit is contained in:
zhangshilin
2018-03-04 19:20:32 +08:00
parent 5517d78ce1
commit bb27ba16db
25 changed files with 1925 additions and 1121 deletions

View File

@@ -295,4 +295,20 @@
<example>${fns:toJson(object)}</example>
</function>
<function>
<description>根据id获取服务字典配置</description>
<name>getServiceDictInfoById</name>
<function-class>com.nis.util.ConfigDictUtils</function-class>
<function-signature>java.lang.String getServiceDictInfoById(java.lang.Integer)</function-signature>
<example>${fns:getServiceDictInfoById(id)}</example>
</function>
<function>
<description>根据id获取系统字典配置</description>
<name>getSysDictInfoById</name>
<function-class>com.nis.util.ConfigDictUtils</function-class>
<function-signature>java.lang.String getSysDictInfoById(java.lang.Integer)</function-signature>
<example>${fns:getSysDictInfoById(id)}</example>
</function>
</taglib>

View File

@@ -2,12 +2,90 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<title>分类性质配置管理</title>
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
<title>配置管理</title>
<script type="text/javascript">
$(document).ready(function() {
//上级选择数据类型自动改变
function serviceDictInfoTreeselectCallBack(){
var parent = $("#serviceDictInfoId").val();
$.ajax({
type:'post',
async:true,
cache:false,
url:'${ctx}/configuration/serviceDictInfo/ajaxItemType',
data:{parent:parent},
success:function(data){
$("#itemType option").each(function(){
$(this).attr("selected",false);
});
$("#itemType").find("option[value='"+data+"']").attr("selected",true);
}
});
}
$(document).ready(function() {
//校验itemCode数值
jQuery.validator.addMethod("codeNumber",function(value,element){
return value>=0&value<=20000000},"请填写正确的数值");
jQuery.validator.addMethod("typeSame",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/serviceDictInfo/ajaxType',
data:{parent:$("#serviceDictInfoId").val(),child:$("#itemType option:selected").val()},
success:function(data){
flag=data;
}
});
return flag;
},"请选择正确的数据类型");
//校验更改数据类型后校验数据类型是否与下级冲突
jQuery.validator.addMethod("typeChild",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/serviceDictInfo/ajaxChildrenType',
data:{parent:"${serviceDictInfo.serviceDictId}",newItemType:$("#itemType option:selected").val()},
success:function(data){
flag=data;
}
});
return flag;
},"该配置包含下级配置,数据类型更改后上下级类型不一致");
//校验叶子节点有下级不得更改为叶子节点
jQuery.validator.addMethod("leafChange",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/serviceDictInfo/ajaxLeafChange',
data:{parent:"${serviceDictInfo.serviceDictId}",newIsLeaf:$("#isLeaf option:selected").val()},
success:function(data){
flag=data;
}
});
return flag;
},"该配置包含下级配置,不得改为叶子节点");
//校验叶子节点无上级不得选为叶子节点
jQuery.validator.addMethod("leafHasTree",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/serviceDictInfo/ajaxLeafHasTree',
data:{serviceDictId:"${serviceDictInfo.serviceDictId}",newIsLeaf:$("#isLeaf option:selected").val(),parentId:$("#serviceDictInfoId").val()},
success:function(data){
flag=data;
}
});
return flag;
},"该配置无上级,不得设为叶子节点");
$("#name").focus();
$("#inputForm").validate({
//需验证 item_code item_value
@@ -15,10 +93,19 @@
'itemCode':{
required:true,
digits:true,
codeNumber:true
codeNumber:true,
remote:"${ctx}/configuration/serviceDictInfo/isItemCodeRepeat?oldItemCode=${serviceDictInfo.itemCode}"
},
'itemValue':{
required:true
},
'itemType':{
typeSame:true,
typeChild:true
},
'isLeaf':{
leafChange:true,
leafHasTree:true
}
},
@@ -26,10 +113,19 @@
'itemCode':{
required:'编码必须填写',
digits:'请填写整数值',
codeNumber:'请填写合适的数值0~200000000'
codeNumber:'请填写合适的数值0~200000000',
remote:"该配置编码已存在"
},
'itemValue':{
required:'编码对应值必须填写'
},
'itemType':{
typeSame:'请选择一致的上下级配置数据类型',
typeChild:'该配置包含下级配置,数据类型更改后与子类不一致'
},
'isLeaf':{
leafChange:'该配置包含下级配置,不得改为叶子节点',
leafHasTree:'该配置无上级,不得设为叶子节点'
}
},
@@ -63,7 +159,7 @@
<h3 class="page-title">
分类性质配置管理
配置管理
</h3>
<div class="row">
@@ -71,7 +167,7 @@
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>分类性质配置<shiro:hasPermission name="sys:menu:edit">${not empty serviceDictInfo.serviceDictId?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit">查看</shiro:lacksPermission></div>
<i class="fa fa-gift"></i>配置<shiro:hasPermission name="sys:menu:edit">${not empty serviceDictInfo.serviceDictId?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit">查看</shiro:lacksPermission></div>
<div class="tools">
<!-- <a href="javascript:;" class="collapse"> </a>
<a href="#portlet-config" data-toggle="modal" class="config"> </a>
@@ -86,14 +182,14 @@
<div class="form-body">
<!-- BEGIN FORM-->
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/saveOrUpdate" method="post" class="form-horizontal">
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal">
<form:hidden path="serviceDictId"/>
<sys:message content="${message}"/>
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<div class="col-md-4">
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemCode}"
title="菜单" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue eq '无上级'?'无上级':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}"
title="菜单" url="/configuration/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
</div>
</div>
<div class="form-group">
@@ -101,32 +197,31 @@
<div class="col-md-4">
<select id="itemType" name="itemType" class="form-control">
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:if test="${dict.itemCode ne '3'}">
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
</c:if>
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
<option value="${dict.itemCode}">${dict.itemValue}</option>
</c:if>
</c:if>
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${serviceDictInfo.itemType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码:</label>
<label class="col-md-3 control-label"><font color="red">*</font>配置编码:</label>
<div class="col-md-4">
<form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码对应值:</label>
<label class="col-md-3 control-label"><font color="red">*</font>配置内容:</label>
<div class="col-md-4">
<form:input path="itemValue" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<div class="col-md-4">
<%-- <form:radiobuttons path="isLeaf" items="${fns:getDictOption('SYS_YES_NO')}" /> --%>
<form:select path="isLeaf" class="form-control">

View File

@@ -3,7 +3,7 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<title>分类性质配置管理</title>
<title>配置管理</title>
</head>
<body>
@@ -18,7 +18,7 @@
<h3 class="page-title">
分类性质配置管理
配置管理
</h3>
<div class="row">
@@ -26,7 +26,7 @@
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>分类性质配置查看</div>
<i class="fa fa-gift"></i>配置查看</div>
</div>
<div class="portlet-body form">
@@ -41,7 +41,7 @@
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<div class="col-md-4">
<input value="${serviceDictInfo.parent.itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
<input value="${serviceDictInfo.parent.serviceDictId == 0?'无上级':fns:getServiceDictInfoById(serviceDictInfo.parent.serviceDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">

View File

@@ -2,121 +2,135 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>分类性质配置信息</title>
<title>配置信息</title>
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#treeTable").treeTable({expandLevel : 3}).show();
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
</script>
<style type="text/css">
.dropdown-menu {
min-width: 70px;
}
</style>
</head>
<body>
<div class="content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'"><spring:message code="add_request"></spring:message></button>
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form?itType=${itType}'">新增配置</button>
</div>
<h3 class="page-title">
分类性质管理
</h3>
<h3 class="page-title">
配置管理
</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-cogs"></i>分类性质搜索结果
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i>搜索结果
</div>
</div>
</div>
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
<label class="search-lable">编码</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
<label class="search-lable">数据类型</label> <select id="itemType" name="itemType" >
<option selected="selected"></option>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">配置内容:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
<label class="search-lable">配置编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
<label class="search-lable itemType">数据类型:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected">-请选择-</option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:if test="${dict.itemCode ne '3'}">
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
</c:if>
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
<option value="${dict.itemCode}">${dict.itemValue}</option>
</c:if>
</c:if>
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${serviceDictInfo.itemType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button>
</div>
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody>
<c:forEach items="${page.list}" var="serviceDictInfo">
<tr>
<td>${serviceDictInfo.itemValue}</td>
<td>${serviceDictInfo.itemCode}</td>
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
<td>${serviceDictInfo.serviceDictCreator.id}</td>
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${serviceDictInfo.serviceDictEditor.name}</td>
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="update_request"></spring:message></a></li>
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="delete"></spring:message></a></li>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
</div>
</form:form>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody><c:forEach items="${page.list}" var="serviceDictInfo">
<tr id="${serviceDictInfo.serviceDictId}" pId="${serviceDictInfo.parent.serviceDictId ne 0?serviceDictInfo.parent.serviceDictId:0}">
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
<td>${serviceDictInfo.itemCode}</td>
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
</c:if></td>
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td><c:if test="${serviceDictInfo.serviceDictEditor != null}">
${fns:getUserById(serviceDictInfo.serviceDictEditor.id).name}
</c:if></td>
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}">查看</a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList");
$("#searchForm").submit();
return false;
}
</script>
<div class="page">${page}</div>
</body>
</html>

View File

@@ -1,122 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>标签配置信息</title>
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
</head>
<body>
<div class="content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/markList'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/markForm'"><spring:message code="add_request"></spring:message></button>
</div>
<h3 class="page-title">
标签管理
</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-cogs"></i>标签搜索结果
</div>
</div>
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchMarkList" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
<label class="search-lable">数据类型:</label> <select id="itemType" name="itemType" >
<option selected="selected"></option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:if test="${dict.itemCode eq '3'}">
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
</c:if>
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
<option value="${dict.itemCode}">${dict.itemValue}</option>
</c:if>
</c:if>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button>
</div>
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody>
<c:forEach items="${page.list}" var="serviceDictInfo">
<tr>
<td>${serviceDictInfo.itemValue}</td>
<td>${serviceDictInfo.itemCode}</td>
<td title="${serviceDictInfo.itemDesc}">${fns:abbr(serviceDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SERVICE_DICT_ITM_TYPE",serviceDictInfo.itemType,"0")}</td>
<td>${fns:getDictLabel("SYS_YES_NO",serviceDictInfo.isLeaf,"0")}</td>
<td>${serviceDictInfo.serviceDictCreator.id}</td>
<td><fmt:formatDate value="${serviceDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${serviceDictInfo.serviceDictEditor.name}</td>
<td><fmt:formatDate value="${serviceDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
<li><a href="${ctx}/configuration/serviceDictInfo/markForm?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="update_request"></spring:message></a></li>
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('确定吗?', this.href)"><spring:message code="delete"></spring:message></a></li>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchMarkList");
$("#searchForm").submit();
return false;
}
</script>
</body>
</html>

View File

@@ -2,7 +2,7 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>分类性质配置信息</title>
<title>配置信息</title>
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
@@ -16,7 +16,7 @@
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/list");
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/list?itType=${itType}");
$("#searchForm").submit();
return false;
}
@@ -24,7 +24,7 @@
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList");
$("#searchForm").attr("action","${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
@@ -37,13 +37,13 @@
</head>
<body>
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/serviceDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form'">新增配置</button>
onClick="javascript:window.location='${ctx}/configuration/serviceDictInfo/form?itType=${itType}'">新增配置</button>
</div>
<h3 class="page-title">
分类性质管理
配置管理
</h3>
<div class="row">
@@ -51,36 +51,36 @@
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i>分类性质配置列表
<i class="fa fa-cogs"></i>列表信息
</div>
</div>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList" method="post" class="form-search">
<form:form id="searchForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
<label class="search-lable">编码</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
<label class="search-lable">数据类型</label> <select id="itemType" name="itemType" >
<option selected="selected"></option>
<label class="search-lable">配置内容:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
<label class="search-lable">配置编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
<label class="search-lable itemType">数据类型:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected">-请选择-</option>
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:if test="${dict.itemCode ne '3'}">
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
</c:if>
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
<option value="${dict.itemCode}">${dict.itemValue}</option>
</c:if>
</c:if>
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message> : <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${requestInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="end_date"></spring:message> : <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${requestInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${serviceDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
@@ -108,12 +108,12 @@
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">查看</a></li>
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0&itType=${itType}">查看</a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)">修改</a></li>
<li><a href="${ctx}/configuration/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)">删除</a></li>
<li><a href="${ctx}/configuration/serviceDictInfo/delete?serviceDictId=${serviceDictInfo.serviceDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
</shiro:hasPermission>
</ul>

View File

@@ -1,165 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<title>标签配置管理</title>
<script type="text/javascript">
$(document).ready(function() {
jQuery.validator.addMethod("codeNumber",function(value,element){
return value>=0&value<=20000000},"请填写正确的数值");
$("#name").focus();
$("#inputForm").validate({
//需验证 item_code item_value
rules: {
'itemCode':{
required:true,
digits:true,
codeNumber:true
},
'itemValue':{
required:true
}
},
messages: {
'itemCode':{
required:'编码必须填写',
digits:'请填写整数值',
codeNumber:'请填写合适的数值0~200000000'
},
'itemValue':{
required:'编码对应值必须填写'
}
},
submitHandler: function(form){
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)">返回</button>
</div>
<h3 class="page-title">
标签配置管理
</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>标签配置<shiro:hasPermission name="sys:menu:edit">${not empty serviceDictInfo.serviceDictId?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit">查看</shiro:lacksPermission></div>
<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="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/saveOrUpdate" method="post" class="form-horizontal">
<form:hidden path="serviceDictId"/>
<sys:message content="${message}"/>
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<div class="col-md-4">
<sys:treeselect id="serviceDictInfo" name="parent.serviceDictId" value="${serviceDictInfo.parent.serviceDictId}" labelName="parent.itemValue" labelValue="${serviceDictInfo.parent.itemCode}"
title="菜单" url="/configuration/serviceDictInfo/treeMarkData" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 数据类型:</label>
<div class="col-md-4">
<select id="itemType" name="itemType" class="form-control">
<c:forEach items="${fns:getDictList('SERVICE_DICT_ITM_TYPE')}" var="dict">
<c:if test="${dict.itemCode eq '3'}">
<c:if test="${dict.itemCode eq serviceDictInfo.itemType}">
<option value="${serviceDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
</c:if>
<c:if test="${dict.itemCode ne serviceDictInfo.itemType}">
<option value="${dict.itemCode}">${dict.itemValue}</option>
</c:if>
</c:if>
</c:forEach>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码:</label>
<div class="col-md-4">
<form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码对应值:</label>
<div class="col-md-4">
<form:input path="itemValue" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<div class="col-md-4">
<%-- <form:radiobuttons path="isLeaf" items="${fns:getDictOption('SYS_YES_NO')}" /> --%>
<form:select path="isLeaf" class="form-control">
<form:options items="${fns:getDictList('SYS_YES_NO')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
</form:select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">描述信息:</label>
<div class="col-md-4">
<form:textarea path="itemDesc" 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">
<shiro:hasPermission name="sys:menu:edit"><button type="submit" class="btn btn-circle blue">保存</button></shiro:hasPermission>
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)">Cancel</button>
</div>
</div>
</div>
</form:form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,91 +0,0 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<title>标签配置管理</title>
</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)">返回</button>
</div>
<h3 class="page-title">
标签配置管理
</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>标签配置查看</div>
</div>
<div class="portlet-body form">
<div class="form-body">
<!-- BEGIN FORM-->
<form:form id="inputForm" modelAttribute="serviceDictInfo" action="${ctx}/configuration/serviceDictInfo/markSaveOrUpdate" method="post" class="form-horizontal">
<form:hidden path="serviceDictId"/>
<sys:message content="${message}"/>
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<div class="col-md-4">
<input value="${serviceDictInfo.parent.itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label radio-lable"><font color="red">*</font> 数据类型:</label>
<div class="col-md-4">
<input value="${fns:getDictLabel('SERVICE_DICT_ITM_TYPE',serviceDictInfo.itemType,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码:</label>
<div class="col-md-4">
<input value="${serviceDictInfo.itemCode}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码对应值:</label>
<div class="col-md-4">
<input value="${serviceDictInfo.itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<div class="col-md-4">
<input value="${fns:getDictLabel('SYS_YES_NO',serviceDictInfo.isValid,'0')}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">描述信息:</label>
<div class="col-md-4">
<input value="${serviceDictInfo.itemDesc}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
</form:form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -2,12 +2,90 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<title>生效范围配置管理</title>
<link rel="stylesheet" type="text/css" href="${ctxStatic}/pages/css/dictInfo.css" />
<script type="text/javascript" src="${ctxStatic}/pages/scripts/dict.js"></script>
<title>配置管理</title>
<script type="text/javascript">
$(document).ready(function() {
//上级选择数据类型自动改变
function sysDictInfoTreeselectCallBack(){
var parent = $("#sysDictInfoId").val();
$.ajax({
type:'post',
async:true,
cache:false,
url:'${ctx}/configuration/sysDictInfo/ajaxItemType',
data:{parent:parent},
success:function(data){
$("#itemType option").each(function(){
$(this).attr("selected",false);
});
$("#itemType").find("option[value='"+data+"']").attr("selected",true);
}
});
}
$(document).ready(function() {
//校验itemCode数值
jQuery.validator.addMethod("codeNumber",function(value,element){
return value>=0&value<=20000000},"请填写正确的数值");
jQuery.validator.addMethod("typeSame",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/sysDictInfo/ajaxType',
data:{parent:$("#sysDictInfoId").val(),child:$("#itemType option:selected").val()},
success:function(data){
flag=data;
}
});
return flag;
},"请选择正确的数据类型");
//校验更改数据类型后校验数据类型是否与下级冲突
jQuery.validator.addMethod("typeChild",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/sysDictInfo/ajaxChildrenType',
data:{parent:"${sysDictInfo.sysDictId}",newItemType:$("#itemType option:selected").val()},
success:function(data){
flag=data;
}
});
return flag;
},"该配置包含下级配置,数据类型更改后上下级类型不一致");
//校验叶子节点有下级不得更改为叶子节点
jQuery.validator.addMethod("leafChange",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/sysDictInfo/ajaxLeafChange',
data:{parent:"${sysDictInfo.sysDictId}",newIsLeaf:$("#isLeaf option:selected").val()},
success:function(data){
flag=data;
}
});
return flag;
},"该配置包含下级配置,不得改为叶子节点");
//校验叶子节点无上级不得选为叶子节点
jQuery.validator.addMethod("leafHasTree",function(value,element){
var flag=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/configuration/sysDictInfo/ajaxLeafHasTree',
data:{sysDictId:"${sysDictInfo.sysDictId}",newIsLeaf:$("#isLeaf option:selected").val(),parentId:$("#sysDictInfoId").val()},
success:function(data){
flag=data;
}
});
return flag;
},"该配置无上级,不得设为叶子节点");
$("#name").focus();
$("#inputForm").validate({
//需验证 item_code item_value
@@ -15,10 +93,19 @@
'itemCode':{
required:true,
digits:true,
codeNumber:true
codeNumber:true,
remote:"${ctx}/configuration/sysDictInfo/isItemCodeRepeat?oldItemCode=${sysDictInfo.itemCode}"
},
'itemValue':{
required:true
},
'itemType':{
typeSame:true,
typeChild:true
},
'isLeaf':{
leafChange:true,
leafHasTree:true
}
},
@@ -26,10 +113,19 @@
'itemCode':{
required:'编码必须填写',
digits:'请填写整数值',
codeNumber:'请填写合适的数值0~200000000'
codeNumber:'请填写合适的数值0~200000000',
remote:"该配置编码已存在"
},
'itemValue':{
required:'编码对应值必须填写'
},
'itemType':{
typeSame:'请选择一致的上下级配置数据类型',
typeChild:'该配置包含下级配置,数据类型更改后与子类不一致'
},
'isLeaf':{
leafChange:'该配置包含下级配置,不得改为叶子节点',
leafHasTree:'该配置无上级,不得设为叶子节点'
}
},
@@ -63,7 +159,7 @@
<h3 class="page-title">
生效范围配置管理
配置管理
</h3>
<div class="row">
@@ -71,7 +167,7 @@
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>分类性质配置<shiro:hasPermission name="sys:menu:edit">${not empty sysDictInfo.sysDictId?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit">查看</shiro:lacksPermission></div>
<i class="fa fa-gift"></i>配置<shiro:hasPermission name="sys:menu:edit">${not empty sysDictInfo.sysDictId?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit">查看</shiro:lacksPermission></div>
<div class="tools">
<!-- <a href="javascript:;" class="collapse"> </a>
<a href="#portlet-config" data-toggle="modal" class="config"> </a>
@@ -86,19 +182,14 @@
<div class="form-body">
<!-- BEGIN FORM-->
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/saveOrUpdate" method="post" class="form-horizontal">
<form:form id="inputForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/saveOrUpdate?itType=${itType}" method="post" class="form-horizontal">
<form:hidden path="sysDictId"/>
<sys:message content="${message}"/>
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<%-- <div class="col-md-4">
<sys:treeselect id="serviceDictInfo" name="parent.id" value="${serviceDictInfo.parent.serviceDictId}" labelName="serviceDictInfo.parent.itemValue" labelValue="${serviceDictInfo.parent.itemValue}"
title="父级字典" url="/configuration/serviceDictInfo/treeData" extId="${serviceDictInfo.id}" cssClass="required form-control"/>
</div> --%>
<div class="col-md-4">
<%-- <form:input path="parent.serviceDictId" htmlEscape="false" maxlength="50" class="form-control" disabled="disabled" readonly="readonly"/> --%>
<form:input path="parent.sysDictId" htmlEscape="false" maxlength="50" class="form-control"/>
<sys:treeselect id="sysDictInfo" name="parent.sysDictId" value="${sysDictInfo.parent.sysDictId}" labelName="parent.itemValue" labelValue="${sysDictInfo.parent.itemValue eq '无上级'?'无上级':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}"
title="菜单" url="/configuration/sysDictInfo/treeData?itType=${itType}" extId="${sysDictInfo.sysDictId}" cssClass="required form-control"/>
</div>
</div>
<div class="form-group">
@@ -106,30 +197,31 @@
<div class="col-md-4">
<select id="itemType" name="itemType" class="form-control">
<c:forEach items="${fns:getDictList('SYS_DICT_ITM_TYPE')}" var="dict">
<c:if test="${dict.itemCode eq sysDictInfo.itemType}">
<option value="${sysDictInfo.itemType}" selected="selected">${dict.itemValue}</option>
</c:if>
<c:if test="${dict.itemCode ne sysDictInfo.itemType}">
<option value="${dict.itemCode}">${dict.itemValue}</option>
</c:if>
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${sysDictInfo.itemType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码:</label>
<label class="col-md-3 control-label"><font color="red">*</font>配置编码:</label>
<div class="col-md-4">
<form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>编码对应值:</label>
<label class="col-md-3 control-label"><font color="red">*</font>配置内容:</label>
<div class="col-md-4">
<form:input path="itemValue" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<label class="col-md-3 control-label"><font color="red">*</font>是否叶子节点:</label>
<div class="col-md-4">
<%-- <form:radiobuttons path="isLeaf" items="${fns:getDictOption('SYS_YES_NO')}" /> --%>
<form:select path="isLeaf" class="form-control">

View File

@@ -3,7 +3,7 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<title>生效范围配置管理</title>
<title>配置管理</title>
</head>
<body>
@@ -18,7 +18,7 @@
<h3 class="page-title">
生效范围配置管理
配置管理
</h3>
<div class="row">
@@ -26,7 +26,7 @@
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>生效范围配置查看</div>
<i class="fa fa-gift"></i>配置查看</div>
</div>
<div class="portlet-body form">
@@ -41,7 +41,7 @@
<div class="form-group">
<label class="col-md-3 control-label">上级配置:</label>
<div class="col-md-4">
<input value="${sysDictInfo.parent.itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
<input value="${sysDictInfo.parent.sysDictId == 0?'无上级':fns:getSysDictInfoById(sysDictInfo.parent.sysDictId).itemValue}" maxlength="50" class="form-control" readonly="readonly"/>
</div>
</div>
<div class="form-group">
@@ -71,7 +71,7 @@
<div class="form-group">
<label class="col-md-3 control-label">描述信息:</label>
<div class="col-md-4">
<input value="${sysDictInfo.itemDesc}" maxlength="50" class="form-control" readonly="readonly"/>
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>
</div>
</form:form>

View File

@@ -0,0 +1,136 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>配置信息</title>
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#treeTable").treeTable({expandLevel : 3}).show();
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
</script>
<style type="text/css">
.dropdown-menu {
min-width: 70px;
}
</style>
</head>
<body>
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/configuration/sysDictInfo/form?itType=${itType}'">新增配置</button>
</div>
<h3 class="page-title">
配置管理
</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-cogs"></i>搜索结果
</div>
</div>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">配置内容:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemValue}"/>
<label class="search-lable">配置编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemCode}"/>
<label class="search-lable itemType">数据类型:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected">-请选择-</option>
<c:forEach items="${fns:getDictList('SYS_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${sysDictInfo.itemType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
</div>
</form:form>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody><c:forEach items="${page.list}" var="sysDictInfo">
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemValue}</a></td>
<td>${sysDictInfo.itemCode}</td>
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")}</td>
<td>${fns:getDictLabel("SYS_YES_NO",sysDictInfo.isLeaf,"0")}</td>
<td><c:if test="${sysDictInfo.sysDictCreator != null}">
${fns:getUserById(sysDictInfo.sysDictCreator.id).name}
</c:if></td>
<td><fmt:formatDate value="${sysDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td><c:if test="${sysDictInfo.sysDictEditor != null}">
${fns:getUserById(sysDictInfo.sysDictEditor.id).name}
</c:if></td>
<td><fmt:formatDate value="${sysDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}">查看</a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="page">${page}</div>
</body>
</html>

View File

@@ -2,138 +2,135 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>生效范围配置信息</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/pages/css/dictInfo.css" />
<script>
$(document).ready(function() {
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/list");
$("#searchForm").submit();
return false;
}
</script>
<style>
.input-medium {
width: 200px !important;
<title>配置信息</title>
<link href="${ctxStatic}/global/plugins/treeTable/themes/vsStyle/treeTable.min.css" rel="stylesheet" type="text/css" />
<link href="${ctxStatic}/pages/css/dictInfo.css" rel="stylesheet" type="text/css" />
<script src="${ctxStatic}/global/plugins/treeTable/jquery.treeTable.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/pages/scripts/dict.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#treeTable").treeTable({expandLevel : 3}).show();
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/list?itType=${itType}");
$("#searchForm").submit();
return false;
}
function page2(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/configuration/sysDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
</script>
<style type="text/css">
.dropdown-menu {
min-width: 70px;
}
.Wdate {
border: #c2cad8 1px solid;
height: 26px;
}
.dropdown-menu {
min-width: 50px;
}
</style>
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/sysDictInfo/list'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-default" onclick="location='${ctx}/configuration/sysDictInfo/list?itType=${itType}'"><spring:message code="refresh"></spring:message></button>
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/configuration/sysDictInfo/form'">新增</button>
onClick="javascript:window.location='${ctx}/configuration/sysDictInfo/form?itType=${itType}'">新增配置</button>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-cogs"></i><spring:message code="生效范围配置列表"></spring:message>
</div>
</div>
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="requestInfo" action="${ctx}/configuration/sysDictInfo/list" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="50" class="input-medium" value="${sysDictInfo.itemCode}"/>
<label class="search-lable">值:</label><input id="itemValue" name="itemValue" type="text" maxlength="50" class="input-medium" value="${sysDictInfo.itemValue}"/>
<label class="search-lable">开始时间:</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<label class="search-lable">结束时间:</label><input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
<h3 class="page-title">
配置管理
</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-cogs"></i>列表信息
</div>
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table class="table table-bordered">
<thead>
<tr>
<th class="sort-column mark" width="5%">编码</th>
<th class="sort-column mark" width="10%">编码对应值</th>
<th class="sort-column mark" width="20%">描述信息</th>
<th class="sort-column mark" width="9%">数据类型</th>
<th class="sort-column create_time" width="15%">创建时间</th>
<!-- <th width="10%">修改记录</th> -->
<shiro:hasPermission name="sys:dict:edit">
<th width="10%">操作</th>
</shiro:hasPermission>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list}" var="sysDictInfo">
<tr>
<td>${sysDictInfo.itemCode}</td>
<td>${sysDictInfo.itemValue}</td>
<td>${fns:abbr(sysDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")}</td>
<td><fmt:formatDate value="${sysDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<%-- <td>
<button class="btn revision popovers purple-stripe" data-content="${serviceDictInfo.itemDesc}">修改记录查看</button>
</td> --%>
<td>
<div class="btn-group">
<a class="btn btn-primary" href="#"><i class="icon-cogs"></i> 操作</a>
<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0"><i class="icon-list"></i>查看</a></li>
<li class="divider"></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要修改吗?', this.href)"><i class="icon-edit"></i> 修改</a></li>
<li class="divider"></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}" onclick="return confirmx('数据字典在系统中非常重要,您确认要删除吗?', this.href)"><i class="icon-trash"></i> 删除</a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
<div class="portlet-body">
<div class="row" >
<div class="col-md-12">
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/configuration/sysDictInfo/searchList?itType=${itType}" method="post" class="form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div class="col-md-12">
<label class="search-lable">配置内容:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemValue}"/>
<label class="search-lable">配置编码:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemCode}"/>
<label class="search-lable itemType">数据类型:</label>
<select id="itemType" name="itemType" >
<option value="" selected="selected">-请选择-</option>
<c:forEach items="${fns:getDictList('SYS_DICT_ITM_TYPE')}" var="dict">
<c:forEach items="${intArr}" var="itTemp">
<c:if test="${dict.itemCode eq itTemp}">
<option value="${dict.itemCode}"
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
>${dict.itemValue}</option>
</c:if>
</c:forEach>
</c:forEach>
</select>
<spring:message code="begin_date"></spring:message>:<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<spring:message code="end_date"></spring:message>:<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
<button type="button" class="btn btn-default btn-sm" onclick="return page2()">
<i class="fa fa-edit"></i> <spring:message code="search"></spring:message>
</button>
</div>
</form:form>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>配置内容</th><th>配置编码</th><th>描述信息</th><th>数据类型</th><th>叶子节点</th><th>创建人员</th><th>创建时间</th><th>最近修改人员</th><th>最近修改时间</th><shiro:hasPermission name="sys:menu:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody><c:forEach items="${list}" var="sysDictInfo">
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemValue}</a></td>
<td>${sysDictInfo.itemCode}</td>
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")}</td>
<td>${fns:getDictLabel("SYS_YES_NO",sysDictInfo.isLeaf,"0")}</td>
<td><c:if test="${sysDictInfo.sysDictCreator != null}">
${fns:getUserById(sysDictInfo.sysDictCreator.id).name}
</c:if></td>
<td><fmt:formatDate value="${sysDictInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td><c:if test="${sysDictInfo.sysDictEditor != null}">
${fns:getUserById(sysDictInfo.sysDictEditor.id).name}
</c:if></td>
<td><fmt:formatDate value="${sysDictInfo.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#">操作<span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}">查看</a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)">修改</a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/configuration/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)">删除</a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="page">${page}</div>
</body>
</html>

View File

@@ -3,10 +3,18 @@ sysDict serviceDict
***/
.search-lable {
margin-right: 5px;
margin-left: 8px;
margin-right: 3px;
margin-left: 5px;
}
.itemType {
margin-right: 5px;
}
#itemType {
margin-right: 5px;
}
.input-medium {
margin-left: 8px;
}
.input-medium {
width: 155px !important;
}
@@ -19,3 +27,4 @@ margin-left: 8px;
min-width: 50px;
}

View File

@@ -1,34 +1,2 @@
$(document).ready(function() {
jQuery.validator.addMethod("codeNumber",function(value,element){
return value>=0&value<=20000000},"请填写正确的数值");
$("#name").focus();
$("#searchForm").validate({
//需验证 item_code item_value
rules: {
'itemCode':{
digits:true,
codeNumber:true
}
},
messages: {
'itemCode':{
digits:'请填写整数值',
codeNumber:'请填写合适的数值0~200000000'
}
},
submitHandler: function(form){
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);
}
}
});
});