fix 商户端清算记录下载时间范围限制为一年

master
Todking 3 years ago
parent de65713f81
commit f906e0e46e

@ -12,7 +12,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
controller: 'partnerSettlementLogCtrl'
})
}]);
app.controller('partnerSettlementLogCtrl', ['$scope', 'clearingDetailService', '$http', '$filter', '$sce', function ($scope, clearingDetailService, $http, $filter, $sce) {
app.controller('partnerSettlementLogCtrl', ['$scope', 'clearingDetailService', '$http', '$filter', '$sce', 'commonDialog', function ($scope, clearingDetailService, $http, $filter, $sce, commonDialog) {
$scope.params = {};
$scope.pagination = {};
$scope.htmlTooltip = $sce.trustAsHtml('<div style="text-align: left;width:350px">' +
@ -89,6 +89,11 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
};
$scope.loadSettlementLogs = function (page) {
var params = angular.copy($scope.params);
var day = (params.dateto - params.datefrom) / 86400000
if (day > 365) {
commonDialog.alert({title: 'Error', content: '时间范围不超过一年', type: 'error'})
return
}
if (params.datefrom) {
params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd');
}

Loading…
Cancel
Save