diff --git a/src/main/ui/static/config/bdprize/bdprize.js b/src/main/ui/static/config/bdprize/bdprize.js index eaac60668..fdd6f20f6 100644 --- a/src/main/ui/static/config/bdprize/bdprize.js +++ b/src/main/ui/static/config/bdprize/bdprize.js @@ -249,15 +249,17 @@ define(['angular', '../../analysis/bd/analysis-bd'], function (angular) { }; $scope.getBDLevels(); $scope.chooseLastConfig = function (mon) { - var index = $scope.months.indexOf(mon); + let year = new Date(mon).getFullYear(); + let month = new Date(mon).getMonth(); if(index == 0){ - var year = new Date().getFullYear(); year--; - mon = year + '-12'; + month = year + '-12'; + }else if(month <= 9){ + month = year + '-0' + month; }else { - mon = $scope.months[index-1]; + month = year + '-' + month; } - $http.get('/sys/bd_prize/commission/le_ma/' + mon).then(function (resp) { + $http.get('/sys/bd_prize/commission/le_ma/' + month).then(function (resp) { $scope.bdlm = []; angular.forEach(resp.data,function (e) { var bdC = {};