master
wangning 7 years ago
parent d41232822f
commit 0fea884bd1

@ -9,6 +9,10 @@ define(['angular'], function (angular) {
url: '/contract',
templateUrl: '/static/sys/templates/contract_sign.html',
controller: 'contractAnalysisCtrl'
}).state('rate_warnings', {
url: '/rate_warnings',
templateUrl: '/static/analysis/templates/settle_warnings.html',
controller: 'settleWarningsCtrl'
})
}]);
app.controller('contractAnalysisCtrl', ['$scope', '$http', '$state', '$filter', 'commonDialog', function ($scope, $http, $state, $filter, commonDialog) {
@ -19,5 +23,32 @@ define(['angular'], function (angular) {
};
$scope.getContractAnalysis();
}]);
app.controller('settleWarningsCtrl', ['$scope', '$http', '$filter', 'commonDialog', function ($scope, $http, $filter, commonDialog) {
$scope.loadWarnings = function () {
$http.get('/manage/clearing/rate_warnings').then(function (resp) {
$scope.warning = resp.data;
})
};
$scope.loadWarnings();
$scope.generateRate = function (client) {
commonDialog.confirm({title: 'Confirm Required', content: '根据上季度总交易额自动计算下周期费率,确定执行?'}).then(function () {
$http.put('/manage/clearing/clients/' + client.client_moniker + '/auto_rate').then(function (resp) {
var content = 'New Rate value=' + resp.data.rate_value + '; expiry_time=' + $filter('date')(resp.data.expiry_time, 'dd/MMM/yyyy');
commonDialog.alert({
type: 'success',
title: 'New Rate Generated',
content: content
}).then(function () {
$scope.loadWarnings();
});
}, function (resp) {
commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message});
})
})
}
}]);
return app;
});

@ -1,4 +1,13 @@
<div class="modal-header">Contract</div>
<ul class="nav nav-tabs">
<li ui-sref-active-eq="active" class="active">
<a ui-sref="contract">Contract</a>
</li>
<li ui-sref-active="active">
<a ui-sref="rate_warnings">Rate Warings</a>
</li>
</ul>
<div class="modal-body">
<div class="box box-danger">
<div class="box-header">商户合同情况</div>

Loading…
Cancel
Save