fix BD启用上月设置问题修复

master
todking 4 years ago
parent 768dd859f0
commit be951dc34b

@ -249,15 +249,17 @@ define(['angular', '../../analysis/bd/analysis-bd'], function (angular) {
}; };
$scope.getBDLevels(); $scope.getBDLevels();
$scope.chooseLastConfig = function (mon) { $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){ if(index == 0){
var year = new Date().getFullYear();
year--; year--;
mon = year + '-12'; month = year + '-12';
}else if(month <= 9){
month = year + '-0' + month;
}else { }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 = []; $scope.bdlm = [];
angular.forEach(resp.data,function (e) { angular.forEach(resp.data,function (e) {
var bdC = {}; var bdC = {};

Loading…
Cancel
Save