From 3714c814c3d83167ee3b417259ba6e13a948d870 Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Thu, 22 Mar 2018 18:04:25 +0800 Subject: [PATCH] modify html --- src/main/ui/static/payment/partner/partner.js | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index 181ff13af..fa6a53a06 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -203,8 +203,9 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct }) } }]); - app.controller('clientClearingConfigCtrl', ['$scope', '$http', function ($scope, $http) { + app.controller('clientClearingConfigCtrl', ['$scope', '$http','commonDialog', function ($scope, $http,commonDialog) { $scope.bankCtrl = {rate_name:'Wechat'}; + $scope.init = {manual:false}; $scope.getBankAccount = function () { $http.get('/client/partner_info/bank_account').then(function (resp) { $scope.bankaccount = resp.data; @@ -221,9 +222,25 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct }); }; $scope.manualSettle = function (manualSettle) { - $http.put('/client/partner_info/manual_settle?'+'manual_settle='+manualSettle).then(function (resp) { - - }) + if(!$scope.init.manual){ + $scope.init.manual = true; + return; + } + var waring_messsage; + if(manualSettle){ + waring_messsage = "Open" + }else { + waring_messsage = "Close" + } + commonDialog.confirm({ + title: 'Confirmation', + content: 'Are you sure to '+waring_messsage+'?', + }).then(function(){ + $http.put('/client/partner_info/manual_settle?'+'manual_settle='+manualSettle).then(function (resp) { + },function (resp) { + commonDialog.alert({title: 'Error!', content: resp.data.message, type: 'error'}) + }) + }); }; $scope.getRates(); }]);