From 9d72ee8451175859771f493f290977b66ad9e5ec Mon Sep 17 00:00:00 2001
From: wangning <164851225@qq.com>
Date: Tue, 16 Jan 2018 18:03:21 +0800
Subject: [PATCH 3/5] tmp
---
.../config/orgcommission/orgcommission.js | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/main/ui/static/config/orgcommission/orgcommission.js b/src/main/ui/static/config/orgcommission/orgcommission.js
index 63d0d48b9..ec058f76c 100644
--- a/src/main/ui/static/config/orgcommission/orgcommission.js
+++ b/src/main/ui/static/config/orgcommission/orgcommission.js
@@ -27,7 +27,12 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
}).state('analysis_org.commission.month', {
url: '/commissionorg',
template: '
',
- 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 () {
From 902ee0aa3febedfa525580037f0edf139a7b793a Mon Sep 17 00:00:00 2001
From: wangning <164851225@qq.com>
Date: Tue, 16 Jan 2018 19:10:42 +0800
Subject: [PATCH 4/5] tmp
---
.../config/orgcommission/orgcommission.js | 27 ++++++-------------
.../templates/org_commission_month_root.html | 13 +++++++++
.../templates/org_commission_root.html | 10 -------
3 files changed, 21 insertions(+), 29 deletions(-)
create mode 100644 src/main/ui/static/config/orgcommission/templates/org_commission_month_root.html
diff --git a/src/main/ui/static/config/orgcommission/orgcommission.js b/src/main/ui/static/config/orgcommission/orgcommission.js
index ec058f76c..3f8e07b0f 100644
--- a/src/main/ui/static/config/orgcommission/orgcommission.js
+++ b/src/main/ui/static/config/orgcommission/orgcommission.js
@@ -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: '
',
- 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;
diff --git a/src/main/ui/static/config/orgcommission/templates/org_commission_month_root.html b/src/main/ui/static/config/orgcommission/templates/org_commission_month_root.html
new file mode 100644
index 000000000..26248c37f
--- /dev/null
+++ b/src/main/ui/static/config/orgcommission/templates/org_commission_month_root.html
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/src/main/ui/static/config/orgcommission/templates/org_commission_root.html b/src/main/ui/static/config/orgcommission/templates/org_commission_root.html
index a73fc8e34..b51901666 100644
--- a/src/main/ui/static/config/orgcommission/templates/org_commission_root.html
+++ b/src/main/ui/static/config/orgcommission/templates/org_commission_root.html
@@ -48,15 +48,5 @@