From 187298aad8b4e851ec4df969268130adf23977ca Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Mon, 26 Mar 2018 15:42:24 +0800 Subject: [PATCH] fix --- .../static/payment/partner/partner-manage.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index cf3d968de..696891f96 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -1191,8 +1191,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - if (!$scope.init.refund) { - $scope.init.refund = true; + if (!$scope.init.enable_refund) { + $scope.init.enable_refund = true; return; } $http.put('/sys/partners/' + $scope.partner.client_moniker + '/refund_permission', {allow: $scope.paymentInfo.enable_refund}).then(function () { @@ -1209,8 +1209,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } - if (!$scope.init.refund) { - $scope.init.refund = true; + if (!$scope.init.enable_pre_refund) { + $scope.init.enable_pre_refund = true; return; } $http.put('/sys/partners/' + $scope.partner.client_moniker + '/pre_refund_permission', {allow: $scope.paymentInfo.enable_pre_refund}).then(function () { @@ -1255,12 +1255,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter type: 'error' }) }) - } + }; $scope.toggleRequireCustInfo = function () { if (!$scope.paymentInfo) { return; } + if (!$scope.init.require_custinfo) { + $scope.init.require_custinfo = true; + return; + } $http.post('/sys/partners/' + $scope.partner.client_moniker + '/requireCustinfo', {allow: $scope.paymentInfo.require_custinfo}).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) { @@ -1276,6 +1280,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return; } + if (!$scope.init.require_remark) { + $scope.init.require_remark = true; + return; + } $http.post('/sys/partners/' + $scope.partner.client_moniker + '/requireRemark', {allow: $scope.paymentInfo.require_remark}).then(function () { $scope.loadPartnerPaymentInfo(); }, function (resp) {