<%@page import="com.blueland.bpm.log.model.*" %>
<%@page import="com.blueland.bpm.common.page.*" %>
<%@page import="java.util.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="/commons/meta.jsp" %>
	<base href="<%=basePath%>">
	<title>EsbMsgLog管理</title>
	<link href="${ctx_js_plugins}/simpletable/simpletable.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="${ctx_js_plugins}/simpletable/simpletable.js"></script>

	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		});
	</script>
</head>
<body>
	<%@ include file="/commons/messages.jsp" %>
	<form id="queryForm" name="queryForm" action="${ctx}/esbMsgLog/list.do" method="get" style="display: inline;">
			
		<div class="panel panel-primary">
			<div class="panel-heading">
				ESB消息日志
			</div>
			<div class="panel-body">
				<div class="form-group well well-sm">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-search">
						<tr>	
							<td>标题：</td>		
							<td>
								<input  class="input" value="${query.title}" id="title" name="title" maxlength="1000"  />
							</td>
							<td>状态：</td>		
							<td>
									<select name="status" id="status" >
										<option value="" ${query.status==""?"selected":""}>请选择</option>
							    		<option value="s" ${query.status=="1"?"selected":""}>成功</option>
							    		<option value="e" ${query.status=="2"?"selected":""}>失败</option>
							    		<option value="r" ${query.status=="3"?"selected":""}>已重发</option>
							    		<option value="j" ${query.status=="5"?"selected":""}>已跳过</option>
				    				</select>
							</td>
							<td>操作类型：</td>		
							<td>
								<select name="operation" id="operation" >
										<option value="" ${query.operation==""?"selected":""}>请选择</option>
						    		<option value="1" ${query.operation=="1"?"selected":""}>待办</option>
						    		<option value="2" ${query.operation=="2"?"selected":""}>已办</option>
						    		<option value="3" ${query.operation=="3"?"selected":""}>办结</option>
						    		<option value="5" ${query.operation=="5"?"selected":""}>删除</option>
				    			</select>
							</td>
							<td>业务对象ID：</td>		
							<td>
								<input  class="input" value="${query.bizId}" id="bizId" name="bizId" maxlength="100"  />
							</td>
						</tr>
						<tr>
							<td>ESB对应业务ID：</td>		
							<td>
								<input  class="input" value="${query.esbBizid}" id="esbBizid" name="esbBizid" maxlength="100"  />
							</td>
							<td>应用系统：</td>		
							<td>
								<input  class="input" value="${query.appId}" id="appId" name="appId" maxlength="100"  />
							</td>
							<td>创建时间：</td>		
							<td>
								<input  class="input"  value="${query.createTimeString}" onclick="WdatePicker({dateFmt:'<%=EsbMsgLog.FORMAT_CREATE_TIME%>'})" id="createTimeString" name="createTimeString"   />
								
							</td>
						</tr>	
							
						<tr>
							<td colspan="7">
								<input value="查询"  type="submit" class="btn btn-xs btn-primary" onclick="getReferenceForm(this).action='${ctx}/esbMsgLog/list.do'"/>
								<input value="删除"  type="button" class="btn btn-xs btn-danger" onclick="batchDelete('${ctx}/esbMsgLog/delete.do','items',document.forms.queryForm)"/>
							</td>
						</tr>
					</table>
				</div>
			
			<div class="row">
				<div class="col-xs-12">
					<div class="table-responsive">
						<table id="sample-table-1" class="table table-striped table-bordered table-hover">
					<thead>
					  <tr>
						<th style="width:25px;"><input type="checkbox" onclick="setAllCheckboxState('items',this.checked)"></th>
						<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
						<th sortColumn="title" >标题</th>
						<th sortColumn="xmlContent" >消息内容</th>
						<th sortColumn="operation" >操作类型</th>
						<th sortColumn="createTime" >创建时间</th>
						<th sortColumn="status" >状态</th>
						<th sortColumn="userNames" >用户名称</th>
						<th sortColumn="appId" >应用系统</th>
					  </tr>
					</thead>
				<tbody>
		  
				   <c:forEach items="${page.result}" var="item" varStatus="status">
		  	  
			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				
				<td><input type="checkbox" name="items" value="logId=${item.logId}&"></td>
				<td>${item.title}&nbsp;</td>
				<td><textarea style="width: 400px">${item.xmlContent}&nbsp;</textarea></td>
				<td>${item.operation}&nbsp;</td>
				<td>${item.createTimeString}&nbsp;</td>
				<td>${item.status}&nbsp;</td>
				<td>${item.userNames}&nbsp;</td>
				<td>${item.appId}&nbsp;</td>
				
			  </tr>
			  
		  	  </c:forEach>
				</tbody>
				</table>
				<simpletable:pageToolbar page="${page}">
				</simpletable:pageToolbar>
			</div>
						<!-- /.table-responsive -->
					</div>
					<!-- /span -->
				</div>
			</div>
		</div>
		</form>
</body>
</html>	
