<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/html5.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/respond.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/PIE_IE678.js"></script>
<![endif]-->
<%--<link href="${pageContext.request.contextPath }/common/css/bootstrap.min-3.3.css" rel="stylesheet" type="text/css" />--%>
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->

<style>
#datainit{
 margin-left:5px;
}

</style>
<title>用户管理</title>
</head>
<body>
<nav class="breadcrumb" style="height:45px;padding-top:5px;padding-bottom:5px"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 分销管理 <span class="c-gray en">&gt;</span>分销提现管理 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>


<%--//提现管理--开始--%>

<div class="pd-20 text-c">
	<form action="${pageContext.request.contextPath }/admin/drp/initWithdraw" method="post" id="form-admin-add" name="form1">
		<input type="hidden" id="pageNo" value=1 />
		<div>
				申请结果：<span class="select-box inline">
		    <select class="select" id="" name="status" style="width:180px;">
		    	<option value="0">请选择</option>
		      	<option value="1" <c:if test="${status == 1 }">selected="selected"</c:if>>申请中</option>
				<option value="2" <c:if test="${status == 2 }">selected="selected"</c:if>>申请成功</option>
				<option value="3" <c:if test="${status == 3 }">selected="selected"</c:if>>申请失败</option>
		    </select>
	    </span>

			<input type="text" class="input-text" style="width:200px" placeholder="输入分销商" id="name" name="name" value="${name }">
			日期范围：
			<input type="text" value="${beginDate }" readonly="readonly" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')||\'2020-10-01\'}'})" id="beginDate"  name="beginDate" class="input-text Wdate" style="width: 120px;">
			- <input type="text" value="${endDate }" readonly="readonly" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'2020-10-01'})" id="endDate" name="endDate" class="input-text Wdate" style="width: 120px;">

				<button name="" id="submitBtn" onclick="return searchInfo();" class="btn btn-success radius" type="submit">
					<i class="Hui-iconfont"></i> 搜索
				</button>

			<button name="" id="" onclick="excel()" class="btn btn-success radius" type="">
				<i class="Hui-iconfont"></i>导出Excel
			</button>
		</div>
	</form>

	<form id="goodsform" >

		<div class="mt-20">

		</div>

		<%--<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l">
				<a href="javascript:;" onclick="" class="btn btn-primary radius">
					<i class="Hui-iconfont"></i>
				</a>
		    </span>
		</div>--%>
		<table class="table table-border table-bordered table-bg" id="example">
			<thead>
			<tr>
				<th scope="col" colspan="11">提现管理列表</th>
			</tr>
			<tr class="text-c">
				<th width="100">序号</th>
				<th width="100">分销商</th>
				<th width="100">角色</th>
				<th width="100">金额(元)</th>
				<th width="100">收款人</th>
				<th width="100">收款人联系方式</th>
				<th width="100">申请状态</th>
				<th width="130">创建时间</th>
				<th width="50">操作</th>
			</tr>
			</thead>
			<tbody>
			<c:if test="${! (empty list) }">
			<c:forEach items="${list }" var="placeWD">
			<tr class="text-c">
				<input type="hidden" name="id" class="id" value="${placeWD.id }"/>
				<td>
					${placeWD.id }
				</td>
				<td>${placeWD.name }</td>
				<td>${placeWD.roleName }</td>
				<td>
					<fmt:formatNumber type="number" value="${placeWD.withDrawalsNum/100 }" pattern="0.00" maxFractionDigits="2"/>
				</td>
				<td>${placeWD.withDrawalsName }</td>
				<td>${placeWD.tel }</td>
				<td>
					<c:if test="${placeWD.status  == 1}">申请中</c:if>
					<c:if test="${placeWD.status  == 2}">申请成功</c:if>
					<c:if test="${placeWD.status  != 1 and placeWD.status  != 2}">申请失败</c:if>
				</td>

				<td>
					<fmt:formatDate value="${placeWD.createDate }" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>

				<td style="width: 110px;">
					<c:if test="${placeWD.status  == 1}">
						<a class="text-warning" href="javascript:void(0)" name="updateInfo" title="处理">处理</a>&nbsp;
					</c:if>
				</td>
				</c:forEach>
				</c:if>
				<c:if test="${(empty list)}">
				<tr class="text-c">
					<td colspan="9">
						未查询到提现记录!
					</td>
				</tr>
				<%--<div style="width: 100%;" class="text-c">未查询到提现记录!</div>--%>
				</c:if>
			</tbody>
		</table>

		<div align="right" class="mt-10 mb-10 mr-10">
			<%@include file="/common/other/paper/pager.jsp"%>
		</div>
	</form>
</div>
<%--提现管理--结束--%>



<div align="right" style="margin-right:20px;margin-top:-40px">
	<ul class="pagination" id="pagination2"></ul>
</div>  

<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/laypage/1.2/laypage.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/datatables/1.10.0/dataTableUtil.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/js/page/jqPaginator.js"></script>
<script type="text/javascript">
var gobaltable;


function searchInfo(){
    location.reload();
	//alert($("#beginDate").val());
}


//弹出修改页面
$("table").on("click","[name='updateInfo']",function(){
	//alert($(this).parent().parent().find(".id").val());
	layer.open({
		  type: 2,
		  area: ['700px', '330px'],
		  fix: false, 
		  maxmin: true,
		  content: '/tooth/admin/drp/withdrawPaper?id='+$(this).parent().parent().find(".id").val()
		});
});



function ajaxSend(url,data){
	$.ajax({
		  url: url,
		  data: data,
		  asyn:false,
		  success: function(data){
			  var obj=eval("("+data+")");
			  alert(obj.message);
			  gobaltable.ajax.reload();
		  },
		  error:function(data){
			  alert("操作失败，可能关联依赖出现问题！");
		  }
		});
	
}

//导出Excel
function excel(){
	document.form1.action='${pageContext.request.contextPath }/admin/drp/downLoadWithdraw';
	document.form1.submit();
}

</script> 
</body>
</html>