Browse Source

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

administrator 11 years ago
parent
commit
270d84575c

+ 71 - 0
src/main/java/com/uas/platform/b2b/controller/MessageController.java

@@ -0,0 +1,71 @@
+package com.uas.platform.b2b.controller;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Sort.Direction;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.uas.platform.b2b.model.Message;
+import com.uas.platform.b2b.service.MessageService;
+import com.uas.platform.b2b.support.SystemSession;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+import com.uas.platform.core.model.Status;
+import com.uas.platform.core.web.bind.RequestState;
+
+/**
+ * 官方消息
+ * 
+ * @author yingp
+ * 
+ */
+@Controller
+@RequestMapping("/info/message")
+public class MessageController {
+
+	@Autowired
+	private MessageService messageService;
+
+	/**
+	 * 系统消息
+	 * 
+	 * @return
+	 */
+	@RequestMapping(method = RequestMethod.GET)
+	@ResponseBody
+	public Page<Message> getMessages(PageParams params) {
+		PageInfo info = new PageInfo(params);
+		info.filter("toUserUU", SystemSession.getUser().getUserUU());
+		return messageService.findAllByPageInfo(info);
+	}
+
+	/**
+	 * 系统消息(未阅读)
+	 * 
+	 * @return
+	 */
+	@RequestMapping(params = RequestState.TODO, method = RequestMethod.GET)
+	@ResponseBody
+	public Page<Message> getUnreadMessages() {
+		PageInfo info = new PageInfo(1, 5, 0);
+		info.filter("status", Status.NOT_READ.value());
+		info.filter("toUserUU", SystemSession.getUser().getUserUU());
+		info.sorting("time", Direction.DESC);
+		return messageService.findAllByPageInfo(info);
+	}
+
+	/**
+	 * 单个消息查找
+	 * 
+	 */
+	@RequestMapping(value = "/{messageId}", method = RequestMethod.GET)
+	@ResponseBody
+	public Message getMessage(@PathVariable("messageId") Long messageId) {
+		return messageService.findMessage(messageId);
+	}
+
+}

+ 1 - 1
src/main/java/com/uas/platform/b2b/controller/NoticeController.java

