|
|
|
@ -43,7 +43,7 @@
|
|
|
|
|
<div class="tools">
|
|
|
|
|
<if condition="$caculate_check eq true">
|
|
|
|
|
<empty name="show_status">
|
|
|
|
|
<a class="recaculate" url="{:U('reCaculateBonus?pay_time='.$_GET['pay_time'])}" style="width: 60px;text-align: center;padding-right: 0;margin-right: 0;">重算</a>
|
|
|
|
|
<a class="recaculate" url="{:U('reCaculateBonus')}" style="width: 60px;text-align: center;padding-right: 0;margin-right: 0;">重算</a>
|
|
|
|
|
</empty>
|
|
|
|
|
</if>
|
|
|
|
|
</div>
|
|
|
|
@ -125,11 +125,14 @@
|
|
|
|
|
<th>类型</th>
|
|
|
|
|
<th >游戏名称</th>
|
|
|
|
|
<th >总流水</th>
|
|
|
|
|
<th>上游结算流水</th>
|
|
|
|
|
<th>下游结算流水</th>
|
|
|
|
|
<th>上游结算额</th>
|
|
|
|
|
<th>下游结算额</th>
|
|
|
|
|
<th>支付渠道费用</th>
|
|
|
|
|
<th>退款金额</th>
|
|
|
|
|
<th>返点及其他</th>
|
|
|
|
|
<th><a href="{:U('editTaxRatio')}" style="text-decoration:none;">公司税费</a></th>
|
|
|
|
|
<th>税后毛利额</th>
|
|
|
|
|
<th>操作</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
|
@ -154,8 +157,11 @@
|
|
|
|
|
<td>{$data['cp_amount']}</td>
|
|
|
|
|
<td>{$data['promote_amount']}</td>
|
|
|
|
|
<td>{$data['channel_amount']}</td>
|
|
|
|
|
<td>{$data['refund_amount']}</td>
|
|
|
|
|
<td>{$data['other_amount']}</td>
|
|
|
|
|
<td>{$data['company_tax']}</td>
|
|
|
|
|
<td>{$data['company_profit']}</td>
|
|
|
|
|
<td><a class="edit_oter_amout" data-id="{$data.id}" data-amount="{$data['other_amount']}">编辑</a></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</volist>
|
|
|
|
|
<tr>
|
|
|
|
@ -170,8 +176,11 @@
|
|
|
|
|
<td>{$sum['cp_amount']}</td>
|
|
|
|
|
<td>{$sum['promote_amount']}</td>
|
|
|
|
|
<td>{$sum['channel_amount']}</td>
|
|
|
|
|
<td>{$sum['refund_amount']}</td>
|
|
|
|
|
<td>{$sum['other_amount']}</td>
|
|
|
|
|
<td>{$sum['company_tax']}</td>
|
|
|
|
|
<td>{$sum['company_profit']}</td>
|
|
|
|
|
<td></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</notemtpy>
|
|
|
|
|
</tbody>
|
|
|
|
@ -187,6 +196,24 @@
|
|
|
|
|
</if>
|
|
|
|
|
{$_page|default=''}
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/html" id="changeTpl">
|
|
|
|
|
<div style="padding:10px 40px 30px;">
|
|
|
|
|
<spend style="font-size:14px;color:#666;">
|
|
|
|
|
|
|
|
|
|
</spend>
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" style="margin:0px;">
|
|
|
|
|
<tr style="line-height: 4;">
|
|
|
|
|
<td class="l noticeinfo" style="width:80px;">返点及其他:</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<input type="text" id="other_amount" placeholder="其他扣款" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<button class="submit_btn mlspacing" id="changeMargin" type="submit" style="margin-top:30px;">
|
|
|
|
|
保存
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
@ -206,6 +233,63 @@
|
|
|
|
|
//导航高亮
|
|
|
|
|
highlight_subnav('{:U('MarketPercentage/index')}');
|
|
|
|
|
$(function(){
|
|
|
|
|
$(".edit_oter_amout").on("click",function(){
|
|
|
|
|
var data = $(this).data();
|
|
|
|
|
layer.open({
|
|
|
|
|
type: 1,
|
|
|
|
|
title: '编辑',
|
|
|
|
|
maxWidth:720,
|
|
|
|
|
closeBtn: 1,
|
|
|
|
|
shadeClose: false,
|
|
|
|
|
content: $("#changeTpl").html(),
|
|
|
|
|
success:function(){
|
|
|
|
|
env(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
function env(data) {
|
|
|
|
|
$("#other_amount").val(data.amount);
|
|
|
|
|
$("#changeMargin").off("click");
|
|
|
|
|
$("#changeMargin").on("click",function(){
|
|
|
|
|
let other_amount = $("#other_amount").val();
|
|
|
|
|
var reg = /^(\-|\+)?\d+(\.\d*)?$/;
|
|
|
|
|
if( !reg.test(other_amount)){
|
|
|
|
|
layer.msg("返点扣款金额格式错误");
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
if(other_amount == data.amount){
|
|
|
|
|
layer.msg("无修改请直接关闭窗口");
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
//成功
|
|
|
|
|
let send = {
|
|
|
|
|
id:data.id,
|
|
|
|
|
other_amount:other_amount,
|
|
|
|
|
}
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "{:U('otherAmountEdit')}",
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
data: send,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.status == 1) {
|
|
|
|
|
layer.msg(data.msg);
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
}, 1500);
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(data.msg);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//搜索功能
|
|
|
|
|
$("#search").click(function(){
|
|
|
|
|
var url = $(this).attr('url');
|
|
|
|
@ -230,54 +314,12 @@
|
|
|
|
|
|
|
|
|
|
window.location.href = url;
|
|
|
|
|
});
|
|
|
|
|
$(".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);
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#time_start').datetimepicker({
|
|
|
|
|
format: 'yyyy-mm',
|
|
|
|
@ -321,35 +363,6 @@
|
|
|
|
|
});
|
|
|
|
|
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();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$('.recaculate').click(function(){
|
|
|
|
|
var url = $(this).attr('url');
|
|
|
|
@ -361,16 +374,17 @@
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: url,
|
|
|
|
|
data:{type:1},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
async: false,
|
|
|
|
|
success:function(data){
|
|
|
|
|
if(data.status == 1) {
|
|
|
|
|
layer.msg("重新计算需要时间,请等待10分钟后再查看");
|
|
|
|
|
layer.msg(data.msg);
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(data.info);
|
|
|
|
|
layer.msg(data.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
@ -384,124 +398,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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');
|
|
|
|
|
var checked = 'checked';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.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{
|
|
|
|
|
$(".jsgamecheckall").attr('checked',false);
|
|
|
|
|
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
|
|
|
|
|
checked = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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>');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".jsgamecheckall").attr('checked',checked);
|
|
|
|
|
|
|
|
|
|
$("#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>
|
|
|
|
|