|
|
|
@ -78,6 +78,7 @@ define(['angular', 'decimal', 'uiRouter', 'angularEcharts', '../../analysis/repo
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('platformRevenueRootCtrl', ['$scope', '$http', '$filter', 'chartParser', function ($scope, $http, $filter, chartParser) {
|
|
|
|
|
$scope.params = {year: new Date().getFullYear()};
|
|
|
|
|
$scope.availableYears = [new Date().getFullYear() - 1, new Date().getFullYear()];
|
|
|
|
|
$scope.initMonth = function (year) {
|
|
|
|
|
$scope.months = [];
|
|
|
|
|
for (var i = 1; i < 13; i++) {
|
|
|
|
@ -93,6 +94,7 @@ define(['angular', 'decimal', 'uiRouter', 'angularEcharts', '../../analysis/repo
|
|
|
|
|
return start <= mon && end >= mon
|
|
|
|
|
};
|
|
|
|
|
$scope.loadYearReport = function (year) {
|
|
|
|
|
$scope.params.year = year;
|
|
|
|
|
$http.get('/analysis/platform/revenue/year_reports/' + year).then(function (resp) {
|
|
|
|
|
$scope.report = resp.data;
|
|
|
|
|
loadChargeAnalysis(year);
|
|
|
|
@ -164,7 +166,7 @@ define(['angular', 'decimal', 'uiRouter', 'angularEcharts', '../../analysis/repo
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.loadYearReport(2017);
|
|
|
|
|
$scope.loadYearReport(new Date().getFullYear());
|
|
|
|
|
}]);
|
|
|
|
|
return app;
|
|
|
|
|
});
|