wangning 7 years ago
parent 9d72ee8451
commit 902ee0aa3f

@ -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;

@ -0,0 +1,13 @@
<div is-open="ctrl.viewyear">
<ul id="myTab" class="nav nav-tabs">
<li ui-sref-active="active">
<a ui-sref=".org" data-toggle="tab">
合伙人提成
</a>
</li>
<li ui-sref-active="active"><a ui-sref=".referrer" data-toggle="tab">推荐人提成</a></li>
</ul>
<div class="tab-content" ui-view>
</div>
</div>

@ -48,15 +48,5 @@
</div> </div>
</div> </div>
<div is-open="ctrl.viewyear">
<ul id="myTab" class="nav nav-tabs">
<li class="active">
<a ng-click="gotoMonth(mon.month)" data-toggle="tab">
合伙人提成
</a>
</li>
<li><a ng-click = "gotoReferrerMonth(mon.month)" data-toggle="tab">推荐人提成</a></li>
</ul>
</div>
<div ui-view></div> <div ui-view></div>
</div> </div>
Loading…
Cancel
Save