From 236d2c6a14b9ca1fa16228e11d16cbdb54d7c59f Mon Sep 17 00:00:00 2001 From: "xiao.tang" Date: Mon, 29 Mar 2021 09:52:19 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feat(RoyalPay):=20=E6=B7=BB=E5=8A=A0Al?= =?UTF-8?q?ipayPlus=E8=B4=B9=E7=8E=87=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/payment/partner/partner-manage.js | 91 +++++ .../templates/partner_bankaccounts.html | 335 +++++++++++------- .../partner_new_alipayplus_rate.html | 150 ++++++++ 3 files changed, 440 insertions(+), 136 deletions(-) create mode 100644 src/main/ui/static/payment/partner/templates/partner_new_alipayplus_rate.html diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index fe48aea7a..da97ebea7 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3404,6 +3404,97 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } } $scope.complianceChangeCheck() + + // 是否为alipayplus + $scope.isAlipayCN = true + // 修改渠道 + $scope.changeAlipayPlusRateState = function (flag) { + $scope.isAlipayCN = flag + } + // 过滤渠道 + $scope.isAlipayPlus = function (item) { + if ($scope.isAlipayCN) { + return item.rate_name === 'AlipayPlus' && (item.pay_type === 'alipay_cn_retail' || item.pay_type === 'alipay_cn_online') + } else { + return item.rate_name === 'AlipayPlus' && item.pay_type === 'alipay_other' + } + } + // 新增alipay+费率 + $scope.newAlipayPlusRate = function () { + $uibModal + .open({ + templateUrl: '/static/payment/partner/templates/partner_new_alipayplus_rate.html', + resolve: { + rate: function () { + return { + rate_name: 'AlipayPlus', + clean_days: '3', + } + }, + sys_common_rate: function () { + return $http.get('/sys/partners/sys_rates') + }, + clientMoniker: function () { + return $scope.partner.client_moniker + }, + }, + controller: [ + '$scope', + '$http', + 'rate', + 'sys_common_rate', + 'clientMoniker', + function ($scope, $http, rate, sys_common_rate, clientMoniker) { + $scope.rate = angular.copy(rate) + $scope.sysRateConfig = angular.copy(sys_common_rate.data) + $scope.ctrl = { sending: false } + $scope.saveRate = function (form) { + if (form.$invalid) { + angular.forEach(form, function (item, key) { + if (key.indexOf('$') < 0) { + item.$dirty = true + } + }) + return + } + $scope.errmsg = null + $scope.ctrl.sending = true + $http.post('/sys/partners/' + clientMoniker + '/rates', $scope.rate).then( + function () { + $scope.ctrl.sending = false + $scope.$close() + }, + function (resp) { + $scope.ctrl.sending = false + $scope.errmsg = resp.data.message + } + ) + } + $scope.changeDays = function () { + // if ($scope.rate.clean_days) { + // switch ($scope.rate.clean_days) { + // case '1': { + // $scope.rate.alipayplus = parseFloat($scope.sysRateConfig.t1.AlipayPlus) + // break + // } + // case '2': { + // $scope.rate.alipayplus = parseFloat($scope.sysRateConfig.t2.AlipayPlus) + // break + // } + // case '3': { + // $scope.rate.alipayplus = parseFloat($scope.sysRateConfig.t3.AlipayPlus) + // break + // } + // } + // } + } + }, + ], + }) + .result.then(function () { + $scope.getRates() + }) + } }, ]) app.controller('surchargeAccountDetailCtrl', [ diff --git a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html index edc8f9da8..f15c83f7c 100644 --- a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html +++ b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html @@ -8,7 +8,7 @@

Bank Account + ng-if="!bankCtrl.edit && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))">

@@ -18,15 +18,15 @@

{{surcharge.balance|currency:'AUD'}}

+ style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px" + ng-click="surchargeAccountDetail()">

+ switch-change="allowSurchargeCredit(partner.allow_surcharge_credit)">
@@ -34,12 +34,12 @@

balance - + distributed - +

启用到收支分离(distributed)模式,将使消费者支付手续费模式失效
@@ -52,28 +52,28 @@

+ switch-change="taxInSurcharge(partner.tax_in_surcharge)">
+ switch-change="customerTaxFree(partner.customer_tax_free)">
+ switch-change="skipClearing(partner.skip_clearing)">
+ switch-change="switchPreSettle(partner.enable_presettle)">
@@ -86,7 +86,7 @@ -
-
+
+

Rates - + ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))" + ng-click="newRate()"> +

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rate NameRate ValueDomestic Rate ValueInternational Rate ValueTransaction FeeActive TimeExpire Time - Clean Days - Update TimeOperatorRemarkOperation
- T+{{rate.clean_days}} - - - - (Promotional Offer) - - -
-
- check +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rate NameRate ValueDomestic Rate ValueInternational Rate ValueTransaction FeeActive TimeExpire Time + Clean Days + Update TimeOperatorRemarkOperation
+ + T+{{rate.clean_days}} + + + + (Promotional Offer) + + +
+
+
+
+ +
+
+

AlipayPlus Rates + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rate NameRate ValueTransaction FeeActive TimeExpire TimeClean DaysUpdate TimeOperatorRemarkOperation
T+{{rate.clean_days}} + + + (Promotional Offer) + + +
+
-
-
+
\ No newline at end of file diff --git a/src/main/ui/static/payment/partner/templates/partner_new_alipayplus_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_alipayplus_rate.html new file mode 100644 index 000000000..996cba8c1 --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/partner_new_alipayplus_rate.html @@ -0,0 +1,150 @@ + + + \ No newline at end of file