Browse Source

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@507 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d

administrator 11 years ago
parent
commit
d23ea98414

+ 23 - 71
src/main/webapp/resources/js/index/app.js

@@ -38,109 +38,61 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		}).state('sale.index', {
 			url : "",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/index.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/index.html"
 		}).state('sale.home', {
 			url : "/",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/index.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/index.html"
 		}).state('sale.todo', {
 			url : "/todo",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/todo.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/todo.html"
 		}).state('sale.todo.inquiry', {
 			url : "/inquiry",
-			views : {
-				"todo-view" : {
-					templateUrl : "static/tpl/index/sale/inquiry.html"
-				}
+			templateUrl : "static/tpl/index/sale/inquiry.html",
+			controller: function($rootScope) {
+				$rootScope.active = 'inquiry';
 			}
 		}).state('sale.todo.order', {
 			url : "/order",
-			views : {
-				"todo-view" : {
-					templateUrl : "static/tpl/index/sale/order.html"
-				}
+			templateUrl : "static/tpl/index/sale/order.html",
+			controller: function($rootScope) {
+				$rootScope.active = 'order';
 			}
 		}).state('sale.todo.change', {
 			url : "/change",
-			views : {
-				"todo-view" : {
-					templateUrl : "static/tpl/index/sale/change.html"
-				}
+			templateUrl : "static/tpl/index/sale/change.html",
+			controller: function($rootScope) {
+				$rootScope.active = 'change';
 			}
 		}).state('sale.todo.notice', {
 			url : "/notice",
-			views : {
-				"todo-view" : {
-					templateUrl : "static/tpl/index/sale/notice.html"
-				}
+			templateUrl : "static/tpl/index/sale/notice.html",
+			controller: function($rootScope) {
+				$rootScope.active = 'notice';
 			}
 		}).state('sale.inquiry', {
 			url : "/inquiry",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/inquiry.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/inquiry.html"
 		}).state('sale.inquiry.todo', {
 			url : "/todo",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/inquiry.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/inquiry.html"
 		}).state('sale.order', {
 			url : "/order",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/order.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/order.html"
 		}).state('sale.order.todo', {
 			url : "/todo",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/order.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/order.html"
 		}).state('sale.change', {
 			url : "/change",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/change.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/change.html"
 		}).state('sale.change.todo', {
 			url : "/todo",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/change.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/change.html"
 		}).state('sale.notice', {
 			url : "/notice",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/notice.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/notice.html"
 		}).state('sale.notice.todo', {
 			url : "/todo",
-			views : {
-				"sale-view" : {
-					templateUrl : "static/tpl/index/sale/notice.html"
-				}
-			}
+			templateUrl : "static/tpl/index/sale/notice.html"
 		}).state('user', {
 			url : "/user",
 			views : {

+ 1 - 1
src/main/webapp/resources/tpl/index/sale/right.html

@@ -1 +1 @@
-<div ui-view="sale-view" class="sale-view"></div>
+<div ui-view class="sale-view"></div>

+ 6 - 6
src/main/webapp/resources/tpl/index/sale/todo.html

@@ -2,16 +2,16 @@
 	<div class="state-wrap" ng-controller="TodoCtrl">
 		<ul class="list-unstyled list-inline">
 			<li class="first"><a href="#"><span>所有订单</span></a></li>
-			<li><a ui-sref="sale.todo.inquiry"><span>待报价</span><em
+			<li ng-class="{'active': active=='inquiry'}"><a ui-sref="sale.todo.inquiry"><span>待报价</span><em
 					class="tm-h" ng-bind="todo.inquiry"></em></a></li>
-			<li class="active"><a ui-sref="sale.todo.order"><span>待回复</span><em
+			<li ng-class="{'active': active=='order'}"><a ui-sref="sale.todo.order"><span>待回复</span><em
 					class="tm-h" ng-bind="todo.order"></em></a></li>
-			<li><a ui-sref="sale.todo.change"><span>变更中</span><em
+			<li ng-class="{'active': active=='change'}"><a ui-sref="sale.todo.change"><span>变更中</span><em
 					class="tm-h" ng-bind="todo.orderChange"></em></a></li>
-			<li><a ui-sref="sale.todo.notice"><span>待发货</span><em
+			<li ng-class="{'active': active=='notice'}"><a ui-sref="sale.todo.notice"><span>待发货</span><em
 					class="tm-h" ng-bind="todo.notice"></em></a></li>
-			<li><a href="#"><span>退货中</span><em class="tm-h">0</em></a></li>
+			<li ng-class="{'active': active=='return'}"><a href="#"><span>退货中</span><em class="tm-h">0</em></a></li>
 		</ul>
 	</div>
 </div>
-<div ui-view="todo-view"></div>
+<div ui-view></div>