modify html

master
yuan 7 years ago
parent cd60d89c40
commit 3714c814c3

@ -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();
}]);

Loading…
Cancel
Save