公会统计4

master
chenzhi 5 years ago
parent 6e97bd3bbe
commit c05698e991

@ -404,19 +404,28 @@ class FinancePromoteController extends AdminController
$map['game_id'] = ['in',$gameId];
}
if (!empty(I('timestart'))) {
$timestart = strtotime(I('timestart'));
$map['_string'] = "pay_time > {$timestart}";
}
if (!empty(I('timeend'))) {
$timeend = strtotime(I('timeend'));
$map['_string'] .= " and pay_time < {$timeend}";
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
} elseif (isset($_REQUEST['time_start'])) {
$map['pay_time'] = ['GT', strtotime($_REQUEST['time_start'])];
} elseif (isset($_REQUEST['time_end'])) {
$map['pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
}
if (!empty(I("promote_id"))) {
$promote_id[] = I("promote_id");
//判断是否有推广员
if ($_REQUEST['promote_id'] != '') {
if ($_REQUEST['promote_id'] == 0 || $_REQUEST['promote_type'] == 2) {
$map['promote_id'] = $_REQUEST['promote_id'];
} else {
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
if ($promoter_ids) {
$map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
}
}
}
// if (!empty(I("promote_id"))) {
// $promote_id[] = I("promote_id");
// }
if (!empty(I("root_id"))) {
$root_id = I("root_id");
@ -450,7 +459,7 @@ class FinancePromoteController extends AdminController
if (!empty(I('user_nickname'))) {
$map['game_player_name'] = array('like',I("user_nickname").'%');
}
// var_dump($map);die();
// var_dump($map);die();
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$group = "";
$order = "pay_time DESC";
@ -481,7 +490,7 @@ class FinancePromoteController extends AdminController
$from = I('from', '');
$this->display($from);
}
private function gameStatisticsData($map, $row = 0, $page = 1)
{
$map['s.pay_status']=1;

@ -127,7 +127,7 @@
placeholder="结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
</div>
<input type="hidden" name="from" value="{$_GET['from']}"/>
<div class="input-list">
@ -214,14 +214,7 @@
false))}"><if condition="$data.inside_cash_count neq ''">{$data.inside_cash_count}<else/>0</if></td>
<td ><if condition="$data.all_cash_count neq ''">{$data.all_cash_count}<else/>0</if></td>
<td >
<a href="{:U('Finance/gameStatisticsDetail',array(
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'sdk_type'=>$_GET['sdk_type'],
'game_id'=>$data['game_id'],
'game_name'=>$data['game_name'],
'partner_id'=>$_REQUEST['partner_id'],
false))}" >查看</a>
<a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['game_name'=>$data['game_name']]))}" >订单查看</a>
</td>
</tr>
</volist>
@ -232,15 +225,7 @@
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
<td>
<a href="{:U('Finance/gameStatisticsDetail',
array(
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'sdk_type'=>$_GET['sdk_type'],
'game_name'=>$_GET['game_name'],
'game_id'=>$_REQUEST['game_id'],
'partner_id'=>$_REQUEST['partner_id'],
false))}" >查看</a>
<a href="{:U('FinancePromote/gameStatisticsDetail',I('get.'))}" >订单查看</a>
</td>
</tr>
</notemtpy>

@ -59,13 +59,13 @@
<input type="text" name="user_nickname" placeholder="请输入角色名称" class="" value="{:I('user_nickname')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<input type="text" readonly id="time-start" name="timestart" class="" value="{$startDate}"
placeholder="开始时间"/>
-
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}"
placeholder="开始时间" />
&nbsp;-&nbsp;
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" readonly id="time-end" name="timeend" class="" value="{$endDate}"
placeholder="结束时间"/>
<span class="add-on"><i class="icon-th"></i></span>
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}"
placeholder="结束时间" />
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
@ -89,7 +89,7 @@
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Finance/gameStatisticsDetail','model='.$model['name'].'&row='.I('row'),false)}"
<a class="sch-btn" href="javascript:;" id="search" url="{:U('FinancePromote/gameStatisticsDetail','model='.$model['name'].'&row='.I('row'),false)}"
style="">搜索</a>
<if condition="$_GET['all'] neq 1">
<a class="sch-btn" href="{:U('Export/gameStatisticsDetail',
@ -209,44 +209,25 @@
console.log(href)
});
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var end = new Date($.trim($('#time-end').val())).getTime();
if (val>end) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
$('#time_start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
$("#time-end").datetimepicker({
format:"yyyy-mm-dd",
language: "zh-CN",
showMeridian:true,
minView:2,
autoclose:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var start = new Date($.trim($('#time-start').val())).getTime();
if (val<start) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left'
})
//搜索功能
$("#search").click(function(){
var starttime = $.trim($('#time-start').val());
var endtime = $.trim($('#time-end').val());
var starttime = $.trim($('#time_start').val());
var endtime = $.trim($('#time_end').val());
if (starttime && endtime && starttime > endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}

Loading…
Cancel
Save