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.
519 lines
21 KiB
HTML
519 lines
21 KiB
HTML
5 years ago
|
<extend name="Public/base"/>
|
||
|
|
||
|
<block name="body">
|
||
|
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||
|
<link rel="stylesheet" href="__CSS__/pro_promote.css" type="text/css" />
|
||
|
<script src="__STATIC__/jquery.form.js"></script>
|
||
|
<script src="__STATIC__/layer/layer.js"></script>
|
||
|
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||
|
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||
|
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
|
||
|
|
||
|
<style>
|
||
|
.select2-container--default .select2-selection--single {
|
||
|
color: #000;
|
||
|
resize: none;
|
||
|
border-width: 1px;
|
||
|
border-style: solid;
|
||
|
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||
|
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||
|
height:28px;border-radius:3px;font-size:12px;
|
||
|
}
|
||
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||
|
line-height:35px;
|
||
|
line-height:28px;
|
||
|
}
|
||
|
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||
|
height:26px;
|
||
|
}
|
||
|
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||
|
height:26px;line-height:26px;font-size:12px;
|
||
|
}
|
||
|
.select2-results__option[aria-selected] {font-size:12px;}
|
||
|
.layui-layer-dialog .layui-layer-content{color:red}
|
||
|
.butnbox {padding:10px 0 10px;}
|
||
|
.butnbox .butnlist {overflow:hidden;clear:both;}
|
||
|
.butnbox .butnlist .butn,.butnbox .butnlist .butn:hover {text-decoration:none;border:none;}
|
||
|
.butnbox .butnlist .butn {display:inline-block;width:120px;height:28px;line-height:28px;text-align:center;color:#FFF;background:#3C95C8;border-radius:3px;}
|
||
|
.butnbox .butnlist .butn.last {background:#009900;}
|
||
|
.butnbox .butnlist .butn~.butn {margin-left:20px;}
|
||
|
.data_list table tbody tr a.disabled,.data_list table tbody tr a.disabled:hover {color:#999;cursor:default;}
|
||
|
.layui-layer-title {
|
||
|
text-align: center;
|
||
|
height: 80px;
|
||
|
line-height: 80px;
|
||
|
font-weight: 600;
|
||
|
font-size: 18px;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<div class="cf main-place top_nav_list navtab_list">
|
||
|
<h3 class="page_title">奖罚记录管理</h3>
|
||
|
<p class="description_text">上下游奖罚记录管理</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="butnbox" >
|
||
|
<div class="butnlist jscheckbutn" style="margin-left: 2px">
|
||
|
<a class="butn" >添加</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- 数据列表 -->
|
||
|
<div class="data_list">
|
||
|
<div class="">
|
||
|
<table>
|
||
|
<!-- 表头 -->
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>奖罚类型</th>
|
||
|
<th>公司类型</th>
|
||
|
<th>公司名称</th>
|
||
|
<th>涉及账号</th>
|
||
|
<th>游戏</th>
|
||
|
<th>事件</th>
|
||
|
<th>金额</th>
|
||
|
<th>备注</th>
|
||
|
<th>添加人</th>
|
||
|
<th>操作</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
|
||
|
<!-- 列表 -->
|
||
|
<tbody>
|
||
|
<if condition = "empty($list)">
|
||
|
<tr>
|
||
|
<td colspan="10" class="text-center">aOh! 暂时还没有内容!</td>
|
||
|
</tr>
|
||
|
</if>
|
||
|
<notemtpy name = "list">
|
||
|
<volist name="list" id="data">
|
||
|
<tr>
|
||
|
<td>{$data.reward_type_desc}</td>
|
||
|
<td>{$data.company_type_desc}</td>
|
||
|
<td>{$data.company_name}</td>
|
||
|
<td></td>
|
||
|
<td>{:get_relation_game($data['relation_game_id'], $data['relation_game_id'])}</td>
|
||
|
<td>{$data.content}</td>
|
||
|
<td>{$data.money}</td>
|
||
|
<td>{$data.remark}</td>
|
||
|
<td>{:get_admin_nickname($data['creater_id'])}</td>
|
||
|
</tr>
|
||
|
</volist>
|
||
|
</notemtpy>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div class="page">
|
||
|
{$_page|default=''}
|
||
|
</div>
|
||
|
<div class="common_settings">
|
||
|
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||
|
<form class="addShortcutIcon">
|
||
|
<input type="hidden" name="title" value="{$m_title}">
|
||
|
<input type="hidden" name="url" value="Promote/lists/type/{:I('type',1)}">
|
||
|
</form>
|
||
|
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
||
|
</div>
|
||
|
|
||
|
</block>
|
||
|
|
||
|
<block name="script">
|
||
|
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||
|
<php>if(C('COLOR_STYLE')=='blue_color') echo '
|
||
|
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
|
||
|
';
|
||
|
</php>
|
||
|
<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 src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
</script>
|
||
|
<script>
|
||
|
<volist name=":I('get.')" id="vo">
|
||
|
Think.setValue('{$key}',"{$vo}");
|
||
|
</volist>
|
||
|
$(".select_gallery").select2();
|
||
|
</script>
|
||
|
<script type="text/javascript">
|
||
|
//导航高亮
|
||
|
highlight_subnav("{:U('StatementMangement/lists')}");
|
||
|
function reload() {
|
||
|
window.location.reload();
|
||
|
}
|
||
|
$(function(){
|
||
|
//搜索功能
|
||
|
var start = $("#time_start").val();
|
||
|
var end = $("#time_end").val();
|
||
|
if(start !='' && end != ''){
|
||
|
if (Date.parse(start) > Date.parse(end)){
|
||
|
layer.msg('开始时间必须小于等于结束时间');
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
//设置对账网址
|
||
|
var order_url = window.location.protocol+"//"+window.location.host+"/admin.php?s=/Public/cp_login.html";
|
||
|
$("#order_url").html("结算单管理,对账地址:<spen style='margin-left:10px;'>"+order_url+"</spen>");
|
||
|
|
||
|
$("#upstream").click(function () {
|
||
|
layer.open({
|
||
|
type: 2,
|
||
|
title: "海南万盟天下科技有限公司",
|
||
|
shadeClose: true,
|
||
|
shade: 0.8,
|
||
|
area: ['70%', '80%'],
|
||
|
content:'/admin.php?s=/Statement/createCpStatement/'
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$("#downstream").click(function () {
|
||
|
layer.open({
|
||
|
type: 2,
|
||
|
title: "海南万盟天下科技有限公司",
|
||
|
shadeClose: true,
|
||
|
shade: 0.8,
|
||
|
area: ['70%', '80%'],
|
||
|
content: '/admin.php?s=/statementMangement/createDownstreamOrder/'
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$(".statement_edit").click(function () {
|
||
|
|
||
|
var edit = $(this).data();
|
||
|
var ext_field = $(this).attr('ext_field');
|
||
|
if(edit.type == 0){
|
||
|
var url = "/admin.php?s=/Statement/editCpStatement/id/"+edit.id;
|
||
|
}else{
|
||
|
var url = "/admin.php?s=/StatementMangement/editDownstreamOrder/id/"+edit.id+"/ext_field/"+ext_field;
|
||
|
}
|
||
|
|
||
|
layer.open({
|
||
|
type: 2,
|
||
|
title: "海南万盟天下科技有限公司",
|
||
|
shadeClose: true,
|
||
|
shade: 0.8,
|
||
|
area: ['70%', '80%'],
|
||
|
content: url
|
||
|
});
|
||
|
});
|
||
|
$(".statement_view").click(function () {
|
||
|
var id = $(this).data("id");
|
||
|
var url = "/admin.php?s=/VerifyBill/show/id/"+id+"/from/pc";
|
||
|
layer.open({
|
||
|
type: 2,
|
||
|
title: "海南万盟天下科技有限公司",
|
||
|
shadeClose: true,
|
||
|
shade: 0.8,
|
||
|
area: ['70%', '80%'],
|
||
|
content: url
|
||
|
});
|
||
|
});
|
||
|
$(".statement_del").click(function () {
|
||
|
var del = $(this).data();
|
||
|
layer.confirm('【警告】撤销后将不可回退,如需继续请点击确认', {
|
||
|
btn: ['确认','取消'],
|
||
|
title:false
|
||
|
}, function(){
|
||
|
if(del.type == 0){
|
||
|
var url = "/admin.php?s=/Statement/delCpStatement/id/"+del.id;
|
||
|
}else{
|
||
|
var url = "/admin.php?s=/StatementMangement/delStatementData/id/"+del.id;
|
||
|
}
|
||
|
layer.load(2);
|
||
|
$.ajax({
|
||
|
url: url,
|
||
|
type: "get",
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if(data.code == 0){
|
||
|
layer.closeAll('loading');
|
||
|
layer.msg("<font style='color:#fff'>删除成功</font>");
|
||
|
setTimeout(function(){
|
||
|
window.location.reload();
|
||
|
},350);
|
||
|
}else{
|
||
|
alert("删除失败,请联系管理员")
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
|
||
|
}, function(){
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
$("#search").click(function(){
|
||
|
|
||
|
var start = $("#time_start").val();
|
||
|
var end = $("#time_end").val();
|
||
|
if(start !='' && end != ''){
|
||
|
if (Date.parse(start) > Date.parse(end)){
|
||
|
layer.msg('开始时间必须小于等于结束时间');
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var url = $(this).attr('url');
|
||
|
var query = $('.jssearch').find('input').serialize();
|
||
|
query += "&"+$('.jssearch').find('select').serialize();
|
||
|
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||
|
query = query.replace(/^&/g,'');
|
||
|
if( url.indexOf('?')>0 ){
|
||
|
url += '&' + query;
|
||
|
}else{
|
||
|
url += '?' + query;
|
||
|
}
|
||
|
window.location.href = url;
|
||
|
});
|
||
|
|
||
|
$('#time_start').datetimepicker({
|
||
|
format: 'yyyy-mm-dd',
|
||
|
language: "zh-CN",
|
||
|
minView: 2,
|
||
|
autoclose: true
|
||
|
});
|
||
|
|
||
|
$('#datetimepicker').datetimepicker({
|
||
|
format: 'yyyy-mm-dd',
|
||
|
language: "zh-CN",
|
||
|
minView: 2,
|
||
|
autoclose: true,
|
||
|
pickerPosition: 'bottom-left'
|
||
|
})
|
||
|
|
||
|
|
||
|
$("#company_id").change(function(){
|
||
|
|
||
|
var str = '<option value="">对账类型</option>';
|
||
|
console.log($("#company_id option:selected").attr('company-type'))
|
||
|
if ($("#company_id option:selected").attr('company-type') == '1') {
|
||
|
str += ' <option value="1" selected=selected>下游游对账单</option>\n' +
|
||
|
' <option value="0">上游对账单</option>';
|
||
|
} else if ($("#company_id option:selected").attr('company-type') == '0') {
|
||
|
str += ' <option value="1">下游对账单</option>\n' +
|
||
|
' <option value="0" selected=selected>上游对账单</option>';
|
||
|
}
|
||
|
|
||
|
|
||
|
$("#statement_type").empty();
|
||
|
$("#statement_type").append(str);
|
||
|
$("#statement_type").select2();
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
$(".paixu").click(function(){
|
||
|
var that=$(this);
|
||
|
$data_order=that.attr('data-order');
|
||
|
$order_type='{$userarpu_order}';
|
||
|
if($order_type==''||$order_type=='4'){
|
||
|
$(".sortBy").attr('name','data_order');
|
||
|
val='3,'+$data_order;
|
||
|
$(".sortBy").attr('value',val);
|
||
|
$("#search").click();
|
||
|
}else if($order_type=='3'){
|
||
|
$(".sortBy").attr('name','data_order');
|
||
|
val='4,'+$data_order;
|
||
|
$(".sortBy").attr('value',val);
|
||
|
$("#search").click();
|
||
|
}
|
||
|
});
|
||
|
//回车自动提交
|
||
|
$('.jssearch').find('input').keyup(function(event){
|
||
|
if(event.keyCode===13){
|
||
|
$("#search").click();
|
||
|
}
|
||
|
});
|
||
|
$("#admin").on('click',function(event) {
|
||
|
var navlist = $(this).find('.i_list_li');
|
||
|
if (navlist.hasClass('hidden')) {
|
||
|
navlist.removeClass('hidden');
|
||
|
$(this).find('#i_list_id').focus().val('');
|
||
|
} else {
|
||
|
navlist.addClass('hidden');
|
||
|
}
|
||
|
$(document).one("click", function(){
|
||
|
navlist.addClass('hidden');
|
||
|
});
|
||
|
event.stopPropagation();
|
||
|
});
|
||
|
|
||
|
$('#admin #i_list_id').on('keyup',function(event) {
|
||
|
var val = $.trim($(this).val()).toLowerCase();
|
||
|
$(this).closest('.drop-down').find('#i_list_idh').val(val);
|
||
|
});
|
||
|
|
||
|
$("#admin #i_list_li").find("a").each(function(){
|
||
|
$(this).click(function(){
|
||
|
var text = $.trim($(this).text()).toLowerCase();
|
||
|
$(this).closest('.drop-down').find("#i_list_id").val(text);
|
||
|
$(this).closest('.drop-down').find('#i_list_idh').val(text);
|
||
|
})
|
||
|
});
|
||
|
|
||
|
//下拉内容框
|
||
|
$(".drop-down2").on('click',function(event) {
|
||
|
var navlist = $(this).find('.i_list_li');
|
||
|
if (navlist.hasClass('hidden')) {
|
||
|
navlist.removeClass('hidden');
|
||
|
$('#i_list_id').focus().val('');
|
||
|
} else {
|
||
|
navlist.addClass('hidden');
|
||
|
}
|
||
|
$(document).one("click", function(){
|
||
|
navlist.addClass('hidden');
|
||
|
});
|
||
|
event.stopPropagation();
|
||
|
});
|
||
|
/* 状态搜索子菜单 */
|
||
|
/*渠道删除*/
|
||
|
$('.delete').click(function(){
|
||
|
var id = $(this).attr('data-id');
|
||
|
layer.confirm('渠道删除后,下级渠道同时被删除,所属数据归属于自然渠道!', {
|
||
|
title:'确定要删除该渠道?',
|
||
|
icon:0,
|
||
|
btn: ['删除','取消'] //按钮
|
||
|
}, function(){
|
||
|
$.ajax({
|
||
|
type: "POST",
|
||
|
url: "{:U('del_promote')}",
|
||
|
dataType: 'json',
|
||
|
async: false,
|
||
|
data: {id:id},
|
||
|
success:function(data){
|
||
|
if(data.status==1){
|
||
|
layer.msg(data.msg);
|
||
|
setTimeout(function(){
|
||
|
window.location.reload();
|
||
|
},1500);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}, function(){
|
||
|
layer.close();
|
||
|
});
|
||
|
|
||
|
})
|
||
|
})
|
||
|
|
||
|
|
||
|
</script>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
//点击字母按照条件按钮筛选
|
||
|
$(".pro_promot_select_list_con").click(function(){
|
||
|
//选中高亮样式
|
||
|
$(this).addClass('active');
|
||
|
$(this).siblings().removeClass('active');
|
||
|
|
||
|
var that = $(this);
|
||
|
var index = $(this).attr("data-index");
|
||
|
|
||
|
$("#game_list li").each(function(index,ele){
|
||
|
var short = $(this).attr('data-short');
|
||
|
$(this).show();
|
||
|
if(that.attr('data-index')){
|
||
|
if(that.attr('data-index')!=short.charAt(0)){
|
||
|
$(this).hide();
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
});
|
||
|
|
||
|
//打开弹窗
|
||
|
$(".ajax-view").click(function(){
|
||
|
//获取游戏列表
|
||
|
var url = "{:U('Promote/getPromoteGame')}";
|
||
|
var id = $(this).attr('data-id');
|
||
|
$.post(url,{id:id},function(res){
|
||
|
if(res.code==1){
|
||
|
|
||
|
$(".pro_promot_select_list a").eq(0).addClass('active');
|
||
|
$(".pro_promot_select_list a").eq(0).siblings().removeClass('active');
|
||
|
|
||
|
var game_list = res.data.game_list;
|
||
|
var promote_info = res.data.promote_info;
|
||
|
var lis = [];
|
||
|
|
||
|
$.each(game_list,function(index,ele){
|
||
|
if(ele.game_name.length>6){
|
||
|
ele.game_name = ele.game_name .substring(0,6)+"..."
|
||
|
}
|
||
|
lis.push('<li class="fl pro_promot_game_con" data-short="'+ele.short+'">');
|
||
|
|
||
|
|
||
|
if(promote_info['game_ids']==''){
|
||
|
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||
|
}else{
|
||
|
if(promote_info['game_ids'].indexOf(ele.id)>-1){
|
||
|
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
|
||
|
}else{
|
||
|
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
|
||
|
}
|
||
|
}
|
||
|
lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
|
||
|
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
|
||
|
lis.push('</li>');
|
||
|
});
|
||
|
|
||
|
$("#game_list").html(lis.join(''));
|
||
|
$(".pro_promot_number").text(res.data.promote_info.account);
|
||
|
$("#se_promote_id").val(res.data.promote_info.id);
|
||
|
$(".pro_promot").css("display","block");
|
||
|
|
||
|
jsgameid();
|
||
|
|
||
|
}else{
|
||
|
var tip_msg = res.info ? res.info : '操作失败';
|
||
|
layer.msg(tip_msg);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
//保存修改
|
||
|
$(".pro_promot_btn_confirm").click(function(){
|
||
|
$("#ajaxForm").ajaxSubmit(function(res){
|
||
|
layer.msg(res.msg);
|
||
|
$(".pro_promot").hide();
|
||
|
});
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
//关闭弹窗
|
||
|
$(".pro_promot_close").click(function(){
|
||
|
$(".pro_promot").css("display","none");
|
||
|
});
|
||
|
//取消修改
|
||
|
$(".pro_promot_btn_cancel").click(function(){
|
||
|
$(".pro_promot").css("display","none");
|
||
|
layer.msg('修改已取消');
|
||
|
});
|
||
|
|
||
|
$(".jsgamecheckall").click(function(){
|
||
|
$(this).closest('.jsgamecheckallbox').siblings("#game_list").find(".jsgameid").prop("checked", this.checked);
|
||
|
});
|
||
|
|
||
|
//可申请游戏 全选及全选反选 功能 @author zwm date 20180604
|
||
|
function jsgameid(){
|
||
|
$(".jsgameid").click(function(){
|
||
|
var option = $(this).closest('ul').find(".jsgameid"),
|
||
|
checkall = $(this).closest('ul').siblings('.jsgamecheckallbox').find('.jsgamecheckall');
|
||
|
option.each(function(i){
|
||
|
if(!this.checked){
|
||
|
checkall.prop("checked", false);
|
||
|
return false;
|
||
|
}else{
|
||
|
checkall.prop("checked", true);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
</block>
|