1.28功能提交

master
zhengyongxing 4 years ago
parent 8a49578cc4
commit 3c566fb2ae

@ -6335,6 +6335,7 @@ class ExportController extends Controller
$xlsCell = array( $xlsCell = array(
array('id','游戏ID'), array('id','游戏ID'),
array('game_name','游戏名称'), array('game_name','游戏名称'),
array('unique_code','归属识别号'),
array('sdk_version','运营平台'), array('sdk_version','运营平台'),
array('game_type','游戏类型'), array('game_type','游戏类型'),
array('game_appid','游戏Appid'), array('game_appid','游戏Appid'),
@ -6392,6 +6393,7 @@ class ExportController extends Controller
$v['game_type'] = get_game_type_name($v['game_type_id']); $v['game_type'] = get_game_type_name($v['game_type_id']);
$v['recommend_status'] = get_info_status($v['recommend_status'],1); $v['recommend_status'] = get_info_status($v['recommend_status'],1);
$v['game_status'] = empty($v['game_status'])?'已关闭':'已开启'; $v['game_status'] = empty($v['game_status'])?'已关闭':'已开启';
$v['unique_code'] = !empty($v['unique_code'])?$v['unique_code']:'无';
$v['relation_game'] = get_relation_game($v['id'],$v['relation_game_id'])?'已关联':'未关联'; $v['relation_game'] = get_relation_game($v['id'],$v['relation_game_id'])?'已关联':'未关联';
/* $v['relation_game_id'] = $v['relation_game_id']>0?$v['relation_game_id']:'--'; */ /* $v['relation_game_id'] = $v['relation_game_id']>0?$v['relation_game_id']:'--'; */

@ -750,7 +750,10 @@ class MarketPercentageController extends ThinkController
} }
// dump($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id'])); // dump($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']));
//离职结算判断 //离职结算判断
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?$data[$key]['achievement_bonus']=0:''; !($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['achievement_bonus']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_achievement_commission']='0.00'):'';
if ($this->unSettlementList[$value['admin_id']]&&date("Y-m",$this->unSettlementList[$value['admin_id']])<=$value['pay_time']) { if ($this->unSettlementList[$value['admin_id']]&&date("Y-m",$this->unSettlementList[$value['admin_id']])<=$value['pay_time']) {
$data[$key]['leave_time'] = date("Y-m-d",$this->unSettlementList[$value['admin_id']]); $data[$key]['leave_time'] = date("Y-m-d",$this->unSettlementList[$value['admin_id']]);
} }
@ -1189,7 +1192,10 @@ class MarketPercentageController extends ThinkController
$value['company_profit'] = "0.00"; $value['company_profit'] = "0.00";
} }
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?$data[$key]['achievement_bonus']=0:''; !($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['achievement_bonus']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_achievement_commission']='0.00'):'';
$data[$key]['coefficient'] = $this->coefficient[$value['pay_time']][$value['admin_id']] ? $this->coefficient[$value['pay_time']][$value['admin_id']] : 1; $data[$key]['coefficient'] = $this->coefficient[$value['pay_time']][$value['admin_id']] ? $this->coefficient[$value['pay_time']][$value['admin_id']] : 1;
@ -1428,7 +1434,8 @@ class MarketPercentageController extends ThinkController
$data = SM("market_altogether", "tab_") $data = SM("market_altogether", "tab_")
->field("max(tab_market_altogether.pay_time) pay_time,tab_market_altogether.real_name,tab_market_altogether.admin_id,tab_market_altogether.nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission, ->field("max(tab_market_altogether.pay_time) pay_time,tab_market_altogether.real_name,tab_market_altogether.admin_id,tab_market_altogether.nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission,
sum(performance_commission) performance_commission,IF(leave_time!=0 and unix_timestamp(now())-leave_time>86400*30,0,sum(achievement_bonus* IF(coefficient is not NULL, coefficient, 100)/100)) achievement_bonus, IF((work_status!=0 and ((leave_time-UNIX_TIMESTAMP(concat(tab_market_altogether.pay_time,'-01'))<86400*30) or UNIX_TIMESTAMP(concat(tab_market_altogether.pay_time,'-01'))>leave_time)),0,performance_commission) performance_commission,
IF((work_status!=0 and ((leave_time-UNIX_TIMESTAMP(concat(tab_market_altogether.pay_time,'-01'))<86400*30) or UNIX_TIMESTAMP(concat(tab_market_altogether.pay_time,'-01'))>leave_time)),0,sum(achievement_bonus* IF(coefficient is not NULL, coefficient, 100)/100)) achievement_bonus,
sum(wait_performance_commission)+sum(wait_achievement_commission) wait_amount, sum(wait_performance_commission)+sum(wait_achievement_commission) wait_amount,
sum(if(tab_market_altogether.status > 0, wait_performance_commission, '0.00')) + sum(if(tab_market_altogether.status > 0, wait_achievement_commission,'0.00') * IF(coefficient is not NULL, coefficient, 100)/100 ) wait_extend_commission, sum(if(tab_market_altogether.status > 0, wait_performance_commission, '0.00')) + sum(if(tab_market_altogether.status > 0, wait_achievement_commission,'0.00') * IF(coefficient is not NULL, coefficient, 100)/100 ) wait_extend_commission,
sum(if(tab_market_altogether.status = 0, wait_performance_commission, '0.00')) + round(sum(if(tab_market_altogether.status = 0, wait_achievement_commission,'0.00') * IF(coefficient is not NULL, coefficient, 100)/100),2) wait_commission, remark,tab_market_altogether.status") sum(if(tab_market_altogether.status = 0, wait_performance_commission, '0.00')) + round(sum(if(tab_market_altogether.status = 0, wait_achievement_commission,'0.00') * IF(coefficient is not NULL, coefficient, 100)/100),2) wait_commission, remark,tab_market_altogether.status")
@ -1450,6 +1457,7 @@ class MarketPercentageController extends ThinkController
->group("tab_market_altogether.admin_id,tab_market_altogether.pay_time") ->group("tab_market_altogether.admin_id,tab_market_altogether.pay_time")
->select(false); ->select(false);
} }
// echo $data;die();
$data = SM()->table("({$data})a") $data = SM()->table("({$data})a")
->field("max(pay_time) pay_time,real_name,admin_id,nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission, ->field("max(pay_time) pay_time,real_name,admin_id,nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission,
@ -1478,7 +1486,7 @@ class MarketPercentageController extends ThinkController
//绩效系数计算 //绩效系数计算
// $data[$key]['achievement_bonus'] = $data[$key]['achievement_bonus'] * ($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1); // $data[$key]['achievement_bonus'] = $data[$key]['achievement_bonus'] * ($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1);
$data[$key]['commission'] = number_format($data[$key]['performance_commission'] + $data[$key]['achievement_bonus'], 2, '.', ''); $data[$key]['commission'] = substr(number_format($data[$key]['performance_commission'] + $data[$key]['achievement_bonus'], 4, '.', ''),0,-2);
// $data[$key]['wait_commission'] = // $data[$key]['wait_commission'] =
// number_format($value['wait_performance_commission'] + $value['wait_achievement_commission']*($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1), 2, '.', ''); // number_format($value['wait_performance_commission'] + $value['wait_achievement_commission']*($this->coefficient[$value['pay_time']][$value['admin_id']]?$this->coefficient[$value['pay_time']][$value['admin_id']]:1), 2, '.', '');

@ -1044,7 +1044,9 @@ class TimingController extends AdminController {
->where(['develop_type'=>['egt',1],'group_id'=>['in',['11','12','21']]]) ->where(['develop_type'=>['egt',1],'group_id'=>['in',['11','12','21']]])
// ->where(['company_id'=>43,'spend.promote_id'=>1498,'relation_game_id'=>191]) // ->where(['company_id'=>43,'spend.promote_id'=>1498,'relation_game_id'=>191])
// ->order("is_settlement ASC") // ->order("is_settlement ASC")
->select(); ->select(false);
echo $promote_data;die();
$specialPayAmount = []; $specialPayAmount = [];

@ -397,25 +397,52 @@
var id = $(this).data('id'); var id = $(this).data('id');
var st = $(this).data('st'); var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) { layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.ajax({ var options = {
type: "POST", url:"{:U('editCompanyStatementPoolPc')}", //同action
url: "{:U('splitRewardOrFailData')}", type:'post',
dataType: 'json', beforeSend:function(xhr){
async: false, },
data: {id: id, st: st, pool_id: pool_ids}, success:function(data)
success: function (data) { {
if (data.status == 1) { return_data = data;
layer.msg("<font style='color:white'>" + data.msg + "</font>"); },
setTimeout(function () {
window.location.reload(); complete:function(data){
}, 1500); if(return_data.status==1){
} else {
layer.msg("<font style='color:white'>" + data.msg + "</font>"); $.ajax({
return false; type: "POST",
} url: "{:U('splitRewardOrFailData')}",
dataType: 'json',
async: false,
data: {id: id, st: st, pool_id: pool_ids},
success: function (data) {
if (data.status == 1) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
return false;
}
}
});
return;
}else{
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
return false;
} }
}); },
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
};
}); });
$("#form").ajaxSubmit(options);
}); });
$(".no_statement").on("click",function(){ $(".no_statement").on("click",function(){

@ -389,24 +389,53 @@
var id = $(this).data('id'); var id = $(this).data('id');
var st = $(this).data('st'); var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) { layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.ajax({
type: "POST", var options = {
url: "{:U('splitRewardOrFailData')}", url:"{:U('editCompanyStatementPoolPc')}", //同action
dataType: 'json', type:'post',
async: false, beforeSend:function(xhr){
data: {id: id, st: st, pool_id: pool_ids}, },
success: function (data) { success:function(data)
if (data.status == 1) { {
layer.msg("<font style='color:white'>" + data.msg + "</font>"); return_data = data;
setTimeout(function () { },
window.location.reload();
}, 1500); complete:function(data){
} else { if(return_data.status==1){
layer.msg("<font style='color:white'>" + data.msg + "</font>");
$.ajax({
type: "POST",
url: "{:U('splitRewardOrFailData')}",
dataType: 'json',
async: false,
data: {id: id, st: st, pool_id: pool_ids},
success: function (data) {
if (data.status == 1) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
return false;
}
}
});
return;
}else{
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
return false; return false;
} }
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
} }
}); };
$("#form").ajaxSubmit(options);
}); });
}); });

