wangning 7 years ago
parent 9d72ee8451
commit 902ee0aa3f

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

@ -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 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>
Loading…
Cancel
Save