公会统计4

master
chenzhi 5 years ago
parent 6e97bd3bbe
commit c05698e991

@ -404,19 +404,28 @@ class FinancePromoteController extends AdminController
$map['game_id'] = ['in',$gameId]; $map['game_id'] = ['in',$gameId];
} }
if (!empty(I('timestart'))) { if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
$timestart = strtotime(I('timestart')); $map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
$map['_string'] = "pay_time > {$timestart}"; } 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('timeend'))) { //判断是否有推广员
$timeend = strtotime(I('timeend')); if ($_REQUEST['promote_id'] != '') {
$map['_string'] .= " and pay_time < {$timeend}"; 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("promote_id"))) {
// $promote_id[] = I("promote_id");
// }
if (!empty(I("root_id"))) { if (!empty(I("root_id"))) {
$root_id = I("root_id"); $root_id = I("root_id");

@ -214,14 +214,7 @@
false))}"><if condition="$data.inside_cash_count neq ''">{$data.inside_cash_count}<else/>0</if></td> 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 ><if condition="$data.all_cash_count neq ''">{$data.all_cash_count}<else/>0</if></td>
<td > <td >
<a href="{:U('Finance/gameStatisticsDetail',array( <a href="{:U('FinancePromote/gameStatisticsDetail',array_merge(I('get.'),['game_name'=>$data['game_name']]))}" >订单查看</a>
'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>
</td> </td>
</tr> </tr>
</volist> </volist>
@ -232,15 +225,7 @@
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td> <td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td> <td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
<td> <td>
<a href="{:U('Finance/gameStatisticsDetail', <a href="{:U('FinancePromote/gameStatisticsDetail',I('get.'))}" >订单查看</a>
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>
</td> </td>
</tr> </tr>
</notemtpy> </notemtpy>

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

Loading…
Cancel
Save