<%@ 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" %>
<!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,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/favicon.ico" >
<LINK rel="Shortcut Icon" href="/favicon.ico" />
<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/css/style.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" />
<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/Validform/5.3.2/Validform.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/icheck/jquery.icheck.min.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>
<title>待返利列表</title>
</head>
<body>
<nav class="breadcrumb"><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);" id="re-fresh" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="8">待返利列表</th>
			</tr>
			<tr class="text-c">
				<th width="150">购买人</th>
				<th width="40">被返利人</th>
				<th width="150">订单号</th>
				<th width="150">租期</th>
				<th width="150">消费金额</th>
				<th width="100">返利金额(分)</th>
				<th width="100">创建时间</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:choose>
				<c:when test="${!(empty list)}">
					<c:forEach items="${list }" var="v">
						<tr class="text-c">
							<td class="nick-td">${v.userNickName}</td>
							<td class="nick-td">${v.reUserNickName }</td>
							<td>${v.recordOrderId }</td>
							<td>${v.rentType }</td>
							<td title="请点击查看订单信息">**.**</td>
							<td>${v.recordMoney}分</td>
							<td><fmt:formatDate value="${v.recordCreateTime}" pattern="yyyy年MM月dd日"/></td>
							<td class="td-manage">
								<a title="确认微信打款" href="javascript:;" onclick="admin_edit('管理员权限编辑','/admin/admin/_permission_edit',${v.recordId},'800','500')" class="ml-5" style="text-decoration:none">
									<i class="Hui-iconfont">&#xe628;</i>
								</a>
								<a title="查看订单信息" href="javascript:;" onclick="admin_edit('订单详情','/admin/admin/_edit',${v.recordId},'800','500')" class="ml-5" style="text-decoration:none">
									<i class="Hui-iconfont">&#xe695;</i>
								</a>
							</td>
						</tr>
					</c:forEach>
				</c:when>
				<c:otherwise>
					<tr class="text-c">
						<th colspan="8">暂无数据</th>
					</tr>
				</c:otherwise>
			</c:choose>
		</tbody>
	</table>
</div>
<div align="right">
	<%@include file="/common/other/paper/pager.jsp"%>
</div>
</body>
<script type="text/javascript">
	$(function () {
		decode_nick();
		// 编码用户昵称
		function decode_nick() {
			var tds = $(".nick-td");
			for (var i = 0; i < tds.length; i++) {
				var $this = $(tds[i]);
				$this.html(decodeURI($this.html()));
			}
		}
	});

	/* 微信打款 */
	function trans_pay(id) {
		// 发起请求
		var url = "${pageContext.request.contextPath}/admin/rebate/transfer_pay";
		$.post(url,{"rebateId":id},function(result){
			if (result.resultCode != 200 || result.returnCode != 200) {
				layer.msg("打款成功!",{icon: 1,time:3000});
				return;
			} else {
				layer.msg("打款失败，请重试!",{icon: 5,time:3000});
			}
		});
	}
</script>
</html>