@@ -44,7 +44,7 @@ public class NoticeController {
 	 */
 	@RequestMapping(value = "/{noticeId}", method = RequestMethod.GET)
 	@ResponseBody
-	public NoticeBody getInquiryItemById(@PathVariable("noticeId") Long noticeId) {
+	public NoticeBody getNotice(@PathVariable("noticeId") Long noticeId) {
 		return noticeService.findNoticeBody(noticeId);
 	}
 

+ 12 - 0
src/main/java/com/uas/platform/b2b/dao/MessageDao.java

@@ -0,0 +1,12 @@
+package com.uas.platform.b2b.dao;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+import com.uas.platform.b2b.model.Message;
+
+@Repository
+public interface MessageDao extends JpaSpecificationExecutor<Message>, JpaRepository<Message, Long> {
+
+}

+ 98 - 0
src/main/java/com/uas/platform/b2b/model/Message.java

@@ -0,0 +1,98 @@
+package com.uas.platform.b2b.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * 平台官方推送给用户的消息
+ * 
+ * @author yingp
+ *
+ */
+@Entity
+@Table(name = "info$messages")
+public class Message implements Serializable {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 3264431344284760405L;
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "info$messages_gen")
+	@SequenceGenerator(name = "info$messages_gen", sequenceName = "info$messages_seq", allocationSize = 1)
+	private Long id;
+
+	/**
+	 * 消息发送时间
+	 */
+	@Column(name = "msg_time")
+	private Date time;
+
+	/**
+	 * 接收人uu
+	 */
+	@Column(name = "to_useruu")
+	private Long toUserUU;
+
+	/**
+	 * 消息状态
+	 */
+	@Column(name = "msg_status")
+	private Short status;
+
+	/**
+	 * 消息内容
+	 */
+	@Column(name = "msg_content")
+	private String content;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Date getTime() {
+		return time;
+	}
+
+	public void setTime(Date time) {
+		this.time = time;
+	}
+
+	public Long getToUserUU() {
+		return toUserUU;
+	}
+
+	public void setToUserUU(Long toUserUU) {
+		this.toUserUU = toUserUU;
+	}
+
+	public Short getStatus() {
+		return status;
+	}
+
+	public void setStatus(Short status) {
+		this.status = status;
+	}
+
+	public String getContent() {
+		return content;
+	}
+
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+}

+ 26 - 0
src/main/java/com/uas/platform/b2b/service/MessageService.java

@@ -0,0 +1,26 @@
+package com.uas.platform.b2b.service;
+
+import org.springframework.data.domain.Page;
+
+import com.uas.platform.b2b.model.Message;
+import com.uas.platform.core.model.PageInfo;
+
+public interface MessageService {
+
+	/**
+	 * 分页查找系统消息
+	 * 
+	 * @param pageInfo
+	 * @return
+	 */
+	public Page<Message> findAllByPageInfo(PageInfo pageInfo);
+
+	/**
+	 * 公告ID查找消息
+	 * 
+	 * @param messageId
+	 * @return
+	 */
+	public Message findMessage(Long messageId);
+
+}

+ 40 - 0
src/main/java/com/uas/platform/b2b/service/impl/MessageServiceImpl.java

@@ -0,0 +1,40 @@
+package com.uas.platform.b2b.service.impl;
+
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+
+import com.uas.platform.b2b.dao.MessageDao;
+import com.uas.platform.b2b.model.Message;
+import com.uas.platform.b2b.service.MessageService;
+import com.uas.platform.core.model.PageInfo;
+
+@Service
+public class MessageServiceImpl implements MessageService {
+
+	@Autowired
+	private MessageDao messageDao;
+
+	@Override
+	public Page<Message> findAllByPageInfo(final PageInfo pageInfo) {
+		return messageDao.findAll(new Specification<Message>() {
+
+			public Predicate toPredicate(Root<Message> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
+				query.where(pageInfo.getPredicates(root, query, builder));
+				return null;
+			}
+		}, pageInfo);
+	}
+
+	@Override
+	public Message findMessage(Long messageId) {
+		return messageDao.findOne(messageId);
+	}
+
+}

+ 9 - 46
src/main/webapp/resources/js/index/app.js

@@ -35,28 +35,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				"right-view" : {
 					templateUrl : "static/tpl/index/sale/right.html"
 				}
-			},
-			controller: function($rootScope) {
-				$rootScope.active = null;
 			}
 		}).state('sale.index', {
 			url : "",
-			templateUrl : "static/tpl/index/sale/index.html",
-			controller: function($rootScope) {
-				$rootScope.active = null;
-			}
+			templateUrl : "static/tpl/index/sale/index.html"
 		}).state('sale.home', {
 			url : "/",
-			templateUrl : "static/tpl/index/sale/index.html",
-			controller: function($rootScope) {
-				$rootScope.active = null;
-			}
+			templateUrl : "static/tpl/index/sale/index.html"
 		}).state('sale.todo', {
 			url : "/todo",
-			templateUrl : "static/tpl/index/sale/todo.html",
-			controller: function($rootScope) {
-				$rootScope.active = null;
-			}
+			templateUrl : "static/tpl/index/sale/todo.html"
 		}).state('sale.todo.inquiry', {
 			url : "/inquiry",
 			templateUrl : "static/tpl/index/sale/inquiry.html",
@@ -89,6 +77,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			url : "/order",
 			templateUrl : "static/tpl/index/sale/order.html",
 			controller: 'SaleOrderCtrl'
+		}).state('sale.order.*', {
+			url : "/order/:id",
+			templateUrl : "static/tpl/index/sale/order.html",
+			controller: 'SaleOrderCtrl'
 		}).state('sale.change', {
 			url : "/change",
 			templateUrl : "static/tpl/index/sale/change.html",
@@ -133,16 +125,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			}
 		}).state('account.index', {
 			url : "",
-			templateUrl : "static/tpl/index/account/index.html",
-			controller: function($rootScope) {
-				$rootScope.active = null;
-			}
+			templateUrl : "static/tpl/index/account/index.html"
 		}).state('account.home', {
 			url : "/",
-			templateUrl : "static/tpl/index/account/index.html",
-			controller: function($rootScope) {
-				$rootScope.active = null;
-			}
+			templateUrl : "static/tpl/index/account/index.html"
 		}).state('account.enterprise', {
 			url : "/enterprise",
 			templateUrl : "static/tpl/index/account/enterprise.html",
@@ -421,8 +407,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		});
 	});
 	app.controller('CustomerCtrl', function($scope, $rootScope, VendorService, BaseService, ngTableParams){
-		$rootScope.active = 'customer';
-		
 		$scope.customerParams = new ngTableParams({
 			page : 1, 
 			count : 10,
@@ -446,7 +430,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		});
 	});
 	app.controller('VendorCtrl', function($scope, $rootScope, VendorService){
-		$rootScope.active = 'customer';
 	});
 	var getState = function(active) {
 		var fn = 'get';
@@ -462,7 +445,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	};
 	app.controller('SaleOrderCtrl', function($scope, $rootScope, $filter, PurcOrderItem, ngTableParams, 
 		toaster, ReportService, BaseService, PurcOrderItemHis){
-		$rootScope.active = 'order';
 		$scope.active = 'todo';
 		$scope.dateZoneText = '一个月内';
 		$scope.condition = {dateZone: 1};
@@ -612,7 +594,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		};
 	});
 	app.controller('SaleChangeCtrl', function($scope, $rootScope, $filter, PurcChange, ngTableParams, toaster, BaseService, PurcChangeHis){
-		$rootScope.active = 'change';
 		$scope.active = 'todo';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -682,7 +663,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		};
 	});
 	app.controller('SaleInquiryCtrl', function($scope, $rootScope, $filter, PurcInquiry, ngTableParams, toaster, BaseService, PurcInquiryHis){
-		$rootScope.active = 'inquiry';
 		$scope.active = 'todo';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -811,7 +791,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		};
 	});
 	app.controller('SaleNoticeCtrl', function($scope, $rootScope, $filter, PurcNotice, ngTableParams, toaster, BaseService, PurcNoticeHis){
-		$rootScope.active = 'notice';
 		$scope.active = 'todo';
 		$scope.dateZoneText = '一个月内';
 		$scope.condition = {dateZone: 1};
@@ -882,7 +861,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 发货单
 	 */
 	app.controller('SaleSendCtrl', function($scope, $rootScope, $filter, PurcChange, ngTableParams, toaster, BaseService, PurcChangeHis){
-		$rootScope.active = 'change';
 		$scope.active = 'todo';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -956,7 +934,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户打样申请
 	 */
 	app.controller('SaleSampleCtrl', function($scope, $rootScope, $filter, PurcSample, ngTableParams, toaster, $modal, BaseService, Symbol){
-		$rootScope.active = 'sample';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1078,7 +1055,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户认定单
 	 */
 	app.controller('SaleApprovalCtrl', function($scope, $rootScope, $filter, PurcApproval, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'approval';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1140,7 +1116,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户采购预测
 	 */
 	app.controller('SaleForecastCtrl', function($scope, $rootScope, $filter, PurcForecast, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'forecast';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1202,7 +1177,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户采购验收
 	 */
 	app.controller('SaleAcceptCtrl', function($scope, $rootScope, $filter, PurcAccept, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'accept';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1264,7 +1238,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户采购验退
 	 */
 	app.controller('SaleReturnsCtrl', function($scope, $rootScope, $filter, PurcReturn, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'returns';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1325,7 +1298,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户不良品入库
 	 */
 	app.controller('SaleBadInCtrl', function($scope, $rootScope, $filter, PurcBadIn, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'badIn';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1386,7 +1358,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户不良品出库
 	 */
 	app.controller('SaleBadOutCtrl', function($scope, $rootScope, $filter, PurcBadOut, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'badOut';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1447,7 +1418,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户MRB
 	 */
 	app.controller('SaleMRBCtrl', function($scope, $rootScope, $filter, PurcMRB, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'MRB';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1508,7 +1478,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	 * 客户应付发票
 	 */
 	app.controller('SaleApBillCtrl', function($scope, $rootScope, $filter, PurcApBill, ngTableParams, toaster, BaseService, Symbol){
-		$rootScope.active = 'apBill';
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1567,14 +1536,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	});
 	
 	app.controller('EnterpriseCtrl', function($scope, $rootScope, AccountEnterprise){
-		$rootScope.active = 'enterprise';
 		AccountEnterprise.get({}, function(data){
 			$scope.enterprise = data;
 		});
 	});
 	
 	app.controller('UserCtrl', function($scope, $rootScope, $filter, AuthenticationService, AccountUser, BaseService, ngTableParams){
-		$rootScope.active = 'user';
 		AuthenticationService.getAuthentication().success(function(data) {
 			$scope.user = data;
 		});
@@ -1603,7 +1570,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	});
 	
 	app.controller('LogCtrl', function($scope, $rootScope, BaseService, ngTableParams, ErpLog, UsageLog){
-		$rootScope.active = 'log';
 		$scope.erpParams = new ngTableParams({
 			page : 1, 
 			count : 5,
@@ -1647,15 +1613,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	});
 	
 	app.controller('ResourceCtrl', function($scope, $rootScope){
-		$rootScope.active = 'resource';
 	});
 	
 	app.controller('AuthorityCtrl', function($scope, $rootScope){
-		$rootScope.active = 'authority';
 	});
 	
 	app.controller('RoleCtrl', function($scope, $rootScope){
-		$rootScope.active = 'role';
 	});
 	
 	/**

+ 6 - 6
src/main/webapp/resources/tpl/index/account/left.html

@@ -9,9 +9,9 @@
 		<i></i>企业空间
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='enterprise'}"><a ui-sref="account.enterprise">企业信息</a></li>
-		<li ng-class="{'active': active=='user'}"><a ui-sref="account.user">用户信息</a></li>
-		<li ng-class="{'active': active=='log'}"><a ui-sref="account.log">日志记录</a></li>
+		<li ui-sref-active="active"><a ui-sref="account.enterprise">企业信息</a></li>
+		<li ui-sref-active="active"><a ui-sref="account.user">用户信息</a></li>
+		<li ui-sref-active="active"><a ui-sref="account.log">日志记录</a></li>
 	</ul>
 </div>
 <div class="left-nav">
@@ -19,9 +19,9 @@
 		<i></i>权限系统
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='resource'}"><a ui-sref="account.resource">系统资源</a></li>
-		<li ng-class="{'active': active=='authority'}"><a ui-sref="account.authority">权限管理</a></li>
-		<li ng-class="{'active': active=='role'}"><a ui-sref="account.role">角色管理</a></li>
+		<li ui-sref-active="active"><a ui-sref="account.resource">系统资源</a></li>
+		<li ui-sref-active="active"><a ui-sref="account.authority">权限管理</a></li>
+		<li ui-sref-active="active"><a ui-sref="account.role">角色管理</a></li>
 	</ul>
 </div>
 <div class="left-nav">

+ 3 - 3
src/main/webapp/resources/tpl/index/qc/left.html

@@ -9,8 +9,8 @@
 		<i></i>不良品
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='badIn'}"><a ui-sref="qc.badIn">客户不良品入库</a></li>
-		<li ng-class="{'active': active=='badOut'}"><a ui-sref="qc.badOut">客户不良品出库</a></li>
+		<li ui-sref-active="active"><a ui-sref="qc.badIn">客户不良品入库</a></li>
+		<li ui-sref-active="active"><a ui-sref="qc.badOut">客户不良品出库</a></li>
 	</ul>
 </div>
 <div class="left-nav">
@@ -18,7 +18,7 @@
 		<i></i>品质管理
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='MRB'}"><a ui-sref="qc.MRB">客户MRB</a></li>
+		<li ui-sref-active="active"><a ui-sref="qc.MRB">客户MRB</a></li>
 	</ul>
 </div>
 <div class="left-nav">

+ 11 - 11
src/main/webapp/resources/tpl/index/sale/left.html

@@ -9,7 +9,7 @@
 		<i></i>客户管理
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='customer'}"><a ui-sref="sale.customer">客户资料管理</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.customer">客户资料管理</a></li>
 	</ul>
 </div>
 <!-- <div class="left-nav">
@@ -27,10 +27,10 @@
 		<i></i>销售管理
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='order'}"><a ui-sref="sale.order">客户采购订单</a></li>
-		<li ng-class="{'active': active=='change'}"><a ui-sref="sale.change">客户采购变更单</a></li>
-		<li ng-class="{'active': active=='forecast'}"><a ui-sref="sale.forecast">客户采购预测单</a></li>
-		<li ng-class="{'active': active=='notice'}"><a ui-sref="sale.notice">发货提醒</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.order">客户采购订单</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.change">客户采购变更单</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.forecast">客户采购预测单</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.notice">发货提醒</a></li>
 	</ul>
 </div>
 <div class="left-nav">
@@ -38,8 +38,8 @@
 		<i></i>样品管理
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='sample'}"><a ui-sref="sale.sample">客户打样申请</a></li>
-		<li ng-class="{'active': active=='approval'}"><a ui-sref="sale.approval">客户认定单</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.sample">客户打样申请</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.approval">客户认定单</a></li>
 	</ul>
 </div>
 <div class="left-nav">
@@ -47,7 +47,7 @@
 		<i></i>报价管理
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='inquiry'}"><a ui-sref="sale.inquiry">客户询价管理</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.inquiry">客户询价管理</a></li>
 		<!-- <li ng-class="{'active': active=='quotation'}"><a ui-sref="sale.quotation">主动报价</a></li> -->
 	</ul>
 </div>
@@ -56,9 +56,9 @@
 		<i></i>出货管理
 	</div>
 	<ul class="list-unstyled">
-		<li ng-class="{'active': active=='send'}"><a ui-sref="sale.send">发货单</a></li>
-		<li ng-class="{'active': active=='accept'}"><a ui-sref="sale.accept">客户验收单</a></li>
-		<li ng-class="{'active': active=='returns'}"><a ui-sref="sale.returns">客户退货单</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.send">发货单</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.accept">客户验收单</a></li>
+		<li ui-sref-active="active"><a ui-sref="sale.returns">客户退货单</a></li>
 	</ul>
 </div>
 <!-- <div class="left-nav">

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

@@ -228,7 +228,7 @@
 						ng-model="order.$selected" ng-click="checkOne(order)">
 					</span> <span class="text-num text-bold"
 						ng-bind="::order.date | date:'yyyy-MM-dd'"></span> <span>订单号:<a
-						class="text-num" ng-bind="::order.code" href="#"></a></span>
+						class="text-num" ng-bind="::order.code" ui-sref="sale.order({id: order.id})"></a></span>
 				</div>
 			</td>
 			<td colspan="3"><a href="#" ng-bind="::order.enterprise.enName"></a></td>

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

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