|
|
|
@ -93,15 +93,17 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.params = {year: new Date()};
|
|
|
|
|
$scope.availableYears = [new Date().getFullYear() - 1, new Date().getFullYear()];
|
|
|
|
|
$scope.params = {};
|
|
|
|
|
$scope.months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
|
|
|
$scope.loadAvailableMonths = function () {
|
|
|
|
|
$http.get('/sys/citypartner_prizes/months', {params: {year: $scope.params.year.getFullYear()}}).then(function (resp) {
|
|
|
|
|
$scope.loadAvailableMonths = function (year) {
|
|
|
|
|
$scope.params.year = year;
|
|
|
|
|
$http.get('/sys/citypartner_prizes/months', {params: {year: $scope.params.year}}).then(function (resp) {
|
|
|
|
|
$scope.availableMonths = resp.data;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.loadAvailableMonths();
|
|
|
|
|
$scope.loadAvailableMonths(new Date().getFullYear());
|
|
|
|
|
$scope.hasReport = function (mon) {
|
|
|
|
|
var has = false;
|
|
|
|
|
angular.forEach($scope.availableMonths, function (m) {
|
|
|
|
@ -115,7 +117,7 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
|
|
|
|
|
if(mon){
|
|
|
|
|
$scope.params.month = mon;
|
|
|
|
|
}
|
|
|
|
|
var monthStr = $scope.params.year.getFullYear() + '-' + $scope.params.month;
|
|
|
|
|
var monthStr = $scope.params.year + '-' + $scope.params.month;
|
|
|
|
|
$state.go('analysis_org.commission.month', {monthStr: monthStr})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|