wangning 7 years ago
parent c95568e565
commit 9d72ee8451

@ -27,7 +27,12 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
}).state('analysis_org.commission.month', {
url: '/commissionorg',
template: '<div ui-view></div>',
controller: ''
controller: 'commissionMonthRootCtrl',
resolve: {
monthStr: ['$stateParams', function ($stateParams) {
return $stateParams.monthStr;
}]
}
}).state('analysis_org.commission.month.org', {
url: '/months/{monthStr}',
templateUrl: '/static/config/orgcommission/templates/org_commission_month.html',
@ -66,9 +71,9 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
}
})
}]);
app.controller('loginLogRootCtrl', ['$scope', '$state', function ($scope, $state) {
if ($state.is('logview.login_history')) {
$state.go('.managers')
app.controller('commissionMonthRootCtrl', ['$scope', '$state','monthStr', function ($scope, $state,monthStr) {
if($state.is('analysis_org.commission.month')){
$state.go('.org',{'monthStr':monthStr});
}
}]);
app.controller('orgCommissionRootCtrl', ['$scope', '$http', '$filter', '$state', 'commonDialog',
@ -115,13 +120,11 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
return has;
};
$scope.gotoMonth = function (mon) {
if($state.is('analysis_org.commission.month')){
if(mon){
$scope.params.month = mon;
}
var monthStr = $scope.params.year.getFullYear() + '-' + $scope.params.month;
$state.go('.org', {monthStr: monthStr})
}
$state.go('analysis_org.commission.month', {monthStr: monthStr})
};
$scope.gotoReferrerMonth = function () {

Loading…
Cancel
Save