@ -471,24 +471,52 @@
var id = $(this).data('id'); var id = $(this).data('id');
var st = $(this).data('st'); var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) { layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.ajax({
type: "POST", var options = {
url: "{:U('splitRewardOrFailData')}", url:"{:U('editCompanyStatementPool')}", //同action
dataType: 'json', type:'post',
async: false, beforeSend:function(xhr){
data: {id: id, st: st, pool_id: pool_ids}, },
success: function (data) { success:function(data)
if (data.status == 1) { {
layer.msg("<font style='color:white'>" + data.msg + "</font>"); return_data = data;
setTimeout(function () { },
window.location.reload();
}, 1500); complete:function(data){
} else { if(return_data.status==1){
layer.msg("<font style='color:white'>" + data.msg + "</font>");
$.ajax({
type: "POST",
url: "{:U('splitRewardOrFailData')}",
dataType: 'json',
async: false,
data: {id: id, st: st, pool_id: pool_ids},
success: function (data) {
if (data.status == 1) {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg("<font style='color:white'>" + data.msg + "</font>");
return false;
}
}
});
return;
}else{
layer.msg("<font style='color:white'>" + 保存数据失败 + "</font>");
return false; return false;
} }
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
} }
}); };
$("#form").ajaxSubmit(options);
}); });
}); });

Loading…
Cancel
Save