|
|
|
@ -1887,7 +1887,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.loadSubClients();
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', function ($scope, $rootScope, $http, $uibModal, commonDialog) {
|
|
|
|
|
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog','$sce', function ($scope, $rootScope, $http, $uibModal, commonDialog,$sce) {
|
|
|
|
|
$scope.bankCtrl = {edit: true, rate_name: 'Wechat'};
|
|
|
|
|
$scope.init = {skip_clearing:false,tax_in_surcharge:false,customer_tax_free:false};
|
|
|
|
|
$scope.getBankAccount = function () {
|
|
|
|
@ -1906,19 +1906,39 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.skipClearing = function (skipClearing) {
|
|
|
|
|
if (!$scope.init.skip_clearing) {
|
|
|
|
|
$scope.init.skip_clearing = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'This operation will switch skip clearing status. Are you sure?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) {
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
if (!skipClearing) {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'This operation will switch skip clearing status. Are you sure?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
commonDialog.inputText({title: '请输入关闭跳过清算的原因'}).then(function (text) {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {
|
|
|
|
|
skip_clearing: skipClearing,
|
|
|
|
|
remark: text
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'This operation will switch skip clearing status. Are you sure?',
|
|
|
|
|
// contentHtml: $sce.trustAsHtml('This operation will switch skip clearing status. Are you sure?<input ng-model="remark"></input>')
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) {
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
$scope.taxInSurcharge = function (taxInSurcharge) {
|
|
|
|
|
if (!$scope.init.tax_in_surcharge) {
|
|
|
|
|