已完成:
①字典列表,配置编码移到配置内容前一列
②系统字典与业务字典的item_code字段int类型改为varchar(64)
③业务字典和系统字典表增加一个字段,level_no,层级(新增、修改已加入)
④完成条件分页查询(折叠逻辑与无条件查询一致,)
⑤优化分页查询代码(预留介入条件排序),
待完善:修改、删除时下层级递归处理待添加事务性及测试(待手动抛异常重点测试)
生效范围测试尚未完毕,待处理
jquery Validate验证层级关系受<sys:treeselect>影响,待处理
样式调整:分页样式(尚未调整),
This commit is contained in:
@@ -22,11 +22,33 @@
|
||||
$("#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("isLevelNoSure",function(value,element){
|
||||
var flag2=false;
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:true,
|
||||
cache:false,
|
||||
url:'${ctx}/basics/serviceDictInfo/isLevelTotalSure',
|
||||
data:{parentId:$("#serviceDictInfoId").val(),currentId:'${serviceDictInfo.serviceDictId}'},
|
||||
success:function(data){
|
||||
flag2=data;
|
||||
/* if(data){
|
||||
$("#uploadLevel").css("display","none");
|
||||
}else{
|
||||
$("#uploadLevel").css("display","block");
|
||||
} */
|
||||
}
|
||||
});
|
||||
return flag2
|
||||
},"选择此配置上下层级数将超过四级");
|
||||
|
||||
//类型选择与上级是否冲突
|
||||
jQuery.validator.addMethod("typeSame",function(value,element){
|
||||
var flag=false;
|
||||
$.ajax({
|
||||
@@ -85,11 +107,17 @@
|
||||
},"该配置上级为根节点,不得设为叶子节点");
|
||||
|
||||
|
||||
|
||||
$("#name").focus();
|
||||
$("#inputForm").validate({
|
||||
//需验证 item_code item_value
|
||||
rules: {
|
||||
'parent.itemValue':{
|
||||
remote:'${ctx}/basics/serviceDictInfo/isLevelTotalSure?parentId='+$("#serviceDictInfoId").val()+'¤tId=${serviceDictInfo.serviceDictId}'
|
||||
},
|
||||
'itemCode':{
|
||||
required:true,
|
||||
remote:'${ctx}/basics/serviceDictInfo/isItemCodeRepeat?oldItemCode=${serviceDictInfo.itemCode}'
|
||||
},
|
||||
'itemValue':{
|
||||
required:true
|
||||
},
|
||||
@@ -104,6 +132,13 @@
|
||||
|
||||
},
|
||||
messages: {
|
||||
'parent.itemValue':{
|
||||
remote:"选择此配置上下层级数将超过四级"
|
||||
},
|
||||
'itemCode':{
|
||||
required:'请填写配置编码',
|
||||
remote:'该配置编码已存在'
|
||||
},
|
||||
'itemValue':{
|
||||
required:'编码对应值必须填写'
|
||||
},
|
||||
@@ -178,6 +213,7 @@
|
||||
<div class="col-md-4">
|
||||
<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="/basics/serviceDictInfo/treeData?itType=${itType}" extId="${serviceDictInfo.serviceDictId}" cssClass="required form-control"/>
|
||||
<!-- <label id="uploadLevel" style="display:none;" class="error" for="uploadLevel">选择此配置上下层级数将超过四级</label> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -196,12 +232,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="form-group">
|
||||
<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>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="config_content"/>:</label>
|
||||
<div class="col-md-4">
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
<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><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable itemType">数据类型:</label>
|
||||
<select id="itemType" name="itemType" >
|
||||
<option value="" selected="selected">-请选择-</option>
|
||||
@@ -71,7 +71,7 @@
|
||||
<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>
|
||||
<c:if test="${selectedType eq dict.itemCode}">selected="selected"</c:if>
|
||||
>${dict.itemValue}</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
@@ -88,11 +88,11 @@
|
||||
</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">
|
||||
<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="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}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemCode}</a></td>
|
||||
<td>${serviceDictInfo.itemValue}</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>
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
<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"><spring:message code="config_content"/>:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable"><spring:message code="item_code"/>:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemCode}"/>
|
||||
<label class="search-lable"><spring:message code="config_content"/>:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${serviceDictInfo.itemValue}"/>
|
||||
<label class="search-lable itemType"><spring:message code="item_type"/>:</label>
|
||||
<select id="itemType" name="itemType" >
|
||||
<option value="" selected="selected"><spring:message code="select"/></option>
|
||||
@@ -88,14 +88,15 @@
|
||||
</div>
|
||||
</form:form>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th><spring:message code="config_content"/></th><th><spring:message code="item_code"/></th><th><spring:message code="desc"/></th><th><spring:message code="item_type"/></th><th><spring:message code="is_leaf"/></th><th><spring:message code="creator"/></th><th><spring:message code="create_time"/></th><th><spring:message code="editor"/></th><th><spring:message code="edit_time"/></th><shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead>
|
||||
<thead><tr><th><spring:message code="item_code"/></th><th><spring:message code="config_content"/></th><th><spring:message code="desc"/></th><th><spring:message code="item_type"/></th><th><spring:message code="is_leaf"/></th><th>层级</th><th><spring:message code="creator"/></th><th><spring:message code="create_time"/></th><th><spring:message code="editor"/></th><th><spring:message code="edit_time"/></th><shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead>
|
||||
<tbody><c:forEach items="${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}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemValue}</a></td>
|
||||
<td>${serviceDictInfo.itemCode}</td>
|
||||
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/serviceDictInfo/form?serviceDictId=${serviceDictInfo.serviceDictId}&doAction=0">${serviceDictInfo.itemCode}</a></td>
|
||||
<td>${serviceDictInfo.itemValue}</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.levelNo}</td>
|
||||
<td><c:if test="${serviceDictInfo.serviceDictCreator != null}">
|
||||
${fns:getUserById(serviceDictInfo.serviceDictCreator.id).name}
|
||||
</c:if></td>
|
||||
|
||||
@@ -196,12 +196,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="form-group">
|
||||
<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>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="config_content"/>:</label>
|
||||
<div class="col-md-4">
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
<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"><spring:message code="config_content"/>:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemValue}"/>
|
||||
<label class="search-lable"><spring:message code="item_code"/>:</label><input id="itemCode" name="itemCode" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemCode}"/>
|
||||
<label class="search-lable"><spring:message code="config_content"/>:</label><input id="itemValue" name="itemValue" type="text" maxlength="25" class="input-medium" value="${sysDictInfo.itemValue}"/>
|
||||
<label class="search-lable itemType"><spring:message code="item_value"/>:</label>
|
||||
<select id="itemType" name="itemType" >
|
||||
<option value="" selected="selected"><spring:message code="select"/></option>
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>
|
||||
</form:form>
|
||||
<table id="treeTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead><tr><th><spring:message code="config_content"/></th><th><spring:message code="item_code"/></th><th><spring:message code="desc"/></th><th><spring:message code="item_type"/></th><th><spring:message code="is_leaf"/></th><th><spring:message code="creator"/></th><th><spring:message code="create_time"/></th><th><spring:message code="editor"/></th><th><spring:message code="edit_time"/></th><shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr></thead>
|
||||
<thead><tr><th><spring:message code="item_code"/></th><th><spring:message code="config_content"/></th><th><spring:message code="desc"/></th><th><spring:message code="item_type"/></th><th><spring:message code="is_leaf"/></th><th>层级</th><th><spring:message code="creator"/></th><th><spring:message code="create_time"/></th><th><spring:message code="editor"/></th><th><spring:message code="edit_time"/></th><shiro:hasPermission name="sys:menu:edit"><th><spring:message code="operation"/></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}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemValue}</a></td>
|
||||
@@ -96,6 +96,7 @@
|
||||
<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>${sysDictInfo.levelNo}</td>
|
||||
<td><c:if test="${sysDictInfo.sysDictCreator != null}">
|
||||
${fns:getUserById(sysDictInfo.sysDictCreator.id).name}
|
||||
</c:if></td>
|
||||
|
||||
Reference in New Issue
Block a user