<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>账单推送</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- bootstrap 3.0.2 -->
<link href="<c:url value='/scripts/lib/layui/layui.css'/>" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="<c:url value='/styles/AdminLTE.css'/>" rel="stylesheet" type="text/css" />

<link href="<c:url value='/styles/billPush/billHistory.css'/>" rel="stylesheet" type="text/css" />  
<script type="text/javascript" src="<c:url value='/scripts/lib/jquery-1.8.2.min.js'/>"></script>

<script type="text/javascript" src="${ctx}/scripts/jquery/ajaxfileupload.js"></script>
<script type="text/javascript" src="<c:url value='/scripts/lib/layui/layui.js'/>"></script>
<%-- <script type="text/javascript" src="<c:url value='/scripts/lib/layDate/laydate.dev.js'/>"></script> --%>
<script type="text/javascript" src="<c:url value='/scripts/lib/template-native.js'/>"></script>
<script>
function goPage(pageNo){
	if(pageNo=="gopage"){
		$("#pageNo").val($("#gopage").val());
	}else{
		$("#pageNo").val(pageNo);
	}
	$("#conditionform").submit();
}
</script>
</head>
<body>
	<div class="bread-wp">
			账单推送  > 推送历史
	</div>
	<div class="right-content">
	<input type="hidden" value="${ctx}" id="contextPath">
		<div class="main-content-mode-wp" >
		 <div  id="conditionform" class="clearfloat" >
		<!--  <input type="hidden" id="pageNo" value="" name="pageNo"/> -->
		<c:if test="${fn:length(orgs) > 1}">
			<div class="part-wp">
			<span class="search-tips">项目</span>
			<select class="orgId default-select" id ="orgId" name="orgId" >
				<!-- <option value="">请选择项目</option>
				<c:forEach items="${orgs }" var="org">
				<option value="${org.id }">${org.name }</option>
				</c:forEach> -->
			</select>
			</div>
		</c:if>
		        <div class="part-wp">
		          <span class="search-tips">时间</span>
		          <input type="text" class="small-input " id="startTime"  placeholder="选择时间" name="beginTime" readonly> ~ <input type="text" placeholder="选择时间"  name="endTime" class="small-input" id="endTime" readonly>
		        </div>
		        <div class="part-wp">
		            <span class="search-tips">账单类型</span>
		            <select class="default-select bill-type" name="billType" >
		            	<option value="">选择账单类型</option>
		            	<option value="0">出账日账单</option>
		            	<option value="1">逾期账单</option>
		            </select>
		        </div>
		        <%-- <div class="part-wp">
		          <span class="search-tips">楼宇</span>
		          <select class="default-select buildings-select" name="orgId">
		          <option value="0">请选择楼宇</option>
		            <c:forEach items="${buildList }" var="buildList">
							<option value="${buildList.id }">${buildList.name }</option>
							</c:forEach>
		          </select>
		        </div> --%>
		        <!-- <div class="filter-middle part-wp">
		          <span class="floor-num search-tips">楼层</span>
		          <input type="hidden" name="floorIds" class="floors-input"/>
		          <div class="floors-wp">
		          	<span class="default-name">选择楼层</span>
		          	<ul class="floor-select"></ul>
		          </div>
		          <div class="floor-selected-list"></div>
		        </div> -->
		        <div class="filter-name part-wp">
		        	<span class="search-tips">企业名称</span>
		        	<input type="text" class="large-input vir-name" placeholder="请输入企业名称" name="virName" /> 
		        </div>
		        
         
		        <button class="search-btn btn-red" type="button">查询</button>
		        <button class="set-btn btn-white" type="button">重置</button>
	      </div>
	      <table class="layui-hide" id="LAY_table_user" lay-filter="user"></table> 
	       <%--  <div class="table-wrapper">
				<table class="table table-hover">
					<thead>
						<tr>
							<!-- <th>
								<span class="checkbox-input">
									<input type="checkbox" id="checkAll" class="check-all" />
									<span class="checkbox-inner"></span>
								</span>	
							</th> -->
							<th>
								<div style="width: 200px">推送时间</div>
							</th>
							<th>
								<div >楼宇</div>
							</th>
							<th>
								<div >楼层</div>
							</th>
							<th>
								<div >房间号</div>
							</th>
							<th>
								<div>企业名称</div>
							</th>
							<th>
								<div >账单类型</div>
							</th>
							<th>
								<div >账单接收人</div>
							</th>
							<th>
								<div>账单金额</div>
							</th>
							<th>
								<div>微信推送详情</div>
							</th>
							<th>
								<div>短信推送详情</div>
							</th>
							<th>
								<div>邮件推送详情</div>
							</th>
							<th>
								<div style="width: 110px">微信状态</div>
							</th>
							<th>
								<div style="width: 110px">短信状态</div>
							</th>
							<th>
								<div style="width: 110px">邮件状态</div>
							</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${page.items}" var="item">
						
							<tr>
								<!-- <td>
								    <span class="checkbox-input">
									    <input type="checkbox" name="chkBtn"
										value="" class="check-item">
										<span class="checkbox-inner"></span>
								    </span>		
								</td> -->
								<td>
									${item.createTime} 
								</td>
							    <td>
									${item.orgName}
								</td> 
								  <td>
									${item.floorNames}
								</td>
								<td>
									${item.roomName}
								</td>
								<td>
									${item.virName}
								</td>
								<td>
									<c:if test="${item.billType==0}">
										出账日账单
									</c:if>
									<c:if test="${item.billType==1}">
										逾期账单
									</c:if>
								</td>
								<td>
									${item.pushUser1}
									<c:choose>
										<c:when test="${not empty  item.pushUser2 &&  not empty  item.pushUser1}">
											;${item.pushUser2}
										</c:when>
										<c:when  test="${not empty  item.pushUser2 }" >
											${item.pushUser2}
										</c:when>
									</c:choose>
									<c:if test="${not empty  item.pushUser2 }">
										;${item.pushUser2}
									</c:if>
									
								</td>
								<td>
									${item.pushAmount}
								</td> 
								<td>
								
									<c:if test="${(item.wechatStatus==1 || item.wechatStatus== 2 || item.wechatStatus==3) &&  item.billType==0}"> 
										<span class="check-btn" title="详情" data-title = "${title1}" data-remark="${remark1 }" data-begin="${item.beginTime }"   data-end="${item.endTime}"    data-money="${item.pushAmount }"  data-month="${item.monthDate }" data-type="1" data-createtime="${item.createTime}">详情</span>          
									</c:if> 
									<c:if test="${(item.wechatStatus==1 || item.wechatStatus== 2 || item.wechatStatus==3) &&  item.billType==1}">
										<span class="check-btn" title="详情" data-title = "${title2}" data-remark="${remark2}" data-begin="${item.beginTime }"  data-end="${item.endTime}"   data-money="${item.pushAmount }"  data-month="${item.monthDate }" data-type="1" data-createtime="${item.createTime}">详情</span>          
									</c:if>
								</td>
								<td>
							
									<c:if test="${not empty item.messageData}">
										<span class="check-btn" title="详情" data-con = "${item.messageData}" data-type="2">详情</span>             
									</c:if>
								</td>
								<td>
								
									<c:if test="${not empty item.emailData}">
										<span class="check-btn" title="详情" data-con = "${item.emailData}" data-type="3">详情</span>             
									</c:if>
								</td>   
								<td>
								
									<c:if test="${item.wechatStatus==0 && item.isWechat ==1}">
										失败
									</c:if>
									<c:if test="${item.wechatStatus==0 && item.isWechat ==0}">
										无权限
									</c:if>
									<c:if test="${item.wechatStatus==1}">
										负责人1发送成功
									</c:if>
									<c:if test="${item.wechatStatus==2}">
										负责人2发送成功
									</c:if>
									<c:if test="${item.wechatStatus==3}">
										发送成功
									</c:if>
									<c:if test="${item.wechatStatus==0}">
										失败
									</c:if>
								</td>
								<td>
									<c:if test="${item.messageStatus==0 && item.isMessage ==1}">
										失败
									</c:if>
									<c:if test="${item.messageStatus==0 && item.isMessage ==0}">
										无权限
									</c:if>
									<c:if test="${item.messageStatus==1}">
										负责人1发送成功
									</c:if>
									<c:if test="${item.messageStatus==2}">
										负责人2发送成功
									</c:if>
									<c:if test="${item.messageStatus==3}">
										发送成功
									</c:if>
									<c:if test="${item.messageStatus==0}">
										失败
									</c:if>
								</td>
								<td>
									<c:if test="${item.emailStatus==0 && item.isEmail ==1}">
										失败
									</c:if>
									<c:if test="${item.emailStatus==0 && item.isEmail ==0}">
										无权限
									</c:if>
									<c:if test="${item.emailStatus==1}">
										负责人1发送成功
									</c:if>
									<c:if test="${item.emailStatus==2}">
										负责人2发送成功
									</c:if>
									<c:if test="${item.emailStatus==3}">
										发送成功
									</c:if>
									<c:if test="${item.emailStatus==0}">
										失败
									</c:if>
								</td>   
							</tr>
						</c:forEach> 
						
					</tbody>
				</table>
			</div>
			<div class="btn-page">
                   <!-- 页码 -->
                   <div align="center" class="pages clearfix">
                          <c:forEach items="${page.iterPages }" var="pageNo">
						<c:choose>
							<c:when test="${pageNo == page.currentPage }">
								<span class='current'>${pageNo }</span>
							</c:when>
							<c:when test="${pageNo != null}">
								<a href="javascript:void(0);" onclick='goPage(${pageNo});'>${pageNo}</a>
							</c:when>
							<c:otherwise>
								<em>...</em>
							</c:otherwise>
						</c:choose>
					</c:forEach>
					<strong>共<span style="color:black;font-weight:bold;font-size:16px;">${page.totalCount}</span>条</strong>
					<strong>跳转到第</strong><input type="text" id="gopage" style="width: 40px;" onkeyup="this.value=this.value.replace(/\D/g,'')" onkeypress="this.value=this.value.replace(/\D/g,'')"/><strong>页</strong>
					<a class="btn btn-red jump-btn" href="javascript:goPage('gopage');" >确定</a>
               	</div> 
            </div>
		</div> --%>
	</div> 
	<script type="text/html" id="indexTpl">
    {{d.LAY_TABLE_INDEX+1}}
</script>
<script type="text/javascript" src="<c:url value='/scripts/admin/billPush/billHistory.js'/>"></script>  
</body>
</html>