1.28功能提交

master
zhengyongxing 4 years ago
parent 8a49578cc4
commit 3c566fb2ae

@ -6335,6 +6335,7 @@ class ExportController extends Controller
$xlsCell = array(
array('id','游戏ID'),
array('game_name','游戏名称'),
array('unique_code','归属识别号'),
array('sdk_version','运营平台'),
array('game_type','游戏类型'),
array('game_appid','游戏Appid'),
@ -6392,6 +6393,7 @@ class ExportController extends Controller
$v['game_type'] = get_game_type_name($v['game_type_id']);
$v['recommend_status'] = get_info_status($v['recommend_status'],1);
$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_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']));
//离职结算判断
!($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']) {
$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";
}
!($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;
@ -1428,7 +1434,8 @@ class MarketPercentageController extends ThinkController
$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,
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(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")
@ -1450,6 +1457,7 @@ class MarketPercentageController extends ThinkController
->group("tab_market_altogether.admin_id,tab_market_altogether.pay_time")
->select(false);
}
// echo $data;die();
$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,
@ -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]['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'] =
// 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(['company_id'=>43,'spend.promote_id'=>1498,'relation_game_id'=>191])
// ->order("is_settlement ASC")
->select();
->select(false);
echo $promote_data;die();
$specialPayAmount = [];

@ -397,25 +397,52 @@
var id = $(this).data('id');
var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.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;
}
var options = {
url:"{:U('editCompanyStatementPoolPc')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
$.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;
}
});
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
};
});
$("#form").ajaxSubmit(options);
});
$(".no_statement").on("click",function(){

@ -389,24 +389,53 @@
var id = $(this).data('id');
var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.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>");
var options = {
url:"{:U('editCompanyStatementPoolPc')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
$.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;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
});
};
$("#form").ajaxSubmit(options);
});
});

@ -471,24 +471,52 @@
var id = $(this).data('id');
var st = $(this).data('st');
layer.confirm("是否确认对该数据进行奖惩分离", {title: false}, function (index) {
$.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>");
var options = {
url:"{:U('editCompanyStatementPool')}", //同action
type:'post',
beforeSend:function(xhr){
},
success:function(data)
{
return_data = data;
},
complete:function(data){
if(return_data.status==1){
$.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;
}
},
error: function(xhr,status,msg){
//alert("状态码"+status+"; "+msg)
layer.msg('玩命加载中..');
}
});
};
$("#form").ajaxSubmit(options);
});
});

Loading…
Cancel
Save