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