master
yixian 5 years ago
parent 50f92d69cb
commit 3b6db8dff5

@ -97,9 +97,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.analysis = resp.data.analysis;
});
};
$scope.excelSettlementAllLogs = function(){
$scope.excelSettlementAllLogs = function () {
var params = angular.copy($scope.params);
var url = '/client/trans_flow/settlement/log/excelAll';
var url = '/client/trans_flow/settlement/log/excelAll';
var connectSymbol = '?';
if (params.datefrom) {
params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd');
@ -110,7 +110,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
url += connectSymbol + 'dateto=' + params.dateto;
}
if (params.client_ids){
if (params.client_ids) {
params.client_ids.forEach(function (i) {
url += connectSymbol + 'client_ids=' + i;
connectSymbol = '&';
@ -120,13 +120,15 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
};
$scope.chooseLast7Days();
$scope.exportSettlementLogs = function(pattern) {
var params = angular.copy($scope.params);
var url = '/client/trans_flow/settlement/log/excel';
$scope.exportSettlementLogs = function (pattern) {
let params = angular.copy($scope.params);
let url = '/client/trans_flow/settlement/log/excel';
if (pattern === 'pdf') {
url = '/client/trans_flow/settlement/log/pdf';
} else if (pattern === 'csv') {
url = '/client/trans_flow/settlement/log/csv';
}
var connectSymbol = '?';
let connectSymbol = '?';
if (params.datefrom) {
params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd');
url += connectSymbol + 'datefrom=' + params.datefrom;
@ -136,7 +138,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
url += connectSymbol + 'dateto=' + params.dateto;
}
if (params.client_ids){
if (params.client_ids) {
params.client_ids.forEach(function (i) {
url += connectSymbol + 'client_ids=' + i;
connectSymbol = '&';

@ -107,6 +107,7 @@
</button>
<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button" style="min-width: 80px">
<li><a target="_blank" ng-href="{{exportSettlementLogs('pdf')}}">PDF</a></li>
<li><a target="_blank" ng-href="{{exportSettlementLogs('csv')}}">CSV</a></li>
<li><a target="_blank" ng-href="{{exportSettlementLogs('excel')}}">EXCEL</a></li>
</ul>
</div>

Loading…
Cancel
Save