推广平台->财务管理->(结算中心|结算明细--检索日期范围调整)(提现记录->结算单--侧边栏高亮修复)

master
chenxiaojun 5 years ago
parent 905efbfd9a
commit 669e641c1e

@ -97,6 +97,9 @@ class FinanceController extends BaseController
$endTime = strtotime($initEndTime);
$endTime = $endTime + 3600 * 24;
$records = [];
$income = [];
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%'];
$promoteIds = M('promote', 'tab_')->where($map)->getField('id', true);
$promoteIds[] = $this->loginPromote['id'];
@ -132,6 +135,7 @@ class FinanceController extends BaseController
'url' => U('settlementDtl', array('begtime' => $day, 'endtime' => $day))
];
}
}
$this->assign('income', $income);
$this->assign('listData', $records);
@ -164,6 +168,7 @@ class FinanceController extends BaseController
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$parameter['p'] = $page;
$parameter['row'] = $row;
@ -171,6 +176,9 @@ class FinanceController extends BaseController
$parameter['begtime'] = $initBegTime;
$parameter['endtime'] = $initEndTime;
$data = [];
$count = 0;
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%'];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$ids[] = $this->loginPromote['id'];
@ -178,16 +186,10 @@ class FinanceController extends BaseController
$map = [];
$map['promote_id'] = ['in', $ids];
$map['pay_time'] = ['between', [$begTime, $endTime]];
if (!empty($payOrderNumber)) {
$map['pay_order_number'] = $payOrderNumber;
}
if (!empty($begTime) && empty($endTime)) {
$map['pay_time'] = ['egt', $begTime];
} elseif (empty($begTime) && !empty($endTime)) {
$map['pay_time'] = ['elt', $endTime + 86399];
} elseif (!empty($begTime) && !empty($endTime)) {
$map['pay_time'] = ['between', [$begTime, $endTime + 86399]];
}
$data = $model->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id')
->where($map)
@ -229,6 +231,7 @@ class FinanceController extends BaseController
$list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2);
$list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']);
}
}
$page = set_pagination($count, $row, $parameter);

@ -126,7 +126,7 @@
layer.msg('开始时间必须小于等于结束时间', {icon: 5});
return false;
}
if ((edate - sdate) > 2505600) {
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过30天请重新选择日期', {icon: 5});
return false;
}

@ -210,12 +210,18 @@
});
$('#submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
var sdate = Date.parse($('#sdate').val()) / 1000;
var edate = Date.parse($('#edate').val()) / 1000;
if (sdate > edate) {
layer.msg('开始时间必须小于等于结束时间', {icon: 5});
return false;
}
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过30天请重新选择日期', {icon: 5});
return false;
}
var url = $(this).attr('url');
console.log(url);
var query = $('.jssearch').find('input').serialize();

@ -73,7 +73,7 @@
<div class="navContent jsnavContent">
<a href="{:U('Finance/index')}" class="<if condition='CONTROLLER_NAME eq Finance and ACTION_NAME eq index '>active</if> ">结算中心</a>
<a href="{:U('Finance/settlementDtl')}" class="<if condition='CONTROLLER_NAME eq Finance and ACTION_NAME eq settlementDtl '>active</if> ">结算明细</a>
<a href="{:U('Finance/withdrawRecord')}" class="<if condition='CONTROLLER_NAME eq Finance and (ACTION_NAME eq withdrawRecord or ACTION_NAME eq withdrawDtl) '>active</if> ">提现记录</a>
<a href="{:U('Finance/withdrawRecord')}" class="<if condition='CONTROLLER_NAME eq Finance and (ACTION_NAME eq withdrawRecord or ACTION_NAME eq withdrawDtl or ACTION_NAME eq settlementOrder) '>active</if> ">提现记录</a>
</div>
<?php endif ;?>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>游戏管理</span><i class="arrow_icon"></i></div>

Loading…
Cancel
Save