新增显示全部

master
chenzhi 4 years ago
parent 60e89f6868
commit 309300299d

@ -411,6 +411,44 @@ function set_pagination($count, $row,$request='') {
}
}
function set_pagination_all($count, $row,$request='') {
$aside = '<script>function pagechange(that){url = location.href.replace(".html","").replace(/(&|\/)row(=|\/)\d*/gi,"").replace(/\/p\/\d*/gi,"");if(url.indexOf("?")>0){url += "&row="+that.value;}else{url += "?row="+that.value;} window.location.href = url;}</script><select id="pagechange" name="row" onchange="pagechange(this)">';
if($row == 10){
$aside .= '<option value="10" selected>每页10条</option>';
}else{
$aside .= '<option value="10">每页10条</option>';
}
if($row == 50){
$aside .= '<option value="50" selected>每页50条</option>';
}else{
$aside .= '<option value="50">每页50条</option>';
}
if($row == 100){
$aside .= '<option value="100" selected>每页100条</option>';
}else{
$aside .= '<option value="100">每页100条</option>';
}
if($row == 999999){
$aside .= '<option value="999999" selected>全部显示</option></select>';
}else{
$aside .= '<option value="999999">全部显示</option></select>';
}
$count=$count?$count:0;
$row=$row?$row:10;
if ($count > $row) {
$page = new \Think\Page($count, $row,$request);
$page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
$html = $page->show();
return str_replace('<div>','<div>' .$aside,$html);
} else {
return '<div>' .$aside. '<span class="rows">共 '.$count.' 条记录</span></div>';
}
}
function get_source_from_game($id=0) {
if (!is_numeric($id) || $id<1) {return '';}

@ -72,7 +72,7 @@ class ExcelPaymentController extends BaseController
$map['i.pay_status'] = $_REQUEST['pay_status'];
}
if(isset($_REQUEST['batch_num'])){
$map['i.batch_num'] = $_REQUEST['batch_num'];
$map['i.batch_num'] = ["LIKE","%{$_REQUEST['batch_num']}%"];
}
$CompanyInfo = M("excel_statement_info","tab_")
@ -101,14 +101,17 @@ class ExcelPaymentController extends BaseController
}
//统计待打款金额
$countmap = $map;
$countmap['pay_status']=["neq",1];
$money = M("excel_statement_info","tab_")->alias('i')->field("sum(statement_money) statement_money")->where($countmap)->find();
$field = "IFNULL(SUM(CASE WHEN pay_status = 1 THEN statement_money ELSE 0 END),0) as success_money,
IFNULL(SUM(CASE WHEN pay_status = 0 THEN statement_money ELSE 0 END),0) as statement_money,
IFNULL(SUM(CASE WHEN pay_status = -1 THEN statement_money ELSE 0 END),0) as error_money";
$money = M("excel_statement_info","tab_")->alias('i')->field( $field)->where($map)->find();
$count = M("excel_statement_info","tab_")->alias('i')->field("count(id) count")->where($map)->find();
$page = set_pagination($count['count'], $row);
$page = set_pagination_all($count['count'], $row);
if ($page) {
$this->assign('_page', $page);
}
// echo($page);die();
$this->meta_title = 'EXCEL打款';
$this->assign("data",$CompanyInfo);
$this->assign("money",$money);

@ -240,7 +240,7 @@
COMPARE.checkData(function(){
COMPARE.loopCheck(1,function(){
setTimeout(function(){
window.location.href="{:U('lists',['row'=>100,'page'=>1,'batch_num'=>$batch])}";
window.location.href="{:U('lists',['row'=>999999,'page'=>1,'batch_num'=>$batch])}";
},1500);
})
});

@ -93,6 +93,10 @@
display: block;
}
.page .sch-btn:before{
content: '';
padding: 0;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
@ -121,7 +125,7 @@
<div class="input-list input-list-promote search_label_rehab">
<select id="pay_status" name="pay_status" class="select_gallery" >
<option value="">结算单类型</option>
<option value="">支付状态</option>
<volist name="PayStatus" id="vo">
<option value="{$key}" <if condition="isset($_GET['pay_status']) && $key eq I('pay_status')">selected</if> >{$vo}</option>
</volist>
@ -216,7 +220,9 @@
</td>
</tr>
</volist>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">待打款金额:&nbsp;{$money.statement_money}</td></tr>
<tr><td style="line-height: 42px;">合计</td><td colspan="13" style="line-height: 42px;">
打款成功金额:&nbsp;{$money.success_money}&nbsp;&nbsp;/&nbsp;&nbsp;待打款金额:&nbsp;{$money.statement_money}&nbsp;&nbsp;/&nbsp;&nbsp;打款成功金额:&nbsp;{$money.error_money}
</td></tr>
</notemtpy>
</tbody>
</table>
@ -271,6 +277,7 @@
});
});
$("#export").click(function () {
var flag = false;
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {

Loading…
Cancel
Save