You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
6.4 KiB
HTML

<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/platform.css" rel="stylesheet">
<style>
.trunk-list .table3 {width: 100%;}
.table3 tr td{border: 1px solid #E0E7EF;}
.pagenation{line-height: 6.5vh;}
.pagenation>div {text-align: right;}
.trunk-list .table3 tr {height: 4.2vh;}
.table_scroll {width:100%;table-layout:fixed;}
.table_scroll tr td {border:none;border-right:1px solid #E0E7EF;}
.table_scroll tr td:last-child{border-right:none;}
.table_scroll tr+tr td {border-top:1px solid #E0E7EF;}
.btn {cursor: pointer;}
</style>
</block>
<block name="body">
<div class="page-search normal_list promoteCoin-shift-search">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>玩家补链</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_yve.png"><span class="title_main">玩家补链</span>
</div>
<div class="trunk-content article">
<div class="trunk-list" style="padding-top:33px;">
<form id="form" action="{:U('save')}" method="post">
<input type="hidden" name="user_id" value="<?=$user['id']?>">
<table class="table2">
<tbody>
<tr>
<td class="l"><span class="req">*</span>用户账号:</td>
<td class="r">
<input type="text" class="name txt" disabled value="<?=getHideAccount($user['account'])?>">
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>修改前推广员:</td>
<td class="r">
<input type="text" class="name txt" disabled value="<?=$user['promote_account']?>">
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>补链后推广员:</td>
<td class="r">
<select name="promote_id_to" class="reselect select_gallery" style="width: 220px;" >
<option value="">请选择推广账号</option>
<?php foreach($promotes as $promote):?>
<option value="<?=$promote['id']?>"><?=$promote['account']?></option>
<?php endforeach;?>
</select>
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>订单日期:</td>
<td class="r">
<input id="shift-order-time" type="text" autocomplete="off" class="name txt" name="order_time" placeholder="订单日期"" value="" style="width: 199px;">
</td>
</tr>
<tr>
<td class="l">备注:</td>
<td class="r">
<textarea name="remark" id="" cols="30" rows="10" class="name txt" style="padding: 10px"></textarea>
</td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<button type="button" class="tjbnt btn" onclick="check()" >确认</button>
<button type="button" style="background: #E5E5E5; color: #8B8CA0;" class="tjbnt btn" onclick="window.history.back();" >返回</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$(function(){
$("#promote_id").change();
$("#promote_child").change();
$(".select_gallery").select2();
$('#shift-order-time').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:true,
scrollMonth:false,
scrollTime:false,
scrollInput:false
})
});
function addParamsToUrl(url, params)
{
var pos = url.indexOf('.html')
url = url.substring(0, pos)
for (var i in params) {
url += '/' + i + '/' + params[i]
}
url += '.html'
return url
}
function submit() {
var userId = $('[name=user_id]').val()
var toPromoteId = $('[name=promote_id_to]').val()
var remark = $('[name=remark]').val()
var orderTime = $('[name=order_time]').val()
$.ajax({
type:"POST",
url:"{:U('save')}",
data: {
user_id: userId,
remark: remark,
promote_id_to: toPromoteId,
order_time: orderTime,
},
success:function(res){
if(res.status==1){
layer.msg(res.msg);
setTimeout(function(){
window.location.href = "{:U('Query/userRoles')}";
}, 1500);
} else {
layer.msg(res.msg);
}
}
})
}
function check() {
data = validation();
if (data.status != 1) {
layer.msg(data.msg, {icon: 2});
return false;
} else {
submit();
}
}
function validation() {
var json_data = "";
var limits = parseInt("{$loginer['balance_coin']|default=0}");
if ($('[name=promote_id_to]').val() == '') {
return json_data = {'status': 0, 'msg': '请选择补链后推广员'}
}
if ($('#shift-order-time').val() == '') {
return json_data = {'status': 0, 'msg': '请选择订单日期'}
}
return json_data = {'status': 1, 'msg': '成功'};
}
</script>
</block>