Pro/application/agent/view/report/player.html
2026-02-25 01:50:31 +08:00

281 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>后台管理系统</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="/static/agent/css/font.css">
<link rel="stylesheet" href="/static/agent/css/xadmin.css">
<script type="text/javascript" src="/static/agent/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/agent/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/static/agent/js/xadmin.js"></script>
<!-- 让IE8/9支持媒体查询从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.search-box.margin-bottom{ margin-bottom:2px; }
.search-box span{ display:inline-block; width:70px; text-align:right; }
.search-box .gap{display:inline-block;margin-right:20px;}
.layui-form-select{display:inline-block;}
.layui-form-select .layui-input{height:28px;}
.layui-btn.time-btn{height:28px;padding:0 10px;margin:10px 0 0 5px;background:#67B8D8;}
.layui-form-radio{margin:0;}
</style>
</head>
<body class="iframeClass scroll-wrapper">
<!-- 遮罩loading -->
<div class="shadow"></div>
<img class="loading" src="/static/agent/images/loading.gif">
<div class="x-body">
<div class="layui-row">
<form class="layui-form layui-col-md12 x-so" action="/report/player" method="get">
<input type="hidden" name="agent_id" value="{$user_info.id}">
<div class="search-box margin-bottom">
<div class="gap">
<span>开始时间:</span>
<input type="text" name="startDate" placeholder="开始时间" id="start" autocomplete="off" class="layui-input search-input" value="<?php if(isset($get['startDate'])) echo $get['startDate']; ?>">
</div>
<div class="gap">
<span>结束时间:</span>
<input type="text" name="endDate" placeholder="结束时间" id="end" autocomplete="off" class="layui-input search-input" value="<?php if(isset($get['endDate'])) echo $get['endDate']; ?>">
</div>
<div class="gap">
<span>归属类型:</span>
<input class="is_under" type="radio" name="is_under" value="1" title="全部" <?php if(isset($get['is_under']) && $get['is_under'] == 1) echo 'checked'; ?>>
<input class="is_under" type="radio" name="is_under" value="2" title="直属" <?php if(isset($get['is_under']) && $get['is_under'] == 2) echo 'checked'; ?>>
</div>
</div>
<div class="search-box margin-bottom">
<div class="gap">
<span >游戏类型:</span>
<select name="game_id" class="layui-select">
<option value="0">全部</option>
<option value="1" <?php if(isset($get['game_id']) && $get['game_id'] == 1) echo 'selected="selected"'; ?>>百家乐</option>
<option value="2" <?php if(isset($get['game_id']) && $get['game_id'] == 2) echo 'selected="selected"'; ?>>龙虎</option>
<option value="4" <?php if(isset($get['game_id']) && $get['game_id'] == 4) echo 'selected="selected"'; ?>>牛牛</option>
</select>
</div>
<div class="gap">
<span>会员账号:</span>
<input type="text" name="username" placeholder="会员账号" autocomplete="off" class="layui-input search-input" value="<?php if(isset($get['username'])) echo $get['username']; ?>">
</div>
<div class="gap">
<button class="layui-btn search-btn" id="search" onclick="showShadow()">查找</button>
<a class="layui-btn search-btn" onclick="showShadow()" href="javascript:location.replace(location.href);" title="刷新">刷新</a>
<a class="layui-btn search-btn" href="javascript:;" title="导出" id="export">导出</a>
</div>
</div>
</form>
</div>
<div class="layui-form">
<table class="layui-table">
<a class="layui-btn time-btn" href="javascript:;" data-type="2" title="今日">今日</a>
<a class="layui-btn time-btn" href="javascript:;" data-type="1" title="昨日">昨日</a>
<a class="layui-btn time-btn" href="javascript:;" data-type="4" title="本月">本月</a>
<a class="layui-btn time-btn" href="javascript:;" data-type="3" title="上月">上月</a>
<a class="layui-btn time-btn" href="javascript:;" data-type="5" title="全部">全部</a>
<thead>
<tr>
<th>台类型</th>
<th>名称</th>
<th>账号</th>
<th>当前金额</th>
<th>下注次数</th>
<th>下注总额</th>
<th>总赢</th>
<th>总洗码</th>
<th>洗码方式</th>
<th>百/龙洗码率%</th>
<th>洗码费</th>
<th>总收益</th>
<!--
<th>洗码费(全部未结)</th>
<th>操作</th>
-->
</thead>
<tbody>
<?php if(count($player_list) > 0): ?>
<tr style="background:#67B8D8;color:#fff;">
<td>合计</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>{$totalData.count}</td>
<td><?php echo number_format($totalData['amount'],2,".",""); ?></td>
<td><?php echo number_format($totalData['win_total'],2,".",""); ?></td>
<td><?php echo number_format($totalData['ximaliang'],2,".",""); ?></td>
<td>-</td>
<td>-</td>
<td><?php echo number_format($totalData['maliang'],2,".",""); ?></td>
<td><?php echo number_format($totalData['income'],2,".",""); ?></td>
<!--
<td><?php echo number_format($totalData['maliang_unbalanced'],2,".",""); ?></td>
<td>-</td>
-->
</tr>
<?php endif; ?>
{foreach name="$player_list" item="vo"}
<tr>
<td>{$vo.table_name}</td>
<td>{$vo.nickname}</td>
<td>{$vo.username}</td>
<td><?php echo number_format($vo['money'],2,".",""); ?></td>
<td>{$vo.count}</td>
<td><?php echo number_format($vo['amount'],2,".",""); ?></td>
<td><?php echo number_format($vo['win_total'],2,".",""); ?></td>
<td><?php echo number_format($vo['ximaliang'],2,".",""); ?></td>
<th>{$vo.type_xima_msg}</th>
<td>{$vo.ximalv}</td>
<td><?php echo number_format($vo['maliang'],2,".",""); ?></td>
<td><?php echo number_format($vo['income'],2,".",""); ?></td>
<!--
<td><?php echo number_format($vo['maliang_unbalanced'],2,".",""); ?></td>
<td>
{if $vo.agent_parent_id == $user_info.id}
<a class="layui-btn layui-operation" href="javascript:;" onclick="x_admin_show('会员洗码 > {$vo.username}({$vo.nickname})','/settle/xima?user_id={$vo.id}')">洗码</a>
{/if}
</td>
-->
</tr>
{/foreach}
</tbody>
</table>
<?php if(count($player_list) == 0): ?>
<div style="text-align:center;width:100%;">没有数据</div>
<?php endif; ?>
</div>
</div>
<script>
layui.use('laydate', function () {
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#start' //指定元素
,type:'datetime'
});
//执行一个laydate实例
laydate.render({
elem: '#end' //指定元素
,type:'datetime'
});
});
// 归属类型切换
$(document).on('click','.layui-form-radio',function(){
$('#search').trigger('click');
});
// 快捷时间选择
$('.time-btn').click(function(){
var type = $(this).attr('data-type');
var result = getNeedTime(type,1);
$('#start').val(result.startDate);
$('#end').val(result.endDate);
$('#search').trigger('click');
});
// 导出excel
$('#export').click(function(){
layer.confirm('确定导出 excel 吗?',function(index){
location.href = "/report/player?export=1&{$query}";
layer.close(index);
});
});
// 自定义时间函数
function getNeedTime(type,format){
var now = new Date();
var year = now.getFullYear();
var query = new Object();
var startYear;
var endYear;
var startMonth;
var endMonth;
var startDay;
var endDay;
var startDate;
var endDate;
switch(parseInt(type)){
// 昨天
case 1:
startYear = year;
endYear = year;
startMonth = plusZero(now.getMonth() + 1);
endMonth = plusZero(now.getMonth() + 1);
startDay = plusZero(now.getDate() - 1);
endDay = plusZero(now.getDate() - 1);
break;
// 今天
case 2:
startYear = year;
endYear = year;
startMonth = plusZero(now.getMonth() + 1);
endMonth = plusZero(now.getMonth() + 1);
startDay = plusZero(now.getDate());
endDay = plusZero(now.getDate());
break;
// 上月
case 3:
startYear = year;
endYear = year;
startMonth = plusZero(now.getMonth());
endMonth = plusZero(now.getMonth());
startDay = '01';
endDay = plusZero(new Date(year,endMonth,0).getDate());
break;
// 本月
case 4:
startYear = year;
endYear = year;
startMonth = plusZero(now.getMonth() + 1);
endMonth = plusZero(now.getMonth() + 1);
startDay = '01';
endDay = plusZero(new Date().getDate());
break;
// 全部
case 5:
startYear = '2018';
endYear = year;
startMonth = '01';
endMonth = plusZero(now.getMonth() + 1);
startDay = '01';
endDay = plusZero(new Date().getDate());
break;
}
if(format == 1){
startDate = startYear + '-' + startMonth + '-' + startDay + ' 00:00:00';
endDate = endYear + '-' + endMonth + '-' + endDay + ' 23:59:59';
}else{
startDate = startYear + '-' + startMonth + '-' + startDay;
endDate = endYear + '-' + endMonth + '-' + endDay;
}
query.startDate = startDate;
query.endDate = endDate;
return query;
}
// 月和日 前加0;
function plusZero(str){
if(str != undefined){
if(str >= 1 && str <= 9){
str = "0" + str.toString();
}
}
return str;
}
</script>
</body>
</html>