回单匹配统计

dev
zhaocheng 5 years ago
parent f72d6ca2eb
commit 47480ed979
  1. 11
      frontend/controllers/FinanceController.php
  2. 17
      frontend/views/finance/receipt.php

@ -213,8 +213,8 @@ class FinanceController extends \frontend\controllers\UserBaseController
$data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();
$row['group'] = $item->user->group->name;
$row['company_name'] = $item->order->company2->name;
$row['group'] = $item->user->group ? $item->user->group->name : '';
$row['company_name'] = $item->order->company2 ? $item->order->company2->name : 0;
$row['username'] = $item->user->getShowName();
$row['submit_date'] = $item->order->submit_date;
$row['print_date'] = $item->order->print_date;
@ -222,6 +222,13 @@ class FinanceController extends \frontend\controllers\UserBaseController
$data['rows'][] = $row;
}
$data['rows'][] = array(
['商业保总额', $sum_total],
['商业净保总额', $sum_total_clear],
['回款总额', $sum_r_total],
['回款差额', $sum_total_dis]
);
return $data;
}
public function actionReceiptImport() {

@ -23,8 +23,8 @@ use \common\libs\MyLib;
<div class="form-group" style="margin-bottom: 8px;">
<label for="name">匹配程度</label>
<select name="status" class="form-control">
<option value=0>全部</option>
<option value=1 selected>未匹配</option>
<option value=0 selected>全部</option>
<option value=1>未匹配</option>
<option value=2 >已完成</option>
<option value=3 >匹配差额</option>
</select>
@ -145,6 +145,19 @@ use \common\libs\MyLib;
o['offset'] = params['offset'];
o['limit'] = params['limit'];
return o;
},
responseHandler: function (res) {
var totals = res.rows.pop();
var html = '<tfoot><tr><td colspan="18" class="text-center">';
$.each(totals,function (i,d) {
html += '<div class="layui-show-md-inline-block m-r-lg m-l-lg">' +
'<span>'+ d[0] +':</span>' +
'<span class="font-bold">'+ d[1] +'</span>' +
'</div>'
});
html += '</td></tr></tfoot>';
$('#listTable').append(html);
return res;
}
});
return false;

Loading…
Cancel
Save