From f906e0e46e472b2199d7d6be1a1e9d20c6ba5b5c Mon Sep 17 00:00:00 2001 From: Todking Date: Thu, 10 Feb 2022 17:00:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=95=86=E6=88=B7=E7=AB=AF=E6=B8=85?= =?UTF-8?q?=E7=AE=97=E8=AE=B0=E5=BD=95=E4=B8=8B=E8=BD=BD=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E9=99=90=E5=88=B6=E4=B8=BA=E4=B8=80=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payment/tradelog/partner-settlement-log.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/ui/static/payment/tradelog/partner-settlement-log.js b/src/main/ui/static/payment/tradelog/partner-settlement-log.js index fd4179fe1..56010af15 100644 --- a/src/main/ui/static/payment/tradelog/partner-settlement-log.js +++ b/src/main/ui/static/payment/tradelog/partner-settlement-log.js @@ -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('
' + @@ -29,7 +29,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) { $scope.subClientTable2 = []; $scope.choseSubClientNow = 'More'; $scope.subSearchText = ''; - $scope.searchSubClients = function (subSearchText,page) { + $scope.searchSubClients = function (subSearchText, page) { $scope.subClientTable1 = [$scope.currentUser.client]; $scope.subClientTable2 = []; @@ -39,13 +39,13 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) { $scope.subSearchText = subSearchText; params.searchText = subSearchText; } - $http.get('/client/partner_info/sub_partners/page',{params: params}).then(function (resp) { + $http.get('/client/partner_info/sub_partners/page', {params: params}).then(function (resp) { var clientList = resp.data.data; $scope.subClientPagination = resp.data.pagination; clientList.forEach(function (client) { if ($scope.subClientTable1.length < 11) { $scope.subClientTable1.push(client); - }else { + } else { $scope.subClientTable2.push(client); } $scope.clients.push(client); @@ -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'); } @@ -192,13 +197,13 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) { }; if ($scope.currentUser.client.has_children && !$scope.currentUser.client.hide_sub_mch) { - $scope.searchSubClients('',1); + $scope.searchSubClients('', 1); $scope.params.dateto = new Date(); var day = new Date(); day.setDate(day.getDate() - 7); $scope.params.datefrom = day; $scope.chooseClient('all'); - }else { + } else { $scope.params.dateto = new Date(); var day = new Date(); day.setDate(day.getDate() - 7);