351 lines
16 KiB
HTML
351 lines
16 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>{$lang['system_name']}</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:90px; 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;}
|
||
.high-a{text-decoration: underline;color:dodgerblue;}
|
||
</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/agent" method="get">
|
||
<div class="search-box margin-bottom">
|
||
<div class="gap">
|
||
<span>{$lang['start_time']}:</span>
|
||
<input type="text" name="startDate" placeholder="{$lang['start_time']}" id="start" autocomplete="off" class="layui-input search-input" value="<?php if(isset($get['startDate'])) echo $get['startDate']; ?>">
|
||
</div>
|
||
<div class="gap">
|
||
<span>{$lang['end_time']}:</span>
|
||
<input type="text" name="endDate" placeholder="{$lang['end_time']}" id="end" autocomplete="off" class="layui-input search-input" value="<?php if(isset($get['endDate'])) echo $get['endDate']; ?>">
|
||
</div>
|
||
</div>
|
||
<div class="search-box margin-bottom">
|
||
<div class="gap">
|
||
<span >{$lang['game_type']}:</span>
|
||
<select name="game_id" class="layui-select">
|
||
<option value="0">{$lang['all']}</option>
|
||
<option value="1" <?php if(isset($get['game_id']) && $get['game_id'] == 1) echo 'selected="selected"'; ?>>{$lang['baccarat']}</option>
|
||
<option value="2" <?php if(isset($get['game_id']) && $get['game_id'] == 2) echo 'selected="selected"'; ?>>{$lang['dt']}</option>
|
||
<option value="4" <?php if(isset($get['game_id']) && $get['game_id'] == 4) echo 'selected="selected"'; ?>>{$lang['cow']}</option>
|
||
<!--
|
||
<option value="5" <?php if(isset($get['game_id']) && $get['game_id'] == 5) echo 'selected="selected"'; ?>>{$lang['three_card']}</option>-->
|
||
<option value="6" <?php if(isset($get['game_id']) && $get['game_id'] == 6) echo 'selected="selected"'; ?>>{$lang.color_plate}</option>
|
||
<option value="7" <?php if(isset($get['game_id']) && $get['game_id'] == 7) echo 'selected="selected"'; ?>>{$lang.sic_bo}</option>
|
||
<option value="8" <?php if(isset($get['game_id']) && $get['game_id'] == 8) echo 'selected="selected"'; ?>>{$lang.roulette}</option>
|
||
</select>
|
||
</div>
|
||
<div class="gap">
|
||
<span class="margin-left">{$lang['username']}:</span>
|
||
<input type="text" name="username" placeholder="{$lang['username']}" 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()">{$lang['search']}</button>
|
||
<a class="layui-btn search-btn" onclick="showShadow()" href="javascript:location.replace(location.href);">{$lang['refresh']}</a>
|
||
<a class="layui-btn search-btn" href="javascript:;" title="导出" id="export">{$lang['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">{$lang['today']}</a>
|
||
<a class="layui-btn time-btn" href="javascript:;" data-type="1">{$lang['yesterday']}</a>
|
||
<a class="layui-btn time-btn" href="javascript:;" data-type="6">{$lang['this_week']}</a>
|
||
<a class="layui-btn time-btn" href="javascript:;" data-type="7">{$lang['last_week']}</a>
|
||
<a class="layui-btn time-btn" href="javascript:;" data-type="4">{$lang['this_month']}</a>
|
||
<a class="layui-btn time-btn" href="javascript:;" data-type="3">{$lang['last_month']}</a>
|
||
<a class="layui-btn time-btn" href="javascript:;" data-type="5">{$lang['all']}</a>
|
||
<thead>
|
||
<tr>
|
||
<th>{$lang['member_type']}</th>
|
||
<th>{$lang['nickname']}</th>
|
||
<th>{$lang['username']}</th>
|
||
<th>{$lang['account_balance']}</th>
|
||
<th>{$lang['all_bet']}</th>
|
||
<th>{$lang['all_win']}</th>
|
||
<th>{$lang.chess_card}{$lang['all_bet']}</th>
|
||
<th>{$lang.chess_card}{$lang['all_win']}</th>
|
||
<th>{$lang['collect_pay_money_subordinates']}</th>
|
||
<th>{$lang['collect_pay_money_superiors']}</th>
|
||
<?php if($top_agent['agent_type'] == 2): ?>
|
||
<th>{$lang['code_washing_amount']}</th>
|
||
<th>{$lang['code_amount']}</th>
|
||
<th>{$lang['share_code_amount']}</th>
|
||
<th>{$lang['code_income']}</th>
|
||
<?php endif ?>
|
||
<th>{$lang['share_income']}</th>
|
||
<?php if($top_agent['agent_type'] == 1): ?>
|
||
<th>{$lang['rebate_income']}</th>
|
||
<th>{$lang['qp_rebate_income']}</th>
|
||
<?php endif ?>
|
||
<th>{$lang['all_income']}</th>
|
||
<?php if($top_agent['agent_type'] == 2): ?>
|
||
<th>{$lang['baccarat']}/{$lang['dt']}/{$lang['cow']}<br>{$lang['washing_rate']}%</th>
|
||
<?php endif; ?>
|
||
<th>{$lang['share_ratio']}%</th>
|
||
<?php if($top_agent['agent_type'] == 1): ?>
|
||
<th>{$lang['rebate_rate']}%</th>
|
||
<?php endif; ?>
|
||
<th>{$lang['operate']}</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach name="$list" item="vo"}
|
||
<tr>
|
||
<td><?php if($vo['agent'] == 1){echo '<font style="color:#0037ff;">代理</font>';}else{echo '<font style="color:#ca7609;">会员</font>';} ?></td>
|
||
<td>{$vo.nickname}</td>
|
||
<td>{$vo.username}</td>
|
||
<td><?php echo number_format($vo['money'],2,".",""); ?></td>
|
||
<td><a class="high-a" href="javascript:;" onclick="x_admin_show('{$lang[\'details_1\']} > {$vo.username}({$vo.nickname})','/report/bet?{$query}&username={$vo.username}')"><?php echo number_format($vo['amount'],2,".",""); ?></a></td>
|
||
<td>{$vo.win_total}</td>
|
||
<td><a class="high-a" href="javascript:;" onclick="x_admin_show('{$lang[\'details_1\']} > {$vo.username}({$vo.nickname})','/report/game_log?{$query}&username={$vo.username}')"><?php echo number_format($vo['qp_amount'],2,".",""); ?></a></td>
|
||
<td>{$vo.qp_win_total}</td>
|
||
<td><?php if($vo['income_down'] < 0){echo '<font style="color:#f00;">'.number_format($vo['income_down'],2,".","").'</font>';}else{echo '<font style="color:#1f9433">'.number_format($vo['income_down'],2,".","").'<font>';} ?></td>
|
||
<td><?php if($vo['income_up'] < 0){echo '<font style="color:#f00;">'.number_format($vo['income_up'],2,".","").'</font>';}else{echo '<font style="color:#1f9433">'.number_format($vo['income_up'],2,".","").'<font>';} ?></td>
|
||
<?php if($top_agent['agent_type'] == 2): ?>
|
||
<td>{$vo.ximaliang}</td>
|
||
<td>{$vo.maliang}</td>
|
||
<td>{$vo.share_maliang}</td>
|
||
<td>{$vo.income_maliang}</td>
|
||
<?php endif; ?>
|
||
<td>{$vo.income_cs}</td>
|
||
<?php if($top_agent['agent_type'] == 1): ?>
|
||
<td>{$vo.rebate_amount}</td>
|
||
<td>{$vo.qp_rebate_amount}</td>
|
||
<?php endif; ?>
|
||
<td>{$vo.income}</td>
|
||
<?php if($top_agent['agent_type'] == 2): ?>
|
||
<td>{$vo.ximalv}</td>
|
||
<?php endif; ?>
|
||
<?php if($vo['agent'] == 0): ?>
|
||
<td>-</td>
|
||
<?php else: ?>
|
||
<td><?php echo number_format($vo['agent_cs'],2,".",""); ?> %</td>
|
||
<?php endif; ?>
|
||
<?php if($top_agent['agent_type'] == 1): ?>
|
||
<td>{$vo.rebate_rate}</td>
|
||
<?php endif; ?>
|
||
<?php if($vo['id'] == $user_info['id'] || $vo['agent'] == 0): ?>
|
||
<td>-</td>
|
||
<?php else: ?>
|
||
<td>
|
||
<a class="layui-btn layui-operation child-true" href="javascript:;" onclick="x_admin_show('{$lang[\'subordinates\']} > {$vo.username}({$vo.nickname})','/report/agent?{$query}&username={$vo.username}')">{$lang['subordinates']}</a>
|
||
</td>
|
||
<?php endif; ?>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
<?php if(count($list) == 0): ?>
|
||
<div style="text-align:center;width:100%;">{$lang['no_data']}</div>
|
||
<?php endif; ?>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<script>
|
||
layui.use('laydate', function () {
|
||
var laydate = layui.laydate;
|
||
var langType = '{$langType}';
|
||
if(langType != 'zh-cn'){
|
||
dateLang = 'en'
|
||
}else{
|
||
dateLang = 'cn';
|
||
}
|
||
// 计算默认时间:今天07:00:00 ~ 明天06:59:59
|
||
var now = new Date();
|
||
var y = now.getFullYear();
|
||
var m = ('0' + (now.getMonth() + 1)).slice(-2);
|
||
var d = ('0' + now.getDate()).slice(-2);
|
||
var tomorrow = new Date(now.getTime() + 86400000);
|
||
var ty = tomorrow.getFullYear();
|
||
var tm = ('0' + (tomorrow.getMonth() + 1)).slice(-2);
|
||
var td = ('0' + tomorrow.getDate()).slice(-2);
|
||
var defaultStart = y + '-' + m + '-' + d + ' 07:00:00';
|
||
var defaultEnd = ty + '-' + tm + '-' + td + ' 06:59:59';
|
||
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#start'
|
||
,type:'datetime',
|
||
lang: dateLang,
|
||
value: defaultStart
|
||
});
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#end'
|
||
,type:'datetime',
|
||
lang: dateLang,
|
||
value: defaultEnd
|
||
});
|
||
});
|
||
|
||
// 归属类型切换
|
||
$(document).on('click','.layui-form-radio',function(){
|
||
$('#search').trigger('click');
|
||
});
|
||
|
||
// 快捷时间选择
|
||
$('.time-btn').click(function(){
|
||
var type = $(this).attr('data-type');
|
||
if(type == 6 || type == 7){
|
||
var result = getNeedTime(type,0);
|
||
}else{
|
||
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/agent?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;
|
||
// 本周
|
||
case 6:
|
||
var weekday = new Date().getDay() || 7;
|
||
var startDay = new Date(new Date().setDate(new Date().getDate() - weekday + 1)).format('yyyy-MM-dd');
|
||
var endDay = new Date(new Date().setDate(new Date().getDate() - weekday + 7)).format('yyyy-MM-dd');
|
||
break;
|
||
//上周
|
||
case 7:
|
||
var weekday = new Date().getDay() || 7;
|
||
var startDay = new Date(new Date().setDate(new Date().getDate() - weekday - 6)).format('yyyy-MM-dd');
|
||
var endDay = new Date(new Date().setDate(new Date().getDate() - weekday)).format('yyyy-MM-dd');
|
||
break;
|
||
}
|
||
if(format == 1){
|
||
startDate = startYear + '-' + startMonth + '-' + startDay + ' 07:00:00';
|
||
endDate = endYear + '-' + endMonth + '-' + endDay + ' 06:59:59';
|
||
}else{
|
||
startDate = startDay + ' 07:00:00';
|
||
endDate = endDay + ' 06:59:59';
|
||
}
|
||
|
||
query.startDate = startDate;
|
||
query.endDate = endDate;
|
||
return query;
|
||
}
|
||
Date.prototype.format = function (format) {
|
||
var o = {
|
||
"M+": this.getMonth() + 1, //month
|
||
"d+": this.getDate(), //day
|
||
"h+": this.getHours(), //hour
|
||
"m+": this.getMinutes(), //minute
|
||
"s+": this.getSeconds(), //second
|
||
"q+": Math.floor((this.getMonth() + 3) / 3), //quarter
|
||
"S": this.getMilliseconds() //millisecond
|
||
}
|
||
if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
|
||
(this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||
for (var k in o) if (new RegExp("(" + k + ")").test(format))
|
||
format = format.replace(RegExp.$1,
|
||
RegExp.$1.length == 1 ? o[k] :
|
||
("00" + o[k]).substr(("" + o[k]).length));
|
||
return format;
|
||
}
|
||
|
||
// 月和日 前加0;
|
||
function plusZero(str){
|
||
if(str != undefined){
|
||
if(str >= 1 && str <= 9){
|
||
str = "0" + str.toString();
|
||
}
|
||
}
|
||
return str;
|
||
}
|
||
</script>
|
||
</body>
|
||
|
||
</html> |