|
|
|
@ -14,8 +14,6 @@ var commissionTypeMap = [{
|
|
|
|
|
"value": "收益比例"
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define(['angular','../../analysis/org/analysis-org'], function (angular) {
|
|
|
|
|
'use strict';
|
|
|
|
|
var app = angular.module('orgcommission', ['ui.router']);
|
|
|
|
@ -25,16 +23,11 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
|
|
|
|
|
templateUrl: '/static/config/orgcommission/templates/org_commission_root.html',
|
|
|
|
|
controller: 'orgCommissionRootCtrl'
|
|
|
|
|
}).state('analysis_org.commission.month', {
|
|
|
|
|
url: '/commissionorg',
|
|
|
|
|
template: '<div ui-view></div>',
|
|
|
|
|
controller: 'commissionMonthRootCtrl',
|
|
|
|
|
resolve: {
|
|
|
|
|
monthStr: ['$stateParams', function ($stateParams) {
|
|
|
|
|
return $stateParams.monthStr;
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
url: '/commissionorg/months/{monthStr}',
|
|
|
|
|
templateUrl: '/static/config/orgcommission/templates/org_commission_month_root.html',
|
|
|
|
|
controller: 'commissionMonthRootCtrl'
|
|
|
|
|
}).state('analysis_org.commission.month.org', {
|
|
|
|
|
url: '/months/{monthStr}',
|
|
|
|
|
url: '/org',
|
|
|
|
|
templateUrl: '/static/config/orgcommission/templates/org_commission_month.html',
|
|
|
|
|
controller: 'orgCommissionMonthViewCtrl',
|
|
|
|
|
resolve: {
|
|
|
|
@ -43,7 +36,7 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
}).state('analysis_org.commission.month.referrer', {
|
|
|
|
|
url: '/referrer_commissions/months/{monthStr}',
|
|
|
|
|
url: '/referrer',
|
|
|
|
|
templateUrl: '/static/config/referrercommission/templates/referrer_commission_month.html',
|
|
|
|
|
controller: 'referrerCommissionMonthViewCtrl',
|
|
|
|
|
resolve: {
|
|
|
|
@ -71,15 +64,14 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('commissionMonthRootCtrl', ['$scope', '$state','monthStr', function ($scope, $state,monthStr) {
|
|
|
|
|
app.controller('commissionMonthRootCtrl', ['$scope', '$state', function ($scope, $state) {
|
|
|
|
|
if($state.is('analysis_org.commission.month')){
|
|
|
|
|
$state.go('.org',{'monthStr':monthStr});
|
|
|
|
|
$state.go('.org');
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('orgCommissionRootCtrl', ['$scope', '$http', '$filter', '$state', 'commonDialog',
|
|
|
|
|
function ($scope, $http, $filter, $state, commonDialog) {
|
|
|
|
|
$scope.generate = {};
|
|
|
|
|
|
|
|
|
|
$scope.generateOrgCommission = function () {
|
|
|
|
|
$scope.generate.status = {};
|
|
|
|
|
if (!$scope.generate.month) {
|
|
|
|
@ -127,10 +119,7 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
|
|
|
|
|
$state.go('analysis_org.commission.month', {monthStr: monthStr})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.gotoReferrerMonth = function () {
|
|
|
|
|
var monthStr = $scope.params.year.getFullYear() + '-' + $scope.params.month ;
|
|
|
|
|
$state.go('analysis_org.commission.referrer.month', {monthStr: monthStr})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('orgCommissionMonthViewCtrl', ['$scope', 'monthData','$filter', function ($scope, monthData) {
|
|
|
|
|
$scope.monthData = monthData.data;
|
|
|
|
|