From f291d463a901f1786aff56602c0943d60fcf8cdf Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 30 Apr 2019 10:36:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=89=8B=E7=BB=AD=E8=B4=B9=E6=98=8E?= =?UTF-8?q?=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../merchants/web/PartnerViewController.java | 1 - .../partner-surcharge-account.js | 20 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java index d59eb9d62..632458bc9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java @@ -182,7 +182,6 @@ public class PartnerViewController { clientManager.setOrderExpiryConfig(account,clientMoniker, config.getString("order_expiry_config")); } - @PartnerMapping(value = "/{clientMoniker}/surcharge_account", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER}) @ResponseBody public JSONObject surchargeAccount(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker) { diff --git a/src/main/ui/static/payment/surchargeaccount/partner-surcharge-account.js b/src/main/ui/static/payment/surchargeaccount/partner-surcharge-account.js index 62010c891..e6acb095a 100644 --- a/src/main/ui/static/payment/surchargeaccount/partner-surcharge-account.js +++ b/src/main/ui/static/payment/surchargeaccount/partner-surcharge-account.js @@ -22,9 +22,7 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func }) }]); app.controller('clientSurchargeAccountCtrl', ['$scope', '$http','$state','$filter', 'commonDialog','partner','$uibModal', function ($scope, $http,$state,$filter, commonDialog, partner,$uibModal) { - $scope.partner = angular.copy(partner.data); - $scope.getBalance = function () { $scope.surcharge = {}; if ($scope.partner.surcharge_mode != undefined && $scope.partner.surcharge_mode == "distributed") { @@ -49,6 +47,24 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func }) }; $scope.getDetailByMonths(); + $scope.surchargeAccountDetail = function (client_moniker,mon) { + $uibModal.open({ + templateUrl: '/static/payment/surchargeaccount/templates/client_surcharge_account_dialog.html', + controller: 'accountDetailCtrl', + size: 'lg', + resolve: { + client_moniker: function () { + return client_moniker; + }, + month: function () { + return mon; + }, + transactions: ['$http', function ($http) { + return $http.get('/client/partner_info/' + client_moniker + '/account/transactions/date?date=' + mon); + }] + } + }); + }; }]); app.controller('surchargeAccountMonthCtrl', ['$scope', '$http', '$filter', '$timeout', '$uibModal', 'commonDialog', 'chartParser','$sce', function ($scope, $http, $filter, $timeout, $uibModal, commonDialog, chartParser, $sce) {