<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>导入日志信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		});
	</script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
	<div class="layui-row">
		<div class="full-width fl">
			<div class="layui-row" id="queryDiv">

			<form:form id="searchForm" modelAttribute="sysImportInfo" action="${ctx}/sysimportinfo/sysimportinfo/list?modular=${modular}" method="post" class="form-inline">
				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
				<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->

				<div class="commonQuery">
					<div class="layui-item query athird">
						<span class="layui-form-label">导入人员：</span>
						<div class="layui-input-block with-icon">
							<sys:treeselect id="createBy" name="createBy.id" value="${sysImportInfo.createBy.id}" labelName="createBy.name" labelValue="${sysImportInfo.createBy.name}"
											title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control input-sm" allowClear="true" notAllowSelectParent="true"/>
						</div>
					</div>
					<div class="layui-item query athird">
						<span class="layui-form-label">是否成功：</span>
						<div class="layui-input-block">
							<form:select path="isTrue"  class="form-control simple-select">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</div>
					</div>
					<div class="layui-item athird fr">
						<div class="input-group">
							<button id="searchReset" class="fixed-btn searchReset fr" style="margin-right: 0px;" onclick="resetSearch()">重置</button>
							<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
						</div>
					</div>
					<div style="    clear:both;"></div>
				</div>
			</form:form>
			</div>
		</div>
		<div class="full-width fl">
			<div class="layui-item layui-col-xs12 form-table-container">
				<div class="nav-btns">
					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
					<div style="clear: both;"></div>
				</div>
				<table id="contentTable" class="table details table-bordered table-condensed">
					<thead>
						<tr>
							<th  class="sort-column createDate" width="170px">导入时间</th>
							<th  class="sort-column createBy.name" width="100px">导入用户</th>
							<th  class="sort-column isTrue" width="100px">是否成功</th>
							<th  class="sort-column errCount" width="100px">失败条数</th>
							<th  class="sort-column errInfo">失败信息</th>
							<th width="80px">操作</th>
						</tr>
					</thead>
					<tbody>
					<c:forEach items="${page.list}" var="sysimportinfo">
						<tr>
							<td>
								<fmt:formatDate value="${sysimportinfo.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
							</td>
							<td>
								${sysimportinfo.createBy.name}
							</td>
							<td>
									${fns:getDictLabel(sysimportinfo.isTrue, 'yes_no', '')}
							</td>
							<td>
									${sysimportinfo.errCount}
							</td>
							<td title="${sysimportinfo.errInfo}">
								${sysimportinfo.errInfo}
							</td>
							<td>
								<c:choose>
									<c:when test="${sysimportinfo.isTrue eq 0}">
										<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${sysimportinfo.url}" class="op-btn op-btn-download">下载日志</a>
									</c:when>
								</c:choose>
							</td>
						</tr>
					</c:forEach>
					</tbody>
				</table>

				<!-- 分页代码 -->
				<table:page page="${page}"></table:page>
			</div>
		</div>
		<div class="form-group layui-row page-end"></div>
	</div>
</div>
</body>
</html>