(1)修复IP类PZ查询条件值为0时后台没有传值的bug

(2)调整调整PZ入库的分类,性质,标签的字段,由ITEM_CODE 改为 service_dict_id
This commit is contained in:
wangxin
2018-03-12 11:38:46 +08:00
parent 939f7d68eb
commit 17668bceb7
6 changed files with 82 additions and 79 deletions

View File

@@ -28,20 +28,20 @@
<c:forEach items="${fls}" var="fl">
<c:choose>
<c:when test="${_cfg.classify==null or _cfg.classify==''}">
<option value="${fl.itemCode}">${fl.itemValue}</option>
<option value="${fl.serviceDictId}">${fl.itemValue}</option>
</c:when>
<c:when test="${fn:contains(_cfg.classify,',')}">
<option value="${fl.itemCode}"
<option value="${fl.serviceDictId}"
<c:forEach items="${fn:split(_cfg.classify,',')}" var="_classify">
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fl.itemCode==_classify}">selected</c:if>
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
</c:forEach>
>${fl.itemValue}</option>
</c:when>
<c:otherwise>
<option value="${fl.itemCode}"
<option value="${fl.serviceDictId}"
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fl.itemCode==_classify}">selected</c:if>
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
>${fl.itemValue}</option>
</c:otherwise>
</c:choose>
@@ -62,13 +62,13 @@
<c:forEach items="${xzs}" var="xz">
<c:choose>
<c:when test="${_cfg.attribute==null or _cfg.attribute==''}">
<option value="${xz.itemCode}">${xz.itemValue}</option>
<option value="${xz.serviceDictId}">${xz.itemValue}</option>
</c:when>
<c:otherwise>
<c:forEach items="${fn:split(_cfg.attribute,',')}" var="_attribute">
<option value="${xz.itemCode}"
<option value="${xz.serviceDictId}"
<c:if test="${xz.isValid==0}">disabled="disabled"</c:if>
<c:if test="${xz.itemCode==_attribute}">selected</c:if>
<c:if test="${fn:trim(xz.serviceDictId) eq _attribute}">selected</c:if>
>${xz.itemValue}</option>
</c:forEach>
</c:otherwise>
@@ -86,13 +86,13 @@
<c:forEach items="${lables}" var="lable">
<c:choose>
<c:when test="${_cfg.lable==null or _cfg.lable==''}">
<option value="${lable.itemCode}">${lable.itemValue}</option>
<option value="${lable.serviceDictId}">${lable.itemValue}</option>
</c:when>
<c:otherwise>
<c:forEach items="${fn:split(_cfg.lable,',')}" var="_lable">
<option value="${lable.itemCode}"
<option value="${lable.serviceDictId}"
<c:if test="${lable.isValid==0}">disabled="disabled"</c:if>
<c:if test="${lable.itemCode==_lable}">selected</c:if>
<c:if test="${fn:trim(lable.serviceDictId) eq _lable}">selected</c:if>
>${lable.itemValue}</option>
</c:forEach>
</c:otherwise>

View File

@@ -154,7 +154,7 @@
<td>
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId==fl.itemCode}">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
${fl.itemValue},
</c:if>
</c:forEach>
@@ -164,14 +164,14 @@
<td>
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId==xz.itemCode}">${xz.itemValue},</c:if>
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId==lable.itemCode}">${lable.itemValue},</c:if>
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>

View File

@@ -21,19 +21,21 @@
</c:choose>
<script>
$(document).ready(function() {
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
//rest
$("#resetBtn").on("click",function(){
$("select.selectpicker").each(function(){
$(this).selectpicker('val',$(this).find('option:first').val());
$(this).find("option").attr("selected",false);
$(this).find("option:first").attr("selected",true);
});
$("#searchForm")[0].reset();
});
});
function reset(){
$("#searchForm").reset();
}
//查询
function page(n,s){
$("#pageNo").val(n);
@@ -65,7 +67,10 @@
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="ipCfg" action="${ctx}/cfg/ip/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&audit=${audit}" method="post" class="form-search">
<form:form id="searchForm" modelAttribute="ipCfg" action="${ctx}/cfg/ip/list" method="post" class="form-search">
<input id="cfgName" name="cfgName" type="hidden" value="${cfgName}"/>
<input id="action" name="action" type="hidden" value="${action}"/>
<input id="serviceId" name="serviceId" type="hidden" value="${serviceId}"/>
<input id="audit" name="audit" type="hidden" value="${audit}"/>
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
@@ -95,7 +100,7 @@
<c:set var="flI18n"><spring:message code='type'/></c:set>
<form:select path="classify" class="selectpicker select2 input-small" title="${flI18n}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${fls}" var="fl" >
<form:option value="${fl.itemCode}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
@@ -103,7 +108,7 @@
<c:set var="attributeI18n"><spring:message code='attribute'/></c:set>
<form:select path="attribute" class="selectpicker select2 input-small" title="${attributeI18n}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${xzs}" var="xz" >
<form:option value="${xz.itemCode}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
@@ -111,7 +116,7 @@
<c:set var="labelI18n"><spring:message code='label'/></c:set>
<form:select path="lable" class="selectpicker select2 input-small" title="${labelI18n}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${lables}" var="lable" >
<form:option value="${lable.itemCode}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
@@ -224,7 +229,7 @@
<div class="pull-left">
<button type="button" class="btn blue" onclick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
<button type="button" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
<button type="button" id="resetBtn" class="btn btn-default"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
</div>
</div>
@@ -313,7 +318,7 @@
<td>
<c:forEach items="${fn:split(ipCfg.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId==fl.itemCode}">
<c:if test="${fn:trim(fl.serviceDictId) eq classifyId}">
${fl.itemValue},
</c:if>
</c:forEach>
@@ -323,14 +328,14 @@
<td>
<c:forEach items="${fn:split(ipCfg.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId==xz.itemCode}">${xz.itemValue},</c:if>
<c:if test="${fn:trim(xz.serviceDictId) eq attributeId}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(ipCfg.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId==lable.itemCode}">${lable.itemValue},</c:if>
<c:if test="${fn:trim(lable.serviceDictId) eq lableId}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>

View File

@@ -152,7 +152,7 @@
<td>
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId==fl.itemCode}">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
${fl.itemValue},
</c:if>
</c:forEach>
@@ -162,14 +162,14 @@
<td>
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId==xz.itemCode}">${xz.itemValue},</c:if>
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId==lable.itemCode}">${lable.itemValue},</c:if>
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>