diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index fccc2fd1f..e27ed0c5d 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -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; diff --git a/Application/Admin/View/FinancePromote/gameStatistics.html b/Application/Admin/View/FinancePromote/gameStatistics.html index 96df32883..b6f999bb0 100644 --- a/Application/Admin/View/FinancePromote/gameStatistics.html +++ b/Application/Admin/View/FinancePromote/gameStatistics.html @@ -127,7 +127,7 @@ placeholder="结束时间" /> - +
@@ -214,14 +214,7 @@ false))}">{$data.inside_cash_count}0 {$data.all_cash_count}0 - 查看 + 订单查看 @@ -232,15 +225,7 @@ {$sumInside}0 {$sumAll}0 - 查看 + 订单查看 diff --git a/Application/Admin/View/FinancePromote/gameStatisticsDetail.html b/Application/Admin/View/FinancePromote/gameStatisticsDetail.html index e214d9453..3686bc78a 100644 --- a/Application/Admin/View/FinancePromote/gameStatisticsDetail.html +++ b/Application/Admin/View/FinancePromote/gameStatisticsDetail.html @@ -59,13 +59,13 @@  
- - - + +  - 
- - + +
@@ -89,7 +89,7 @@
- 搜索 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 endtime) {layer.msg('开始时间必须小于等于结束时间');return false;}