This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-ntc/src/main/webapp/WEB-INF/views/basics/sysDictInfoSearchList.jsp
2018-03-13 13:01:00 +08:00

316 lines
14 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ 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">
function reset(){
$("#searchForm").reset();
}
/**
处理全选、全取消
**/
function selectAll(){
//alert($("#selAll").prop("checked"));
if($("#selAll").prop("checked")){
//$("#treeTable").find(":checkbox[name='check']").attr("checked","checked");
//$("#treeTable").find(":checkbox[name='check']").each(function(){
$("input[name='check']:checkbox").each(function(){
$(this).prop("checked",true);
});
}else{
//$("#treeTable").find(":checkbox[name='check']").attr("checked",false);
//$("#treeTable").find(":checkbox[name='check']").each(function(){
$("input[name='check']:checkbox").each(function(){
//$(this).attr("checked",false);
$(this).removeProp("checked");
});
}
}
/*
系统通用方法根据参数来决定处理的url和参数
*/
function cmd(){
var url=arguments[0];
var mulitId="";
jQuery("#treeTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
if(mulitId!=""){
confirmx('您确认要执行该操作?', url+"&mulitId="+mulitId);
}else{
alert("至少选择一条数据记录");
}
}
//查询
function page(n,s){
//$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/basics/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}/basics/sysDictInfo/searchList?itType=${itType}");
$("#searchForm").submit();
return false;
}
$(document).ready(function() {
//设定显示总条数
$("#showTotalCount").text('${showTotalCount}');
//设定selected设定name 设定value
$("#seltype").find("option[value=${searchType==null?11:searchType}]").attr("selected",true);
$("#intype").attr("name",$("#seltype").find("option:selected").val());
$("#intype").val('${searchContent}');
//reset
$("#resetBtn").on("click",function(){
$(".Wdate").attr("value",'');
$("#searchForm")[0].reset();
});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#seltype").change(function(){
$("#intype").val("");
$("#intype").attr("placeholder","请输入"+$(this).find("option:selected").text());
$("#intype").attr("name",$(this).find("option:selected").val());
});
$("#treeTable").treeTable({expandLevel : 3}).show();
});
</script>
<style type="text/css">
.dropdown-menu {
min-width: 70px;
}
</style>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/basics/sysDictInfo/form?itType=${itType}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message>配置</button>
</div>
<h3 class="page-title">
${fns:getItemTypeByNo("SYS_DICT_ITM_TYPE",intArr)}
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="sysDictInfo" action="${ctx}/basics/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}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${sysDictInfo.isFilterAction}"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<%-- <div class="pull-left">
<form:select path="itemType" class="selectpicker select2 input-small" >
<form:option value="">数据类型</form:option>
<c:forEach items="${fns:getDictList('SERVICE_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>
</form:select>
</div> --%>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-small" >
<option value="itemCode"><spring:message code="item_code"></spring:message></option>
<option value="itemValue"><spring:message code="config_content"></spring:message></option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="请输入配置编码" type="text">
<div class="input-group-btn">
<button class="btn btn-default btn-search" type="button" onclick="page2()"><i class="fa fa-search"></i></button>
</div>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/form?itType=${itType}')">
<i class="fa fa-edit"></i> 编辑</button>
<button type="button" class="btn btn-default" onclick="cmd('${ctx}/basics/sysDictInfo/delete?itType=${itType}')">
<i class="fa fa-trash"></i> 删除</button>
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title="自定义列字段" href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
</div>
<!-- /搜索内容与操作按钮栏-->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-6">
<div class="pull-left">
<label>创建时间:</label>
</div>
<div class="pull-left">
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.beginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-6">
<div class="pull-left">
<label>修改时间:</label>
</div>
<div class="pull-left">
<input id="editBeginDate" name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.editBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
<div class="pull-left">
<label>到</label>
</div>
<div class="pull-left">
<input id="editEndDate" name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
value="<fmt:formatDate value="${sysDictInfo.editEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
<h5 class="page-header"></h5>
<div class="row">
<div class="pull-left">
<button type="button" class="btn blue" onclick="page2()"> <i class="fa fa-search"></i> 搜索 </button>
<button type="button" id="resetBtn" class="btn btn-default" onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<!-- <div class="table-responsive"> -->
<sys:message content="${message}"/>
<table id="treeTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
<th>序号</th>
<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><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" varStatus="se">
<tr id="${sysDictInfo.sysDictId}" pId="${sysDictInfo.parent.sysDictId ne 0?sysDictInfo.parent.sysDictId:0}">
<td><input type="checkbox" class="ckbox" name="check" value="${sysDictInfo.sysDictId}"></td>
<td>${sysDictInfo.showSequence}</td>
<td nowrap><i class="icon-icon-tablet"></i><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0">${sysDictInfo.itemCode}</a></td>
<td>${sysDictInfo.itemValue}</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="#"><spring:message code="operation"/><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&doAction=0&itType=${itType}"><spring:message code="show"/></a></li>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/sysDictInfo/form?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要修改该项配置吗?', this.href)"><spring:message code="edit"/></a></li>
</shiro:hasPermission>
<shiro:hasPermission name="sys:dict:edit">
<li><a href="${ctx}/basics/sysDictInfo/delete?sysDictId=${sysDictInfo.sysDictId}&itType=${itType}" onclick="return confirmx('您确认要删除该项配置吗?', this.href)"><spring:message code="delete"/></a></li>
</shiro:hasPermission>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>