288 lines
13 KiB
HTML
Executable File
288 lines
13 KiB
HTML
Executable File
<!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 type="text/css">
|
|
.layui-form-radio{margin-right:-20px;margin-left:10px;}
|
|
.layui-form-label {
|
|
width: 140px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="x-body">
|
|
<form class="layui-form">
|
|
<div class="layui-form-item">
|
|
<label for="nickname" class="layui-form-label">{$lang['nickname']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="nickname" autocomplete="off" class="layui-input" value="{$user.nickname}">
|
|
</div>
|
|
</div>
|
|
<!--
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">手机</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="mobile" autocomplete="off" class="layui-input" value="{$user.mobile}">
|
|
</div>
|
|
<label class="layui-form-label">投注方式</label>
|
|
<div class="layui-input-inline">
|
|
<select type="text" id="bet_type" autocomplete="off" class="layui-select">
|
|
<option value="3" <?php if($user['bet_type'] == 3) echo 'selected="selected"'; ?>>全部</option>
|
|
<option value="2" <?php if($user['bet_type'] == 2) echo 'selected="selected"'; ?>>电话投注</option>
|
|
<option value="1" <?php if($user['bet_type'] == 1) echo 'selected="selected"'; ?>>网络投注</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
-->
|
|
<div class="layui-form-item">
|
|
<label for="limit_low" class="layui-form-label">{$lang['min_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_low" autocomplete="off" value="{$user.limit_low}" class="layui-input">
|
|
</div>
|
|
<label for="limit_high" class="layui-form-label">{$lang['max_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_high" autocomplete="off" value="{$user.limit_high}" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label for="limit_low_tie" class="layui-form-label">{$lang['min_tie_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_low_tie" autocomplete="off" value="{$user.limit_low_tie}" class="layui-input">
|
|
</div>
|
|
<label for="limit_high_tie" class="layui-form-label">{$lang['max_tie_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_high_tie" autocomplete="off" value="{$user.limit_high_tie}" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label for="limit_low_pair" class="layui-form-label">{$lang['min_pair_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_low_pair" autocomplete="off" value="{$user.limit_low_pair}" class="layui-input">
|
|
</div>
|
|
<label for="limit_high_pair" class="layui-form-label">{$lang['max_pair_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_high_pair" autocomplete="off" value="{$user.limit_high_pair}" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label for="limit_low_nn" class="layui-form-label">{$lang['min_nn_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_low_nn" autocomplete="off" value="{$user.limit_low_nn}" class="layui-input">
|
|
</div>
|
|
<label for="limit_high_nn" class="layui-form-label">{$lang['max_nn_limit']}</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="limit_high_nn" autocomplete="off" value="{$user.limit_high_nn}" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<!-- 信用线展示码率 -->
|
|
<?php if($user['agent_type'] == 2) : ?>
|
|
<div class="layui-form-item">
|
|
<label for="agent_ximalv" class="layui-form-label">{$lang['baccarat']} {$lang['rate']}(%)</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="agent_ximalv" value="{$user.agent_ximalv}" autocomplete="off" class="layui-input">
|
|
</div>
|
|
<label for="agent_ximalv_dt" class="layui-form-label">{$lang['dt']} {$lang['rate']}(%)</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="agent_ximalv_dt" value="{$user.agent_ximalv_dt}" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label for="agent_ximalv_nn" class="layui-form-label">{$lang['cow']} {$lang['rate']}(%)</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="agent_ximalv_nn" value="{$user.agent_ximalv_nn}" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item" style="display: none;">
|
|
<label for="agent_ximalv_tc" class="layui-form-label">{$lang['three_card']} {$lang['rate']}(%)</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="agent_ximalv_tc" value="{$user.agent_ximalv_tc}" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="layui-form-item">
|
|
<label for="agent_cs" class="layui-form-label">{$lang['share_ratio']}(%)</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="agent_cs" value="{$user.agent_cs}" autocomplete="off" class="layui-input">
|
|
</div>
|
|
<?php if($user['agent_type'] == 1) : ?>
|
|
<label for="rebate_rate" class="layui-form-label" >{$lang['rebate_rate']}(%)</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="rebate_rate" value="{$user.rebate_rate}" autocomplete="off" class="layui-input">
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label for="remark" class="layui-form-label">{$lang['remark']}</label>
|
|
<div class="layui-input-inline">
|
|
<textarea type="text" id="remark" autocomplete="off" class="layui-textarea">{$user.remarks}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<!--<button class="layui-btn" type="button" id="submit">立即提交</button>-->
|
|
<span style="display:block;margin:10px auto;height: 38px;line-height: 38px;padding: 0 18px;background-color: #AA947D;width:100px;color: #fff;white-space: nowrap;text-align: center;font-size: 14px;border: none;border-radius: 2px;cursor: pointer;" id="submit" >{$lang['submit_now']}</span>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- 隐藏参数 -->
|
|
<input type="hidden" id="parent_id" value="{$user.agent_parent_id}">
|
|
<input type="hidden" id="user_id" value="{$user.id}">
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
var lang = {$jsonlang};
|
|
// 提交编辑代理
|
|
$('#submit').click(function () {
|
|
// 获取数据
|
|
var query = new Object();
|
|
query.parent_id = $('#parent_id').val();
|
|
query.user_id = $('#user_id').val();
|
|
query.nickname = $('#nickname').val();
|
|
query.mobile = $('#mobile').val();
|
|
//query.bet_type = $('#bet_type').val();
|
|
query.limit_low = $('#limit_low').val();
|
|
query.limit_high = $('#limit_high').val();
|
|
query.limit_low_tie = $('#limit_low_tie').val();
|
|
query.limit_high_tie = $('#limit_high_tie').val();
|
|
query.limit_low_pair = $('#limit_low_pair').val();
|
|
query.limit_high_pair = $('#limit_high_pair').val();
|
|
query.limit_low_nn = $('#limit_low_nn').val();
|
|
query.limit_high_nn = $('#limit_high_nn').val();
|
|
query.agent_ximalv = $('#agent_ximalv').val() || 0;
|
|
query.agent_ximalv_dt = $('#agent_ximalv_dt').val() || 0;
|
|
query.agent_ximalv_nn = $('#agent_ximalv_nn').val() || 0;
|
|
query.agent_ximalv_tc = $('#agent_ximalv_tc').val() || 0;
|
|
query.agent_cs = $('#agent_cs').val();
|
|
query.rebate_rate = $('#rebate_rate').val() || 0;
|
|
query.remark = $('#remark').val();
|
|
|
|
// 验证数据
|
|
if (query.nickname.length == 0 || query.nickname == undefined) {
|
|
layer.alert(lang.empty_nickname,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
/*
|
|
if (query.bet_type.length == 0 || query.bet_type == undefined) {
|
|
layer.alert('请选择投注方式');
|
|
return false;
|
|
}
|
|
*/
|
|
if(query.limit_low.length == 0 || query.limit_low == undefined){
|
|
layer.alert(lang.empty_min_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.limit_high.length == 0 || query.limit_high == undefined){
|
|
layer.alert(lang.empty_max_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.limit_low_tie.length == 0 || query.limit_low_tie == undefined){
|
|
layer.alert(lang.empty_min_tie_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.limit_high_tie.length == 0 || query.limit_high_tie == undefined){
|
|
layer.alert(lang.empty_max_tie_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.limit_low_pair.length == 0 || query.limit_low_pair == undefined){
|
|
layer.alert(lang.empty_min_pair_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.limit_high_pair.length == 0 || query.limit_high_pair == undefined){
|
|
layer.alert(lang.empty_max_pair_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.limit_low_nn.length == 0 || query.limit_low_nn == undefined){
|
|
layer.alert(lang.empty_min_nn_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.limit_high_nn.length == 0 || query.limit_high_nn == undefined){
|
|
layer.alert(lang.empty_max_nn_limit,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
return false;
|
|
}
|
|
if(query.agent_ximalv.length == 0 || query.agent_ximalv == undefined){
|
|
ayer.alert(lang.empty_baccacat_rate,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.agent_ximalv_dt.length == 0 || query.agent_ximalv_dt == undefined){
|
|
layer.alert(lang.empty_dt_rate,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.agent_ximalv_nn.length == 0 || query.agent_ximalv_nn == undefined){
|
|
layer.alert(lang.empty_cow_rate,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
if(query.agent_ximalv_tc.length == 0 || query.agent_ximalv_tc == undefined){
|
|
layer.alert(lang.empty_tc_rate,{
|
|
title:lang.message,
|
|
});
|
|
return false;
|
|
}
|
|
|
|
|
|
// 发送数据给后台创建代理
|
|
$.ajax({
|
|
url: '/agent/do_edit',
|
|
data: query,
|
|
type: 'POST',
|
|
dataType: 'JSON',
|
|
success: function (data) {
|
|
if (data.code == 0) {
|
|
layer.msg(data.msg);
|
|
} else if (data.code == 1) {
|
|
layer.alert(data.msg,{
|
|
title:lang.message,
|
|
}, function () {
|
|
x_admin_close();
|
|
parent.location.reload();
|
|
});
|
|
}
|
|
}
|
|
})
|
|
});
|
|
})
|
|
</script>
|
|
</body>
|
|
|
|
</html> |