363 lines
15 KiB
HTML
Executable File
363 lines
15 KiB
HTML
Executable File
{include file="public/header"}
|
||
<style>
|
||
.x-body .layui-row{ margin-top:-10px; line-height:25px; background:#f5f5f5; border-radius:10px; }
|
||
.x-body .layui-row .xblock button{ margin-top:-20px; }
|
||
.x-body .layui-form{ margin-top:15px; margin-bottom:10px; }
|
||
.x-body .layui-form .layui-input-block{ display:inline-block; width:150px; margin-left:0; }
|
||
.x-body .layui-form .layui-form-item{ display:inline-block; margin-left:0; }
|
||
.x-body .layui-form .layui-form-item .layui-form-label{ width:48px; }
|
||
.x-body .layui-form .layui-form-item .layui-input-block{ margin-left:-10px; width:100px; }
|
||
.x-body .layui-form .layui-form-item .layui-input-block .layui-form-radio i{ margin-right:4px; }
|
||
.x-body .layui-form .layui-form-item .layui-form-radio{ margin-top:6px; margin-right:-8px; }
|
||
.layui-input-block dl{ text-align:left; }
|
||
.x-so{ margin:0; }
|
||
.x-so input.layui-input{ width:150px; }
|
||
.x-nav{overflow: inherit; } .x-nav .refresh{margin-right: 20px; }
|
||
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
|
||
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
|
||
.change_box a{font-size: 14px;padding: 10.5px 10px;}
|
||
|
||
.alert{position:fixed; top:15%; left:30%; width:600px; min-height:320px; background:#fff; border:1px solid #e2e2e2; border-radius:5px; display:none;}
|
||
.alert-title{background:#009688; height:40px; text-align: center; line-height:40px; font-size:14px; border-bootom:1px solid #F2F2F2;color:#fff;}
|
||
.alert-main th{width:40%; border-left:none; text-align:right;}
|
||
.alert-main td{border-right:none; }
|
||
.alert-footer{padding:20px; text-align:center;}
|
||
.alert-footer span{padding:10px 30px; display:inline-block; border-radius:5px; cursor:pointer;}
|
||
</style>
|
||
<body>
|
||
<div class="x-nav" style="padding: 0px;">
|
||
<span class="change_box">
|
||
<a href="javascript:;" class="list-one actived" data-id="1">玩家列表</a>
|
||
<a href="javascript:;" class="list-two" data-id="2">玩家添加</a>
|
||
</span>
|
||
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
|
||
href="javascript:location.replace(location.href);" title="刷新">
|
||
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
||
</div>
|
||
<br>
|
||
<div class="x-body">
|
||
<div class="layui-row">
|
||
<form class="layui-form layui-col-md12 x-so float-left" action="/player/index" method="get">
|
||
<input class="layui-input" placeholder="开始时间" name="startDate" id="start" value="<?php if(isset($get['startDate'])) {echo $get['startDate'];} ?>">
|
||
<input class="layui-input" placeholder="结束时间" name="endDate" id="end" value="<?php if(isset($get['endDate'])) {echo $get['endDate'];} ?>">
|
||
<div class="layui-input-block" >
|
||
<select name="status" id="status">
|
||
<option value="-1" >请选择玩家状态</option>
|
||
<option value="1" <?php if(isset($get['status']) && $get['status'] == 1) {echo 'selected';} ?>>正常</option>
|
||
<option value="2" <?php if(isset($get['status']) && $get['status'] == 2) {echo 'selected';} ?>>锁定</option>
|
||
</select>
|
||
</div>
|
||
<input type="text" name="username" id="username" placeholder="请输入用户名" autocomplete="off" class="layui-input" value="<?php if(isset($get['username'])) {echo $get['username'];} ?>">
|
||
<input type="text" name="agent_parent" id="agent_parent" placeholder="请输入上级代理" autocomplete="off" class="layui-input" value="<?php if(isset($get['agent_parent'])) {echo $get['agent_parent'];} ?>">
|
||
<button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon"></i></button>
|
||
<span class="layui-btn" id="export">导出excel</span>
|
||
<!-- <span class="layui-btn" id="print">打印</span> -->
|
||
</form>
|
||
</div>
|
||
|
||
<table class="layui-table">
|
||
<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>
|
||
<th>赔率</th>
|
||
<th>创建日期</th>
|
||
<th>状态</th>
|
||
<th>操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach name="agent_list" item="vo"}
|
||
<tr>
|
||
<td>{$vo.username}</td>
|
||
<td>{$vo.nickname}</td>
|
||
<td>{$vo.mobile}</td>
|
||
<td>{$vo.email}</td>
|
||
{if condition="$vo.agent_parent_id > 0"}
|
||
<td>{$vo.agent_parent_username}</td>
|
||
{else}
|
||
<td>无</td>
|
||
{/if}
|
||
<td>{$vo.bet_type}</td>
|
||
<td>{$vo.last_recharge}</td>
|
||
<td>{$vo.money}</td>
|
||
<td>{$vo.agent_ximalv}</td>
|
||
<td>{$vo.agent_ximalv_dt}</td>
|
||
<td>{$vo.all_bet_amount}</td>
|
||
<td>{$vo.win_total}</td>
|
||
<td>{$vo.maliang}</td>
|
||
<td>{$vo.win_limit}</td>
|
||
<th>
|
||
<a href="javascript:;" onclick="showPrice(this)" price-username="{$vo.username}" price-banker="{$vo.price_banker}" price-player="{$vo.price_player}" price-tie-baccarat="{$vo.price_tie_baccarat}" price-pair="{$vo.price_pair}" price-dragon="{$vo.price_dragon}" price-tiger="{$vo.price_tiger}" price-tie-dt="{$vo.price_tie_dt}" price-n7-n9="{$vo.price_n7_n9}" price-nn="{$vo.price_nn}" price-5n="{$vo.price_5n}" price-bomb="{$vo.price_bomb}">
|
||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#009688;" >查看</span>
|
||
</a>
|
||
</th>
|
||
<td style="width:80px;">{$vo.reg_time}</td>
|
||
{if condition="$vo.status == 1"}
|
||
<td class="td-status">
|
||
<span class="layui-btn layui-btn-normal layui-btn-mini">正常</span>
|
||
</td>
|
||
{else}
|
||
<td class="td-status">
|
||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#ff5050;">锁定中</span>
|
||
</td>
|
||
{/if}
|
||
<td class="td-manage">
|
||
{if condition="$vo.status == 1"}
|
||
<a onclick="member_stop(this,'{$vo.id}')" href="javascript:;" title="锁定">
|
||
<span class="layui-btn layui-btn-normal layui-btn-mini">锁定</span>
|
||
</a>
|
||
{else}
|
||
<a onclick="member_stop(this,'{$vo.id}')" href="javascript:;" title="解锁">
|
||
<span class="layui-btn layui-btn-normal layui-btn-mini">解锁</span>
|
||
</a>
|
||
{/if}
|
||
<a href="/player/player_edit?id={$vo.id}">
|
||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#009688;">修改</span>
|
||
</a>
|
||
<a onclick="member_del(this,'{$vo.id}')" href="javascript:;">
|
||
<span class="layui-btn layui-btn-normal layui-btn-mini" style="background:#ff5050;">删除</span>
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
{$agent_list->render()}
|
||
</div>
|
||
<div class="alert" id="alert_price">
|
||
<div class="alert-title" id="show_price_username"></div>
|
||
<div class="alert-main">
|
||
<table class="layui-table" style="margin:0;">
|
||
<tr><th>押庄赔率:</th><td id="show_price_banker"></td></tr>
|
||
<tr><th>押闲赔率:</th><td id="show_price_player"></td></tr>
|
||
<tr><th>押和赔率(百家乐):</th><td id="show_price_tie_baccarat"></td></tr>
|
||
<tr><th>押对子赔率:</th><td id="show_price_pair"></td></tr>
|
||
<tr><th>押龙赔率:</th><td id="show_price_dragon"></td></tr>
|
||
<tr><th>押虎赔率:</th><td id="show_price_tiger"></td></tr>
|
||
<tr><th>押和赔率(龙虎斗):</th><td id="show_price_tie_dt"></td></tr>
|
||
<tr><th>押牛7-牛9赔率:</th><td id="show_price_n7_n9"></td></tr>
|
||
<tr><th>押牛牛赔率:</th><td id="show_price_nn"></td></tr>
|
||
<tr><th>押五公赔率:</th><td id="show_price_5n"></td></tr>
|
||
<tr><th>押四条赔率:</th><td id="show_price_bomb"></td></tr>
|
||
</table>
|
||
</div>
|
||
<div class="alert-footer">
|
||
<span onclick="hiddenForm('alert_price')" class="input_button" style="background:#009688; border:1px solid #e2e2e2;color:#fff;">关闭</span>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
// 代理列表和添加代理切换
|
||
$('.x-nav .change_box a').click(function(){
|
||
// 样式切换
|
||
$('.x-nav .change_box a').removeClass('actived');
|
||
$(this).addClass('actived');
|
||
// 页面切换
|
||
var id = $(this).attr('data-id');
|
||
if(id == "1") location.href = '/player/index';
|
||
if(id == "2") location.href = '/player/player_add';
|
||
});
|
||
// 时间选择器
|
||
layui.use('laydate', function () {
|
||
var laydate = layui.laydate;
|
||
|
||
// 开始时间
|
||
laydate.render({
|
||
elem: '#start',
|
||
type: 'datetime'
|
||
});
|
||
|
||
// 结束时间
|
||
laydate.render({
|
||
elem: '#end',
|
||
type: 'datetime'
|
||
});
|
||
});
|
||
|
||
/*用户-锁定/解锁*/
|
||
function member_stop(obj, id) {
|
||
layer.confirm('确认要' + $(obj).attr('title') + '吗?', function (index) {
|
||
if ($(obj).attr('title') == '锁定') {
|
||
// 拼装数据发送后台 锁定 会员
|
||
var query = new Object;
|
||
query.user_id = id;
|
||
query.status = 0;
|
||
var result = ajax('/player/change_status', query);
|
||
} else {
|
||
// 拼装数据发送后台 解锁 会员
|
||
var query = new Object;
|
||
query.user_id = id;
|
||
query.status = 1;
|
||
var result = ajax('/player/change_status', query);
|
||
}
|
||
|
||
// 判断结果 弹出提示
|
||
if (result.code == 1) {
|
||
layer.msg(result.msg, {icon: 1, time: 1500});
|
||
setInterval(function () {
|
||
location.reload();
|
||
}, 1500);
|
||
} else {
|
||
layer.msg(result.msg, {icon: 2, time: 1500});
|
||
}
|
||
|
||
});
|
||
}
|
||
|
||
/*用户-删除*/
|
||
function member_del(obj, id) {
|
||
layer.confirm('确认要删除吗?',function () {
|
||
// 数据验证
|
||
if(id <= 0){
|
||
layer.msg('删除用户出错!');
|
||
return false;
|
||
}
|
||
|
||
// 拼装数据
|
||
var query = new Object;
|
||
query.user_id = id;
|
||
|
||
// 发送数据到后台删除会员
|
||
var result = ajax('/player/player_del',query);
|
||
if(result.code == 1){
|
||
layer.msg(result.msg, {icon: 1, time: 1000},function(){
|
||
location.reload();
|
||
});
|
||
}else if(result.code == 0){
|
||
layer.msg(result.msg, {icon: 2, time: 1000});
|
||
}
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 封装 AJAX 函数
|
||
* @param url 目标地址
|
||
* @param query 参数
|
||
* @returns {string}
|
||
*/
|
||
function ajax(url, query) {
|
||
var returnData = "";
|
||
$.ajax({
|
||
url: url,
|
||
data: query,
|
||
type: 'POST',
|
||
dataType: 'JSON',
|
||
async: false,
|
||
success: function (data) {
|
||
returnData = data;
|
||
}
|
||
});
|
||
return returnData;
|
||
}
|
||
$('#print').click(function(){
|
||
var qs = getQueryString();
|
||
var startDate = qs["startDate"];
|
||
var endDate = qs["endDate"];
|
||
var status = qs["status"];
|
||
var username = qs["username"];
|
||
var agent_parent = qs["agent_parent"];
|
||
if(startDate == undefined){
|
||
startDate = '';
|
||
}
|
||
if(endDate == undefined){
|
||
endDate = '';
|
||
}
|
||
if(status == undefined){
|
||
status = '';
|
||
}
|
||
if(username == undefined){
|
||
username = '';
|
||
}
|
||
if(agent_parent == undefined){
|
||
agent_parent = '';
|
||
}
|
||
layer.open({
|
||
type: 2,
|
||
title:'玩家列表打印',
|
||
content: '/player/player_print?startDate='+startDate+'&endDate='+endDate+'&status='+status+'&username='+username+'&agent_parent='+agent_parent,
|
||
area: ['95%', '95%']
|
||
});
|
||
});
|
||
function getQueryString() {
|
||
var qs = location.search.substr(1), // 获取url中"?"符后的字串
|
||
args = {}, // 保存参数数据的对象
|
||
items = qs.length ? qs.split("&") : [], // 取得每一个参数项,
|
||
item = null,
|
||
len = items.length;
|
||
|
||
for(var i = 0; i < len; i++) {
|
||
item = items[i].split("=");
|
||
var name = decodeURIComponent(item[0]),
|
||
value = decodeURIComponent(item[1]);
|
||
if(name) {
|
||
args[name] = value;
|
||
}
|
||
}
|
||
return args;
|
||
}
|
||
|
||
// 导出excel
|
||
$('#export').click(function(){
|
||
var startDate = $('#start').val();
|
||
var endDate = $('#end').val();
|
||
var status = $('#status').val();
|
||
var agent_parent = $('#agent_parent').val();
|
||
var username = $('#username').val();
|
||
layer.confirm('确定导出 excel 吗?',function(index){
|
||
location.href = "/player/index?export=1&&startDate="+startDate+"&&endDate="+endDate+"&&status="+status+"&&agent_parent="+agent_parent+"&&username="+username;
|
||
layer.close(index);
|
||
});
|
||
})
|
||
|
||
// 显示用户的赔率
|
||
function showPrice(obj){
|
||
// 获取赔率数据
|
||
var price_username = $(obj).attr('price-username');
|
||
var price_banker = $(obj).attr('price-banker');
|
||
var price_player = $(obj).attr('price-player');
|
||
var price_tie_baccarat = $(obj).attr('price-tie-baccarat');
|
||
var price_pair = $(obj).attr('price-pair');
|
||
var price_dragon = $(obj).attr('price-dragon');
|
||
var price_tiger = $(obj).attr('price-tiger');
|
||
var price_tie_dt = $(obj).attr('price-tie-dt');
|
||
var price_n7_n9 = $(obj).attr('price-n7-n9');
|
||
var price_nn = $(obj).attr('price-nn');
|
||
var price_5n = $(obj).attr('price-5n');
|
||
var price_bomb = $(obj).attr('price-bomb');
|
||
|
||
// 显示赔率数据
|
||
$('#show_price_username').html(price_username+" 的赔率");
|
||
$('#show_price_banker').html(price_banker);
|
||
$('#show_price_player').html(price_player);
|
||
$('#show_price_tie_baccarat').html(price_tie_baccarat);
|
||
$('#show_price_pair').html(price_pair);
|
||
$('#show_price_dragon').html(price_dragon);
|
||
$('#show_price_tiger').html(price_tiger);
|
||
$('#show_price_tie_dt').html(price_tie_dt);
|
||
$('#show_price_n7_n9').html(price_n7_n9);
|
||
$('#show_price_nn').html(price_nn);
|
||
$('#show_price_5n').html(price_5n);
|
||
$('#show_price_bomb').html(price_bomb);
|
||
|
||
$('#alert_price').show();
|
||
}
|
||
//点击隐藏表单弹窗
|
||
function hiddenForm(id) {
|
||
$('#' + id).hide();
|
||
}
|
||
</script>
|
||
</body>
|
||
|
||
</html> |