Browse Source

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

administrator 11 years ago
parent
commit
e869dca7e6

+ 8 - 0
src/main/webapp/resources/css/index.css

@@ -635,6 +635,10 @@ a {
 	background-color: #56a022;
 }
 
+.left-nav>ul>li.active {
+	background-color: #4b8b1e;
+}
+
 .use>ul>li:hover *,.left-nav>ul>li:hover *,.left-nav>ul>li.active * {
 	color: #fff;
 	text-decoration: none
@@ -1007,4 +1011,8 @@ a {
 .row-sm [class*="col-"]{
   padding-left: 5px;
   padding-right: 5px;
+}
+/*data view*/
+.container-data {
+	padding: 15px;
 }

+ 27 - 8
src/main/webapp/resources/js/common/services.js

@@ -19,6 +19,31 @@ define([ 'angular', 'toaster' ], function(angular) {
 				var path = window.document.location.pathname;
 				var pos = fullPath.indexOf(path);
 				return fullPath.substring(0, pos) + path.substring(0, path.substr(1).indexOf('/') + 1);
+			},
+			isNumber: function(n) {
+		        return !isNaN(parseFloat(n)) && isFinite(n);
+		    },
+		    /**
+			 * parse url params
+			 */
+		    parseParams: function(requestParams) {
+		        for (var key in requestParams) {
+		            if (key.indexOf('[') >= 0) {
+		                var params = key.split(/\[(.*)\]/), value = requestParams[key], lastKey = '';
+		                angular.forEach(params.reverse(), function(name) {
+		                    if (name != '') {
+		                        var v = value;
+		                        value = {};
+		                        value[lastKey = name] = isNumber(v) ? parseFloat(v) : v;
+		                    }
+		                });
+		                requestParams[lastKey] = angular.extend(requestParams[lastKey] || {}, value[lastKey]);
+		                delete requestParams[key];
+		            } else {
+		                requestParams[key] = isNumber(requestParams[key]) ? parseFloat(requestParams[key]) : requestParams[key];
+		            }
+		        }
+		        return requestParams;
 			}
 		};
 	}).factory('AuthenticationService', function($http, SessionService, BaseService, SerializerUtil) {
@@ -105,7 +130,8 @@ define([ 'angular', 'toaster' ], function(angular) {
 				return query.length ? query.substr(0, query.length - 1) : query;
 			}
 		};
-	}).factory('ReportService', function($http, toaster) {
+	}).factory('ReportService', function($http, BaseService, toaster) {
+		var rootPath = BaseService.getRootPath();
 		return {
 			/**
 			 * 打印方法
@@ -115,13 +141,6 @@ define([ 'angular', 'toaster' ], function(angular) {
 			 * title 单据标题
 			 */
 			print: function(enuu, pageName, condition, title) {
-				var getRootPath = function() {
-					var fullPath = window.document.location.href;
-					var path = window.document.location.pathname;
-					var pos = fullPath.indexOf(path);
-					return fullPath.substring(0, pos) + path.substring(0, path.substr(1).indexOf('/') + 1);
-				};
-				var rootPath = getRootPath();
 				$http.get(rootPath + '/report/getName', {params: {enuu: enuu, pagename: pageName}})
 					.success(function(data){
 						if(data) {

+ 27 - 64
src/main/webapp/resources/js/index/app.js

@@ -59,58 +59,40 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		}).state('sale.todo.inquiry', {
 			url : "/inquiry",
-			templateUrl : "static/tpl/index/sale/inquiry.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'inquiry';
-			}
+			templateUrl : "static/tpl/index/sale/table/inquiry.html",
+			controller: 'SaleInquiryCtrl'
 		}).state('sale.todo.order', {
 			url : "/order",
-			templateUrl : "static/tpl/index/sale/order.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'order';
-			}
+			templateUrl : "static/tpl/index/sale/table/order.html",
+			controller: 'SaleOrderCtrl'
 		}).state('sale.todo.change', {
 			url : "/change",
-			templateUrl : "static/tpl/index/sale/change.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'change';
-			}
+			templateUrl : "static/tpl/index/sale/table/change.html",
+			controller: 'SaleChangeCtrl'
 		}).state('sale.todo.notice', {
 			url : "/notice",
-			templateUrl : "static/tpl/index/sale/notice.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'notice';
-			}
+			templateUrl : "static/tpl/index/sale/table/notice.html",
+			controller: 'SaleNoticeCtrl'
 		}).state('sale.inquiry', {
 			url : "/inquiry",
 			templateUrl : "static/tpl/index/sale/inquiry.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'inquiry';
-			}
+			controller: 'SaleInquiryCtrl'
 		}).state('sale.quotation', {
 			url : "/quotation",
 			templateUrl : "static/tpl/index/sale/quotation.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'quotation';
-			}
+			controller: 'SaleInquiryCtrl'
 		}).state('sale.order', {
 			url : "/order",
 			templateUrl : "static/tpl/index/sale/order.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'order';
-			}
+			controller: 'SaleOrderCtrl'
 		}).state('sale.change', {
 			url : "/change",
 			templateUrl : "static/tpl/index/sale/change.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'change';
-			}
+			controller: 'SaleChangeCtrl'
 		}).state('sale.notice', {
 			url : "/notice",
 			templateUrl : "static/tpl/index/sale/notice.html",
-			controller: function($rootScope) {
-				$rootScope.active = 'notice';
-			}
+			controller: 'SaleNoticeCtrl'
 		}).state('user', {
 			url : "/user",
 			views : {
@@ -314,31 +296,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		};
 	});
-	var isNumber = function(n) {
-        return !isNaN(parseFloat(n)) && isFinite(n);
-    };
-	var parseParams = function(requestParams) {
-        // parse url params
-        for (var key in requestParams) {
-            if (key.indexOf('[') >= 0) {
-                var params = key.split(/\[(.*)\]/), value = requestParams[key], lastKey = '';
-                angular.forEach(params.reverse(), function(name) {
-                    if (name != '') {
-                        var v = value;
-                        value = {};
-                        value[lastKey = name] = isNumber(v) ? parseFloat(v) : v;
-                    }
-                });
-                requestParams[lastKey] = angular.extend(requestParams[lastKey] || {}, value[lastKey]);
-                delete requestParams[key];
-            } else {
-                requestParams[key] = isNumber(requestParams[key]) ? parseFloat(requestParams[key]) : requestParams[key];
-            }
-        }
-        return requestParams;
-	};
-	app.controller('SaleOrderCtrl', function($scope, $filter, PurcOrderItem, ngTableParams, 
-		toaster, ReportService){
+	app.controller('SaleOrderCtrl', function($scope, $rootScope, $filter, PurcOrderItem, ngTableParams, 
+		toaster, ReportService, BaseService){
+		$rootScope.active = 'order';
 		$scope.tableParams = new ngTableParams({
 			page : 1, // show first page
 			count : 5, // count per page
@@ -350,7 +310,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			counts: [5, 10, 25, 50],
 			getData : function($defer, params) {
 				$scope.loading = true;
-				PurcOrderItem.getTodo(parseParams(params.url()), function(page){
+				PurcOrderItem.getTodo(BaseService.parseParams(params.url()), function(page){
 					$scope.loading = false;
 					if(page) {
 						params.total(page.totalElements);
@@ -386,7 +346,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 					toaster.pop('warning', '提示', '请填写回复数量!');
 					return;
 				}
-				var reply = angular.copy(item.reply); 
+				var reply = angular.copy(item.reply);
 				if(reply.delivery) {
 					if(typeof reply.delivery == 'object')
 						reply.delivery = reply.delivery.getTime();
@@ -416,7 +376,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		};
 	});
-	app.controller('SaleChangeCtrl', function($scope, $filter, PurcChange, ngTableParams, toaster){
+	app.controller('SaleChangeCtrl', function($scope, $rootScope, $filter, PurcChange, ngTableParams, toaster, BaseService){
+		$rootScope.active = 'change';
 		$scope.tableParams = new ngTableParams({
 			page : 1, 
 			count : 5,
@@ -428,7 +389,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			counts: [5, 10, 25, 50],
 			getData : function($defer, params) {
 				$scope.loading = true;
-				PurcChange.getTodo(parseParams(params.url()), function(page){
+				PurcChange.getTodo(BaseService.parseParams(params.url()), function(page){
 					$scope.loading = false;
 					if(page) {
 						params.total(page.totalElements);
@@ -461,7 +422,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		};
 	});
-	app.controller('SaleInquiryCtrl', function($scope, $filter, PurcInquiry, ngTableParams, toaster){
+	app.controller('SaleInquiryCtrl', function($scope, $rootScope, $filter, PurcInquiry, ngTableParams, toaster, BaseService){
+		$rootScope.active = 'inquiry';
 		$scope.tableParams = new ngTableParams({
 			page : 1, 
 			count : 5,
@@ -475,7 +437,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			counts: [5, 10, 25, 50],
 			getData : function($defer, params) {
 				$scope.loading = true;
-				PurcInquiry.getTodo(parseParams(params.url()), function(page){
+				PurcInquiry.getTodo(BaseService.parseParams(params.url()), function(page){
 					$scope.loading = false;
 					if(page) {
 						params.total(page.totalElements);
@@ -563,7 +525,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		};
 	});
-	app.controller('SaleNoticeCtrl', function($scope, $filter, PurcNotice, ngTableParams, toaster){
+	app.controller('SaleNoticeCtrl', function($scope, $rootScope, $filter, PurcNotice, ngTableParams, toaster, BaseService){
+		$rootScope.active = 'notice';
 		$scope.tableParams = new ngTableParams({
 			page : 1, 
 			count : 5,
@@ -575,7 +538,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			counts: [5, 10, 25, 50],
 			getData : function($defer, params) {
 				$scope.loading = true;
-				PurcNotice.getTodo(parseParams(params.url()), function(page){
+				PurcNotice.getTodo(BaseService.parseParams(params.url()), function(page){
 					$scope.loading = false;
 					if(page) {
 						params.total(page.totalElements);

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

@@ -1,237 +1,8 @@
-<style>
-.order-table .header>th {
-	height: 38px;
-	text-align: center;
-	background: #f5f5f5;
-	border-top: 1px solid #e8e8e8;
-	border-bottom: 1px solid #e8e8e8;
-}
-
-.order-table .sep-row {
-	height: 10px;
-}
-
-.order-table .selector {
-	vertical-align: middle;
-	margin: 0 0 2px 0;
-}
-
-.toolbar label {
-	margin-right: 10px;
-	margin-bottom: 0;
-}
-
-.toolbar .select_all {
-	margin: 0 6px 0 10px;
-	line-height: 20px;
-}
-
-.toolbar .btn {
-	-moz-border-radius: 2px;
-	margin-right: 5px;
-	border: 1px solid #dcdcdc;
-	border-radius: 2px;
-	-webkit-border-radius: 2px;
-}
-
-.order-table .order-hd {
-	background: #f5f5f5;
-	height: 40px;
-	line-height: 40px;
-}
-
-.order-table .order-hd td.first {
-	padding-left: 20px;
-}
-
-.order-table .order-hd .order-main span {
-	margin-right: 8px;
-}
-
-.order-table .order-hd .order-code {
-	font-style: normal;
-	font-family: verdana;
-}
-
-.order-table .order-hd .order-sum {
-	padding: 0 5px;
-}
-
-.order-table>tbody {
-	border: 1px solid transparent;
-}
-
-.order-table>tbody:hover {
-	border-color: #ccc;
-}
-
-.order-table .operates {
-	display: none;
-}
-
-.order-table>tbody:hover .operates {
-	display: block;
-}
-
-.order-table .order-bd {
-	border-bottom: 1px solid #e6e6e6;
-}
-
-.order-table .order-bd>td {
-	padding: 10px 5px;
-	vertical-align: top;
-	position: relative;
-}
-
-.order-table .order-bd .product {
-	padding-left: 20px;
-}
-
-.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
-	{
-	height: 26px;
-	padding: 0 5px;
-	font-size: 12px;
-	line-height: 1.5;
-	border-radius: 3px;
-}
-
-.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
-	border-top-left-radius: 0;
-	border-bottom-left-radius: 0;
-}
-
-.input-trigger .dropdown-menu tr>td>.btn {
-	border-radius: 0;
-	border: none;
-}
-</style>
-<div ng-controller="SaleChangeCtrl" class="block">
-	<div class="loading in" ng-class="{'in': loading}">
-		<i></i>
+<div class="block container-data">
+	<div class="condition block">
+		<div class="btn-group">
+			<button type="button" class="btn btn-default">全部</button>
+			<button type="button" class="btn btn-default">待确认</button>
+		</div>
 	</div>
-	<table class="order-table block" ng-table="tableParams">
-		<thead>
-			<tr class="header">
-				<th>商品</th>
-				<th>单价</th>
-				<th>数量</th>
-				<th width="120">交货日期</th>
-				<th width="120">变更内容</th>
-				<th width="70">操作</th>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="6"></td>
-			</tr>
-			<tr class="toolbar toolbar-top">
-				<td colspan="6">
-					<div>
-						<label><input type="checkbox" class="selector select_all"
-							ng-model="selectAll">全选</label> <a href="javascript:void(0)"
-							class="btn btn-default btn-xs">批量回复</a>
-					</div> <!-- 分页 -->
-				</td>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="6"></td>
-			</tr>
-		</thead>
-		<tbody ng-repeat="change in $data">
-			<tr class="order-hd">
-				<td class="first">
-					<div class="order-main">
-						<span> <input type="checkbox" class="selector"
-							ng-model="change.$selected">
-						</span> <span class="text-num text-bold" title="{{change.date}}"
-							ng-bind="change.date | date:'yyyy-MM-dd'"></span> <span>流水号:<a
-							class="text-num" ng-bind="change.code" href="#"></a></span> <span>订单:<a
-							class="text-num text-bold" ng-bind="change.order.code" href="#"></a></span>
-					</div>
-				</td>
-				<td colspan="3"><a href="#"
-					ng-bind="change.order.enterprise.enName"></a></td>
-				<td colspan="1" class="order-sum">{{change.newCurrency}}: <span
-					ng-bind="getOrderTotal(change.orderChangeItems) | number : 2"
-					class="text-num text-bold"></span>
-				</td>
-				<td colspan="1" class="text-center">
-					<div class="operates">
-						<a href="#" class="text-muted" title="打印"><i
-							class="fa fa-print fa-lg fa-fw"></i></a> <a class="text-muted"
-							title="回复" ng-click="change.$editing=!change.$editing"><i
-							class="fa fa-share fa-lg fa-fw"></i></a>
-					</div>
-				</td>
-			</tr>
-			<tr ng-show="change.$editing" class="br-b">
-				<td colspan="3"></td>
-				<td>
-					<div style="margin: 0 auto" ng-init="change.agreed = 1">
-						<div class="form-group">
-							<label class="radio-inline"> <input type="radio"
-								ng-model="change.agreed" value="1"> 同意
-							</label> <label class="radio-inline"> <input type="radio"
-								ng-model="change.agreed" value="0"> 不同意
-							</label>
-						</div>
-					</div>
-				</td>
-				<td>
-					<div class="form-group">
-						<input type="text" ng-model="change.replyRemark"
-							class="form-control input-xs" placeholder="回复备注">
-					</div>
-				</td>
-				<td class="text-center"><br>
-					<div>
-						<a ng-click="change.$editing=!change.$editing">取消</a>
-					</div> <br>
-					<div>
-						<a ng-click="onReplyClick(change)" class="text-inverse">确认回复</a>
-					</div> <br></td>
-			</tr>
-			<tr class="order-bd" ng-repeat="item in change.orderChangeItems">
-				<td class="product">
-					<div class="text-num text-bold">
-						<a href="#" ng-bind="item.newProduct.code"></a>
-					</div>
-					<div>
-						<a href="#" ng-bind="item.newProduct.title"></a>
-					</div>
-					<div class="text-muted" title="{{item.newProduct.spec}}"
-						ng-bind="item.newProduct.spec"></div>
-				</td>
-				<td class="text-center">
-					<div class="text-num"
-						ng-class="{'text-inverse': item.newPrice != item.orderItem.price}"
-						title="{{item.newPrice}}" ng-bind="item.newPrice"></div>
-					<div ng-show="item.newPrice != item.orderItem.price">
-						<s class="text-num text-muted" ng-bind="item.orderItem.price"></s>
-					</div>
-				</td>
-				<td class="text-center">
-					<div class="text-num"
-						ng-class="{'text-inverse': item.newQty != item.orderItem.qty}"
-						title="{{item.newQty}}" ng-bind="item.newQty"></div>
-					<div ng-show="item.newQty != item.orderItem.qty">
-						<s class="text-num text-muted" title="{{item.orderItem.qty}}"
-							ng-bind="item.orderItem.qty"></s>
-					</div>
-					<div class="text-muted" ng-bind="item.newProduct.unit"></div>
-				</td>
-				<td class="text-center br-l">
-					<div class="text-num"
-						ng-class="{'text-inverse': item.newDelivery != item.orderItem.delivery}"
-						ng-bind="item.newDelivery | date:'yyyy-MM-dd'"></div>
-					<div ng-show="item.newDelivery != item.orderItem.delivery">
-						<s class="text-num text-muted"
-							ng-bind="item.orderItem.delivery | date:'yyyy-MM-dd'"></s>
-					</div>
-				</td>
-				<td class="text-center br-l" colspan="2">
-					<div ng-bind="item.description"></div>
-				</td>
-			</tr>
-		</tbody>
-	</table>
 </div>

+ 7 - 330
src/main/webapp/resources/tpl/index/sale/inquiry.html

@@ -1,332 +1,9 @@
-<style>
-.order-table .header>th {
-	height: 38px;
-	text-align: center;
-	background: #f5f5f5;
-	border-top: 1px solid #e8e8e8;
-	border-bottom: 1px solid #e8e8e8;
-}
-
-.order-table .sep-row {
-	height: 10px;
-}
-
-.order-table .selector {
-	vertical-align: middle;
-	margin: 0 0 2px 0;
-}
-
-.toolbar label {
-	margin-right: 10px;
-	margin-bottom: 0;
-}
-
-.toolbar .select_all {
-	margin: 0 6px 0 10px;
-	line-height: 20px;
-}
-
-.toolbar .btn {
-	-moz-border-radius: 2px;
-	margin-right: 5px;
-	border: 1px solid #dcdcdc;
-	border-radius: 2px;
-	-webkit-border-radius: 2px;
-}
-
-.order-table .order-hd {
-	background: #f5f5f5;
-	height: 40px;
-	line-height: 40px;
-}
-
-.order-table .order-hd td.first {
-	padding-left: 20px;
-}
-
-.order-table .order-hd .order-main span {
-	margin-right: 8px;
-}
-
-.order-table .order-hd .order-code {
-	font-style: normal;
-	font-family: verdana;
-}
-
-.order-table .order-hd .order-sum {
-	padding: 0 5px;
-}
-
-.order-table>tbody {
-	border: 1px solid transparent;
-}
-
-.order-table>tbody:hover {
-	border-color: #ccc;
-}
-
-.order-table .operates {
-	display: none;
-}
-
-.order-table>tbody:hover .operates {
-	display: block;
-}
-
-.order-table .order-bd {
-	border-bottom: 1px solid #e6e6e6;
-}
-
-.order-table .order-bd>td {
-	padding: 10px 5px;
-	vertical-align: top;
-	position: relative;
-}
-
-.order-table .order-bd .product {
-	padding-left: 20px;
-}
-
-.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
-	{
-	height: 26px;
-	padding: 0 5px;
-	font-size: 12px;
-	line-height: 1.5;
-	border-radius: 3px;
-}
-
-.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
-	border-top-left-radius: 0;
-	border-bottom-left-radius: 0;
-}
-
-@media ( min-width : 768px) {
-	.form-horizontal .form-group-xs .control-label {
-		padding-top: 5px;
-	}
-}
-
-.input-trigger .dropdown-menu tr>td>.btn {
-	border-radius: 0;
-	border: none;
-}
-</style>
-<div ng-controller="SaleInquiryCtrl" class="block">
-	<div class="loading in" ng-class="{'in': loading}">
-		<i></i>
+<div class="block container-data">
+	<div class="condition block">
+		<div class="btn-group">
+		  <button type="button" class="btn btn-default">全部</button>
+		  <button type="button" class="btn btn-default">待报价</button>
+		</div>
 	</div>
-	<table class="order-table block" ng-table="tableParams">
-		<thead>
-			<tr class="header">
-				<th>商品</th>
-				<th width="90"><span class="text-default">≥</span>分段数</th>
-				<th width="90">价格</th>
-				<th width="80">最小订购</th>
-				<th width="80">最小包装</th>
-				<th width="120">有效期</th>
-				<th width="75">操作</th>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="7"></td>
-			</tr>
-			<tr class="toolbar toolbar-top">
-				<td colspan="7">
-					<div>
-						<label><input type="checkbox" class="selector select_all"
-							ng-model="selectAll">全选</label> <a href="javascript:void(0)"
-							class="btn btn-default btn-xs">批量报价</a>
-					</div> <!-- 分页 -->
-				</td>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="7"></td>
-			</tr>
-		</thead>
-		<tbody ng-repeat="inquiryItem in $data">
-			<tr class="order-hd">
-				<td class="first">
-					<div class="order-main">
-						<span> <input type="checkbox" class="selector"
-							ng-model="inquiryItem.$selected">
-						</span> <span class="text-num text-bold"
-							title="{{inquiryItem.inquiry.date}}"
-							ng-bind="inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span> <span>流水号:<a
-							class="text-num" ng-bind="inquiryItem.inquiry.code" href="#"></a></span>
-					</div>
-				</td>
-				<td colspan="3"><a href="#"
-					ng-bind="inquiryItem.inquiry.enterprise.enName"></a></td>
-				<td class="text-right" colspan="2" class="order-sum"><span
-					class="text-inverse text-bold"
-					ng-bind="inquiryItem.inquiry.endDate | timespan"></span> <span
-					class="text-muted">后截止报价</span></td>
-				<td class="text-center">
-					<div class="operates">
-						<a ng-click="print(inquiryItem)" class="text-muted" title="打印"><i
-							class="fa fa-print fa-lg"></i></a>
-					</div>
-				</td>
-			</tr>
-			<tr class="order-bd">
-				<td class="product">
-					<div class="text-num text-bold">
-						<a href="#" ng-bind="inquiryItem.product.code"></a>
-					</div>
-					<div>
-						<a href="#" ng-bind="inquiryItem.product.title"></a>
-					</div>
-					<div class="text-muted" title="{{inquiryItem.product.spec}}"
-						ng-bind="inquiryItem.product.spec"></div>
-				</td>
-				<td class="text-center">
-					<div ng-show="!inquiryItem.$editing">
-						<div ng-repeat="reply in inquiryItem.replies">
-							<span ng-bind="reply.lapQty"></span>
-						</div>
-					</div>
-					<div style="margin: 0 auto;" ng-show="inquiryItem.$editing">
-						<div ng-repeat="reply in inquiryItem.replies">
-							<div class="form-group input-group input-group-xs">
-								<input type="text" class="form-control input-xs"
-									ng-model="reply.lapQty" min="{{reply.lapQty == 0 ? 0 : 1}}"
-									ng-readonly="inquiryItem.custLap == 1 || reply.lapQty == 0 ? true : false"
-									placeholder="数量" /> <span class="input-group-btn"
-									ng-show="!inquiryItem.custLap && (reply.lapQty == null || reply.lapQty > 0)">
-									<button class="btn btn-default" type="button"
-										ng-click="removeStep(inquiryItem, $index)">
-										<i class="fa fa-trash-o"></i>
-									</button>
-								</span>
-							</div>
-						</div>
-						<a ng-click="addStep(inquiryItem)" class="btn btn-default btn-xs" ng-show="!inquiryItem.custLap">添加分段</a>
-					</div>
-				</td>
-				<td class="text-center br-l">
-					<div ng-show="!inquiryItem.$editing">
-						<div ng-repeat="reply in inquiryItem.replies">
-							<span ng-bind="reply.price"></span> <span
-								ng-show="reply.price == null" class="text-muted">-</span>
-						</div>
-						<div class="dropdown">
-							<a href="javascript:void(0);"
-								class="dropdown-toggle text-default" ng-mouseover="getHistory(inquiryItem)">历史报价<i
-								class="fa fa-fw fa-angle-down"></i></a>
-							<div class="dropdown-menu pane" style="width: 270px;">
-									<div class="pane-body">
-										<ul class="list-unstyled list-menu">
-											<li ng-repeat="historyItem in inquiryItem.history">
-												<div ng-class="{'text-inverse': $index==0}">
-													<div class="row row-sm" ng-repeat="historyReply in historyItem.replies">
-														<div class="col-xs-5">≥{{historyReply.lapQty}}</div>
-														<div class="col-xs-5">价格{{historyReply.price}}</div>
-													</div>
-												</div>
-												<div class="text-muted">
-													{{historyItem.inquiry.date | date:'yyyy-MM-dd'}}{{historyItem.inquiry.enterprise.enName}}
-												</div>
-											</li>
-										</ul>
-										<div ng-show="!inquiryItem.history || inquiryItem.history.length == 0" class="text-center text-muted">
-											暂无历史报价
-										</div>
-									</div>
-							</div>
-						</div>
-					</div>
-					<div style="margin: 0 auto;" ng-show="inquiryItem.$editing">
-						<div ng-repeat="reply in inquiryItem.replies">
-							<div class="form-group">
-								<input type="text" class="form-control input-xs"
-									ng-model="reply.price" placeholder="价格" />
-							</div>
-						</div>
-					</div>
-				</td>
-				<td class="text-center br-l">
-					<div ng-show="!inquiryItem.$editing">
-						<span ng-bind="inquiryItem.minOrderQty"></span> <span
-							ng-show="inquiryItem.minOrderQty == null" class="text-muted">-</span>
-					</div>
-					<div ng-show="inquiryItem.$editing">
-						<input type="text" class="form-control input-xs"
-							ng-model="inquiryItem.minOrderQty" placeholder="最小订购">
-					</div>
-				</td>
-				<td class="text-center br-l">
-					<div ng-show="!inquiryItem.$editing">
-						<span ng-bind="inquiryItem.minPackQty"></span> <span
-							ng-show="inquiryItem.minPackQty == null" class="text-muted">-</span>
-					</div>
-					<div ng-show="inquiryItem.$editing">
-						<input type="text" class="form-control input-xs"
-							ng-model="inquiryItem.minPackQty" placeholder="最小包装">
-					</div>
-				</td>
-				<td class="text-center br-l">
-					<div ng-show="!inquiryItem.$editing"
-						ng-init="parseDate(inquiryItem)">
-						<div ng-show="inquiryItem.vendFromDate">
-							<span class="text-muted">从 </span><span
-								ng-bind="inquiryItem.vendFromDate | date:'yyyy-MM-dd'"></span> <span
-								class="text-muted">到 </span><span
-								ng-bind="inquiryItem.vendToDate | date:'yyyy-MM-dd'"></span>
-						</div>
-						<div ng-show="!inquiryItem.vendFromDate">
-							<span class="text-muted">-</span>
-						</div>
-					</div>
-					<div ng-show="inquiryItem.$editing">
-						<div class="form-group input-group input-group-xs input-trigger">
-							<input type="text" ng-model="inquiryItem.vendFromDate"
-								class="form-control" placeholder="开始日期"
-								datepicker-popup="yyyy-MM-dd" is-open="inquiryItem.$fromOpened"
-								min-date="getMinDate(inquiryItem)" ng-required="true" current-text="今天"
-								clear-text="清除" close-text="关闭"
-								datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								ng-focus="openDatePicker($event, inquiryItem, '$fromOpened')"> <span
-								class="input-group-btn">
-								<button type="button" class="btn btn-default"
-									ng-click="openDatePicker($event, inquiryItem, '$fromOpened')">
-									<i class="fa fa-calendar"></i>
-								</button>
-							</span>
-						</div>
-						<div class="form-group input-group input-group-xs input-trigger">
-							<input type="text" ng-model="inquiryItem.vendToDate"
-								class="form-control" placeholder="结束日期"
-								datepicker-popup="yyyy-MM-dd" is-open="inquiryItem.$toOpened"
-								min-date="inquiryItem.vendFromDate" ng-required="true" current-text="今天"
-								clear-text="清除" close-text="关闭"
-								datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								ng-focus="openDatePicker($event, inquiryItem, '$toOpened')"> <span
-								class="input-group-btn">
-								<button type="button" class="btn btn-default"
-									ng-click="openDatePicker($event, inquiryItem, '$toOpened')">
-									<i class="fa fa-calendar"></i>
-								</button>
-							</span>
-						</div>
-					</div>
-				</td>
-				<td class="text-center br-l">
-					<div ng-show="!inquiryItem.$editing">
-						<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">报 价</a>
-					</div>
-					<div ng-show="inquiryItem.$editing">
-						<div>
-							<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">取消</a>
-						</div>
-						<div>
-							<button ng-click="onReplyClick(inquiryItem)" ng-disabled="!isValid(inquiryItem)" class="btn btn-link btn-xs text-default">保存</button>
-						</div>
-						<div>
-							<button ng-click="onReplyClick(inquiryItem, true)" ng-disabled="!isValid(inquiryItem, true)" class="btn btn-link btn-xs text-inverse">保存并<br>确认报价</button>
-						</div>
-					</div>
-				</td>
-			</tr>
-		</tbody>
-	</table>
+	
 </div>

+ 8 - 275
src/main/webapp/resources/tpl/index/sale/notice.html

@@ -1,277 +1,10 @@
-<style>
-.order-table .header>th {
-	height: 38px;
-	text-align: center;
-	background: #f5f5f5;
-	border-top: 1px solid #e8e8e8;
-	border-bottom: 1px solid #e8e8e8;
-}
-
-.order-table .sep-row {
-	height: 10px;
-}
-
-.order-table .selector {
-	vertical-align: middle;
-	margin: 0 0 2px 0;
-}
-
-.toolbar label {
-	margin-right: 10px;
-	margin-bottom: 0;
-}
-
-.toolbar .select_all {
-	margin: 0 6px 0 10px;
-	line-height: 20px;
-}
-
-.toolbar .btn {
-	-moz-border-radius: 2px;
-	margin-right: 5px;
-	border: 1px solid #dcdcdc;
-	border-radius: 2px;
-	-webkit-border-radius: 2px;
-}
-
-.order-table .order-hd {
-	background: #f5f5f5;
-	height: 40px;
-	line-height: 40px;
-}
-
-.order-table .order-hd td.first {
-	padding-left: 20px;
-}
-
-.order-table .order-hd .order-main span {
-	margin-right: 8px;
-}
-
-.order-table .order-hd .order-code {
-	font-style: normal;
-	font-family: verdana;
-}
-
-.order-table .order-hd .order-sum {
-	padding: 0 5px;
-}
-
-.order-table .order-hd .dropdown-toggle {
-	line-height: 40px;
-	display: block;
-	padding: 0 10px;
-}
-
-.order-table>tbody {
-	border: 1px solid transparent;
-}
-
-.order-table>tbody:hover {
-	border-color: #ccc;
-}
-
-.order-table .operates {
-	display: none;
-}
-
-.order-table>tbody:hover .operates {
-	display: block;
-}
-
-.order-table .order-bd {
-	border-bottom: 1px solid #e6e6e6;
-}
-
-.order-table .order-bd>td {
-	padding: 10px 5px;
-	vertical-align: top;
-	position: relative;
-}
-
-.order-table .order-bd .product {
-	padding-left: 20px;
-}
-
-.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
-	{
-	height: 26px;
-	padding: 0 5px;
-	font-size: 12px;
-	line-height: 1.5;
-	border-radius: 3px;
-}
-
-.order-snapshot .title {
-	border-top: 1px dashed #ddd;
-}
-
-.order-snapshot .dl-horizontal dt {
-	width: 60px;
-	text-align: left;
-	font-weight: normal;
-	color: #999;
-	padding: 4px 0;
-}
-
-.order-snapshot .dl-horizontal dd {
-	margin-left: 80px;
-	padding: 4px 0;
-}
-/*arrow*/
-.order-send {
-	position: relative;
-}
-
-.order-send.arrow-border:before,.arrow-border:after {
-	content: '';
-	position: absolute;
-	top: 20px;
-	width: 0;
-	height: 0;
-	border: 7px solid transparent;
-}
-
-.order-send.arrow-border.arrow-bottom-right:before {
-	content: '';
-	position: absolute;
-	left: -13px;
-	border-bottom-color: #fff;
-	border-right-color: #fff;
-	margin-top: -10px;
-}
-</style>
-<div ng-controller="SaleNoticeCtrl" class="block">
-	<div class="loading in" ng-class="{'in': loading}">
-		<i></i>
+<div class="block container-data">
+	<div class="condition block">
+		<div class="btn-group">
+		  <button type="button" class="btn btn-default">全部</button>
+		  <button type="button" class="btn btn-default">待发货</button>
+		  <button type="button" class="btn btn-default">已结案</button>
+		</div>
 	</div>
-	<table class="order-table block" ng-table="tableParams">
-		<thead>
-			<tr class="header">
-				<th>商品</th>
-				<th width="120">备注</th>
-				<th width="240">数量</th>
-				<th width="90">价格</th>
-				<th width="90">交货日期</th>
-				<th width="60">操作</th>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="6"></td>
-			</tr>
-			<tr class="toolbar toolbar-top">
-				<td colspan="6">
-					<div>
-						<label><input type="checkbox" class="selector select_all"
-							ng-model="selectAll">全选</label> <a href="javascript:void(0)"
-							class="btn btn-default btn-xs">批量报价</a>
-					</div> <!-- 分页 -->
-				</td>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="6"></td>
-			</tr>
-		</thead>
-		<tbody ng-repeat="notice in $data">
-			<tr class="order-hd">
-				<td class="first">
-					<div class="order-main">
-						<span> <input type="checkbox" class="selector"
-							ng-model="notice.$selected">
-						</span> <span class="text-num text-bold" title="{{notice.date}}"
-							ng-bind="notice.date | date:'yyyy-MM-dd'"></span>
-					</div>
-				</td>
-				<td colspan="2"><a href="#"
-					ng-bind="notice.orderItem.order.enterprise.enName"></a></td>
-				<td class="text-right dropdown" colspan="2" class="order-sum">
-					<a class="dropdown-toggle" href="javascript:void(0);"> <span
-						class="text-num text-bold" ng-bind="notice.orderItem.order.code"></span>
-						第{{notice.orderItem.number}}行
-				</a>
-					<div class="dropdown-menu order-snapshot"
-						style="padding: 10px 15px">
-						<div class="text-center text-bold title">订单快照</div>
-						<dl class="dl-horizontal">
-							<dt>日期</dt>
-							<dd>{{notice.orderItem.order.date | date : 'yyyy-MM-dd'}}</dd>
-							<dt>采购员</dt>
-							<dd>{{notice.orderItem.order.user.userName}}</dd>
-							<dt>付款条件</dt>
-							<dd>{{notice.orderItem.order.payments}}</dd>
-							<dt>付款币种</dt>
-							<dd>{{notice.orderItem.order.currency}}</dd>
-							<dt>交货地址</dt>
-							<dd>{{notice.orderItem.order.shipAddress}}</dd>
-							<dt>备注</dt>
-							<dd>{{notice.orderItem.order.remark}}</dd>
-						</dl>
-					</div>
-				</td>
-				<td class="text-center">
-					<div class="operates">
-						<a ng-click="print(notice)" class="text-muted" title="打印"><i
-							class="fa fa-print fa-lg"></i></a>
-					</div>
-				</td>
-			</tr>
-			<tr class="order-bd">
-				<td class="product">
-					<div class="text-num text-bold">
-						<a href="#" ng-bind="notice.orderItem.product.code"></a>
-					</div>
-					<div>
-						<a href="#" ng-bind="notice.orderItem.product.title"></a>
-					</div>
-					<div class="text-muted" title="{{notice.orderItem.product.spec}}"
-						ng-bind="notice.orderItem.product.spec"></div>
-				</td>
-				<td class="text-center">
-					<div ng-show="!notice.$editing">{{notice.remark}}</div>
-					<div ng-show="notice.$editing">
-						<input type="text" class="form-control input-xs" ng-model="notice.send.code" placeholder="送货单号">
-					</div>
-				</td>
-				<td class="br-l">
-					<div ng-show="!notice.$editing">
-						<ul>
-							<li>本次需求:{{notice.qty}}<span class="text-muted pull-right">[订单数:{{notice.orderItem.qty}}]</span></li>
-							<li class="dropdown dropdown-submenu">剩余未发:<span
-								class="text-num text-inverse"
-								ng-bind="notice.qty-(notice.endQty || 0)"></span> <a
-								href="javascript:void(0);" class="dropdown-toggle pull-right"><span
-									ng-class="{'text-muted' : notice.endQty == null || notice.endQty == 0,'text-default': notice.endQty > 0}">[已发货:{{notice.endQty}}]</span></a>
-								<div
-									class="dropdown-menu order-send arrow-border arrow-bottom-right"
-									style="padding: 10px 15px">
-									<span class="text-muted">还未发货</span>
-								</div>
-							</li>
-						</ul>
-					</div>
-					<div style="margin: 0 auto" ng-show="notice.$editing"
-						ng-init="notice.send.qty=notice.qty-(notice.endQty || 0)">
-						<input type="text" class="form-control input-xs"
-							ng-model="notice.send.qty" placeholder="数量">
-					</div>
-				</td>
-				<td class="text-center br-l">{{notice.orderItem.price}}</td>
-				<td class="text-center br-l">{{notice.delivery | date :
-					'yyyy-MM-dd'}}</td>
-				<td class="text-center br-l">
-					<div ng-show="!notice.$editing">
-						<a ng-click="notice.$editing=!notice.$editing">发 货</a>
-					</div>
-					<div ng-show="notice.$editing">
-						<div>
-							<a ng-click="notice.$editing=!notice.$editing">取消</a>
-						</div>
-						<br>
-						<div>
-							<a ng-click="onReplyClick(notice)" class="text-inverse">确认发货</a>
-						</div>
-					</div>
-				</td>
-			</tr>
-		</tbody>
-	</table>
+
 </div>

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

@@ -1,266 +1,9 @@
-<style>
-.order-table .header>th {
-	height: 38px;
-	text-align: center;
-	background: #f5f5f5;
-	border-top: 1px solid #e8e8e8;
-	border-bottom: 1px solid #e8e8e8;
-}
-
-.order-table .sep-row {
-	height: 10px;
-}
-
-.order-table .selector {
-	vertical-align: middle;
-	margin: 0 0 2px 0;
-}
-
-.toolbar label {
-	margin-right: 10px;
-	margin-bottom: 0;
-}
-
-.toolbar .select_all {
-	margin: 0 6px 0 10px;
-	line-height: 20px;
-}
-
-.toolbar .btn {
-	-moz-border-radius: 2px;
-	margin-right: 5px;
-	border: 1px solid #dcdcdc;
-	border-radius: 2px;
-	-webkit-border-radius: 2px;
-}
-
-.order-table .order-hd {
-	background: #f5f5f5;
-	height: 40px;
-	line-height: 40px;
-}
-
-.order-table .order-hd td.first {
-	padding-left: 20px;
-}
-
-.order-table .order-hd .order-main span {
-	margin-right: 8px;
-}
-
-.order-table .order-hd .order-code {
-	font-style: normal;
-	font-family: verdana;
-}
-
-.order-table .order-hd .order-sum {
-	padding: 0 5px;
-}
-
-.order-table>tbody {
-	border: 1px solid transparent;
-}
-
-.order-table>tbody:hover {
-	border-color: #ccc;
-}
-
-.order-table .operates {
-	display: none;
-}
-
-.order-table .operates i {
-	padding: 0 2px;
-}
-
-.order-table>tbody:hover .operates {
-	display: block;
-}
-
-.order-table .order-bd {
-	border-bottom: 1px solid #e6e6e6;
-}
-
-.order-table .order-bd>td {
-	padding: 10px 5px;
-	vertical-align: top;
-	position: relative;
-}
-
-.order-table .order-bd .product {
-	padding-left: 20px;
-}
-
-.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
-	{
-	height: 26px;
-	padding: 0 5px;
-	font-size: 12px;
-	line-height: 1.5;
-	border-radius: 3px;
-}
-
-.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
-	border-top-left-radius: 0;
-	border-bottom-left-radius: 0;
-}
-
-.input-trigger .dropdown-menu tr>td>.btn {
-	border-radius: 0;
-	border: none;
-}
-</style>
-<div ng-controller="SaleOrderCtrl" class="block">
-	<div class="loading in" ng-class="{'in': loading}">
-		<i></i>
+<div class="block container-data">
+	<div class="condition block">
+		<div class="btn-group">
+			<button type="button" class="btn btn-default">全部</button>
+			<button type="button" class="btn btn-default">待回复</button>
+			<button type="button" class="btn btn-default">已结案</button>
+		</div>
 	</div>
-	<table class="order-table block" ng-table="tableParams">
-		<thead>
-			<tr class="header">
-				<th>商品</th>
-				<th>单价</th>
-				<th width="100">数量</th>
-				<th width="120">交货日期</th>
-				<th width="180">回复状态</th>
-				<th width="60">操作</th>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="6"></td>
-			</tr>
-			<tr class="toolbar toolbar-top">
-				<td colspan="6">
-					<div>
-						<label><input type="checkbox" class="selector select_all"
-							ng-model="selectAll">全选</label> <a href="javascript:void(0)"
-							class="btn btn-default btn-xs">批量回复</a>
-					</div> <!-- 分页 -->
-				</td>
-			</tr>
-			<tr class="sep-row">
-				<td colspan="6"></td>
-			</tr>
-		</thead>
-		<tbody ng-repeat="order in $data">
-			<tr class="order-hd"  ng-dbclick="order.$collapsed=!order.$collapsed">
-				<td class="first">
-					<div class="order-main">
-						<span> <input type="checkbox" class="selector"
-							ng-model="order.$selected">
-						</span> <span class="text-num text-bold" title="{{order.date}}"
-							ng-bind="order.date | date:'yyyy-MM-dd'"></span> <span>订单号:<a class="text-num"
-							ng-bind="order.code" href="#"></a></span>
-					</div>
-				</td>
-				<td colspan="3"><a href="#" ng-bind="order.enterprise.enName"></a></td>
-				<td colspan="1" class="order-sum">{{order.currency}}: <span
-					ng-bind="getOrderTotal(order.orderItems) | number : 2"
-					class="text-num text-bold"></span>
-				</td>
-				<td colspan="1" class="text-center">
-					<div class="operates">
-						<a ng-click="print(order)" class="text-muted" title="打印"><i
-							class="fa fa-print fa-lg"></i></a>
-						<a ng-click="order.$collapsed=!order.$collapsed" class="text-muted" title="收拢"><i
-							class="fa fa-toggle-down fa-lg"></i></a>
-					</div>
-				</td>
-			</tr>
-			<tr class="order-bd" ng-repeat="item in order.orderItems" ng-hide="order.$collapsed">
-				<td class="product">
-					<div class="text-num text-bold">
-						<a href="#" ng-bind="item.product.code"></a>
-					</div>
-					<div>
-						<a href="#" ng-bind="item.product.title"></a>
-					</div>
-					<div class="text-muted" title="{{item.product.spec}}"
-						ng-bind="item.product.spec"></div>
-				</td>
-				<td class="text-center text-num" title="{{item.price}}"
-					ng-bind="item.price"></td>
-				<td class="text-center">
-					<div class="text-num" title="{{item.qty}}" ng-bind="item.qty"></div>
-					<div class="text-muted" ng-bind="item.product.unit"></div>
-					<div style="margin: 0 auto" ng-show="item.$editing">
-						<input type="text" ng-model="item.reply.qty"
-							ng-init="item.reply.qty=item.qty-item.replyQty"
-							class="form-control input-xs" placeholder="回复数量">
-					</div>
-				</td>
-				<td class="text-center br-l">
-					<div class="text-num" ng-bind="item.delivery | date:'yyyy-MM-dd'"></div> <br>
-					<div style="margin: 0 auto"
-						class="input-group input-group-xs input-trigger"
-						ng-show="item.$editing">
-						<input type="text" ng-model="item.reply.delivery"
-							ng-init="item.reply.delivery=parseDate(item.delivery)"
-							class="form-control" placeholder="回复交期"
-							datepicker-popup="yyyy-MM-dd" is-open="item.$opened"
-							min-date="order.date" ng-required="true" current-text="今天"
-							clear-text="清除" close-text="关闭"
-							datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-							ng-focus="openDatePicker($event, item)"> <span
-							class="input-group-btn">
-							<button type="button" class="btn btn-default"
-								ng-click="openDatePicker($event, item)">
-								<i class="fa fa-calendar"></i>
-							</button>
-						</span>
-					</div>
-				</td>
-				<td class="br-l">
-					<div ng-show="!item.$editing">
-						<div ng-show="!item.replyQty" class="text-muted text-center">未回复</div>
-						<div ng-show="item.replyQty > 0">
-							<div class="progress progress-sm">
-								<div class="progress-bar progress-bar-success" ng-style="{'width': 100*item.replyQty/item.qty + '%'}">
-									<span class="sr-only"></span>
-								</div>
-							</div>
-							已回复 <span class="text-default">{{item.replyQty}}</span> / {{item.qty}}
-							<div class="dropdown">
-								<a href="javascript:void(0);"
-									class="dropdown-toggle text-default" ng-mouseover="getReply(item)">回复历史<i
-									class="fa fa-fw fa-angle-down"></i></a>
-								<div class="dropdown-menu pane" style="width: 270px;">
-									<div class="pane-body">
-										<ul class="list-unstyled list-menu">
-											<li ng-repeat="reply in item.replies">
-												<div class="row row-sm" ng-class="{'text-inverse': $index==0}">
-													<div class="col-xs-6">数量{{reply.qty}}</div>
-													<div class="col-xs-6">交期{{reply.delivery | date:'yyyy-MM-dd'}}</div>
-												</div>
-												<div class="text-muted">
-													{{reply.recorder}}{{reply.date | date:'yyyy-MM-dd HH:mm:ss'}}回复
-												</div>
-											</li>
-										</ul>
-									</div>
-								</div>
-							</div>
-						</div>
-					</div>
-					<div style="margin: 0 auto" ng-show="item.$editing">
-						<br><br>
-						<input type="text" ng-model="item.reply.remark"
-							class="form-control input-xs" placeholder="回复备注"/>
-					</div>
-				</td>
-				<td class="text-center br-l">
-					<div ng-show="!item.$editing">
-						<a ng-click="item.$editing=!item.$editing">回复</a>
-					</div>
-					<div ng-show="item.$editing">
-						<div>
-							<a ng-click="item.$editing=!item.$editing">取消</a>
-						</div>
-						<br>
-						<div>
-							<a ng-click="onReplyClick(item)" class="text-inverse">确认回复</a>
-						</div>
-					</div>
-				</td>
-			</tr>
-		</tbody>
-	</table>
 </div>

+ 235 - 0
src/main/webapp/resources/tpl/index/sale/table/change.html

@@ -0,0 +1,235 @@
+<style>
+.order-table .header>th {
+	height: 38px;
+	text-align: center;
+	background: #f5f5f5;
+	border-top: 1px solid #e8e8e8;
+	border-bottom: 1px solid #e8e8e8;
+}
+
+.order-table .sep-row {
+	height: 10px;
+}
+
+.order-table .selector {
+	vertical-align: middle;
+	margin: 0 0 2px 0;
+}
+
+.toolbar label {
+	margin-right: 10px;
+	margin-bottom: 0;
+}
+
+.toolbar .select_all {
+	margin: 0 6px 0 10px;
+	line-height: 20px;
+}
+
+.toolbar .btn {
+	-moz-border-radius: 2px;
+	margin-right: 5px;
+	border: 1px solid #dcdcdc;
+	border-radius: 2px;
+	-webkit-border-radius: 2px;
+}
+
+.order-table .order-hd {
+	background: #f5f5f5;
+	height: 40px;
+	line-height: 40px;
+}
+
+.order-table .order-hd td.first {
+	padding-left: 20px;
+}
+
+.order-table .order-hd .order-main span {
+	margin-right: 8px;
+}
+
+.order-table .order-hd .order-code {
+	font-style: normal;
+	font-family: verdana;
+}
+
+.order-table .order-hd .order-sum {
+	padding: 0 5px;
+}
+
+.order-table>tbody {
+	border: 1px solid transparent;
+}
+
+.order-table>tbody:hover {
+	border-color: #ccc;
+}
+
+.order-table .operates {
+	display: none;
+}
+
+.order-table>tbody:hover .operates {
+	display: block;
+}
+
+.order-table .order-bd {
+	border-bottom: 1px solid #e6e6e6;
+}
+
+.order-table .order-bd>td {
+	padding: 10px 5px;
+	vertical-align: top;
+	position: relative;
+}
+
+.order-table .order-bd .product {
+	padding-left: 20px;
+}
+
+.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+	height: 26px;
+	padding: 0 5px;
+	font-size: 12px;
+	line-height: 1.5;
+	border-radius: 3px;
+}
+
+.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+	border-top-left-radius: 0;
+	border-bottom-left-radius: 0;
+}
+
+.input-trigger .dropdown-menu tr>td>.btn {
+	border-radius: 0;
+	border: none;
+}
+</style>
+<div class="loading in" ng-class="{'in': loading}">
+	<i></i>
+</div>
+<table class="order-table block" ng-table="tableParams">
+	<thead>
+		<tr class="header">
+			<th>商品</th>
+			<th>单价</th>
+			<th>数量</th>
+			<th width="120">交货日期</th>
+			<th width="120">变更内容</th>
+			<th width="70">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+		<tr class="toolbar toolbar-top">
+			<td colspan="6">
+				<div>
+					<label><input type="checkbox" class="selector select_all"
+						ng-model="selectAll">全选</label> <a href="javascript:void(0)"
+						class="btn btn-default btn-xs">批量回复</a>
+				</div> <!-- 分页 -->
+			</td>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+	</thead>
+	<tbody ng-repeat="change in $data">
+		<tr class="order-hd">
+			<td class="first">
+				<div class="order-main">
+					<span> <input type="checkbox" class="selector"
+						ng-model="change.$selected">
+					</span> <span class="text-num text-bold" title="{{change.date}}"
+						ng-bind="change.date | date:'yyyy-MM-dd'"></span> <span>流水号:<a
+						class="text-num" ng-bind="change.code" href="#"></a></span> <span>订单:<a
+						class="text-num text-bold" ng-bind="change.order.code" href="#"></a></span>
+				</div>
+			</td>
+			<td colspan="3"><a href="#"
+				ng-bind="change.order.enterprise.enName"></a></td>
+			<td colspan="1" class="order-sum">{{change.newCurrency}}: <span
+				ng-bind="getOrderTotal(change.orderChangeItems) | number : 2"
+				class="text-num text-bold"></span>
+			</td>
+			<td colspan="1" class="text-center">
+				<div class="operates">
+					<a href="#" class="text-muted" title="打印"><i
+						class="fa fa-print fa-lg fa-fw"></i></a> <a class="text-muted"
+						title="回复" ng-click="change.$editing=!change.$editing"><i
+						class="fa fa-share fa-lg fa-fw"></i></a>
+				</div>
+			</td>
+		</tr>
+		<tr ng-show="change.$editing" class="br-b">
+			<td colspan="3"></td>
+			<td>
+				<div style="margin: 0 auto" ng-init="change.agreed = 1">
+					<div class="form-group">
+						<label class="radio-inline"> <input type="radio"
+							ng-model="change.agreed" value="1"> 同意
+						</label> <label class="radio-inline"> <input type="radio"
+							ng-model="change.agreed" value="0"> 不同意
+						</label>
+					</div>
+				</div>
+			</td>
+			<td>
+				<div class="form-group">
+					<input type="text" ng-model="change.replyRemark"
+						class="form-control input-xs" placeholder="回复备注">
+				</div>
+			</td>
+			<td class="text-center"><br>
+				<div>
+					<a ng-click="change.$editing=!change.$editing">取消</a>
+				</div> <br>
+				<div>
+					<a ng-click="onReplyClick(change)" class="text-inverse">确认回复</a>
+				</div> <br></td>
+		</tr>
+		<tr class="order-bd" ng-repeat="item in change.orderChangeItems">
+			<td class="product">
+				<div class="text-num text-bold">
+					<a href="#" ng-bind="item.newProduct.code"></a>
+				</div>
+				<div>
+					<a href="#" ng-bind="item.newProduct.title"></a>
+				</div>
+				<div class="text-muted" title="{{item.newProduct.spec}}"
+					ng-bind="item.newProduct.spec"></div>
+			</td>
+			<td class="text-center">
+				<div class="text-num"
+					ng-class="{'text-inverse': item.newPrice != item.orderItem.price}"
+					title="{{item.newPrice}}" ng-bind="item.newPrice"></div>
+				<div ng-show="item.newPrice != item.orderItem.price">
+					<s class="text-num text-muted" ng-bind="item.orderItem.price"></s>
+				</div>
+			</td>
+			<td class="text-center">
+				<div class="text-num"
+					ng-class="{'text-inverse': item.newQty != item.orderItem.qty}"
+					title="{{item.newQty}}" ng-bind="item.newQty"></div>
+				<div ng-show="item.newQty != item.orderItem.qty">
+					<s class="text-num text-muted" title="{{item.orderItem.qty}}"
+						ng-bind="item.orderItem.qty"></s>
+				</div>
+				<div class="text-muted" ng-bind="item.newProduct.unit"></div>
+			</td>
+			<td class="text-center br-l">
+				<div class="text-num"
+					ng-class="{'text-inverse': item.newDelivery != item.orderItem.delivery}"
+					ng-bind="item.newDelivery | date:'yyyy-MM-dd'"></div>
+				<div ng-show="item.newDelivery != item.orderItem.delivery">
+					<s class="text-num text-muted"
+						ng-bind="item.orderItem.delivery | date:'yyyy-MM-dd'"></s>
+				</div>
+			</td>
+			<td class="text-center br-l" colspan="2">
+				<div ng-bind="item.description"></div>
+			</td>
+		</tr>
+	</tbody>
+</table>

+ 338 - 0
src/main/webapp/resources/tpl/index/sale/table/inquiry.html

@@ -0,0 +1,338 @@
+<style>
+.order-table .header>th {
+	height: 38px;
+	text-align: center;
+	background: #f5f5f5;
+	border-top: 1px solid #e8e8e8;
+	border-bottom: 1px solid #e8e8e8;
+}
+
+.order-table .sep-row {
+	height: 10px;
+}
+
+.order-table .selector {
+	vertical-align: middle;
+	margin: 0 0 2px 0;
+}
+
+.toolbar label {
+	margin-right: 10px;
+	margin-bottom: 0;
+}
+
+.toolbar .select_all {
+	margin: 0 6px 0 10px;
+	line-height: 20px;
+}
+
+.toolbar .btn {
+	-moz-border-radius: 2px;
+	margin-right: 5px;
+	border: 1px solid #dcdcdc;
+	border-radius: 2px;
+	-webkit-border-radius: 2px;
+}
+
+.order-table .order-hd {
+	background: #f5f5f5;
+	height: 40px;
+	line-height: 40px;
+}
+
+.order-table .order-hd td.first {
+	padding-left: 20px;
+}
+
+.order-table .order-hd .order-main span {
+	margin-right: 8px;
+}
+
+.order-table .order-hd .order-code {
+	font-style: normal;
+	font-family: verdana;
+}
+
+.order-table .order-hd .order-sum {
+	padding: 0 5px;
+}
+
+.order-table>tbody {
+	border: 1px solid transparent;
+}
+
+.order-table>tbody:hover {
+	border-color: #ccc;
+}
+
+.order-table .operates {
+	display: none;
+}
+
+.order-table>tbody:hover .operates {
+	display: block;
+}
+
+.order-table .order-bd {
+	border-bottom: 1px solid #e6e6e6;
+}
+
+.order-table .order-bd>td {
+	padding: 10px 5px;
+	vertical-align: top;
+	position: relative;
+}
+
+.order-table .order-bd .product {
+	padding-left: 20px;
+}
+
+.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+	height: 26px;
+	padding: 0 5px;
+	font-size: 12px;
+	line-height: 1.5;
+	border-radius: 3px;
+}
+
+.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+	border-top-left-radius: 0;
+	border-bottom-left-radius: 0;
+}
+
+@media ( min-width : 768px) {
+	.form-horizontal .form-group-xs .control-label {
+		padding-top: 5px;
+	}
+}
+
+.input-trigger .dropdown-menu tr>td>.btn {
+	border-radius: 0;
+	border: none;
+}
+</style>
+<div class="loading in" ng-class="{'in': loading}">
+	<i></i>
+</div>
+<table class="order-table block" ng-table="tableParams">
+	<thead>
+		<tr class="header">
+			<th>商品</th>
+			<th width="90"><span class="text-default">≥</span>分段数</th>
+			<th width="90">价格</th>
+			<th width="80">最小订购</th>
+			<th width="80">最小包装</th>
+			<th width="120">有效期</th>
+			<th width="75">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="7"></td>
+		</tr>
+		<tr class="toolbar toolbar-top">
+			<td colspan="7">
+				<div>
+					<label><input type="checkbox" class="selector select_all"
+						ng-model="selectAll">全选</label> <a href="javascript:void(0)"
+						class="btn btn-default btn-xs">批量报价</a>
+				</div> <!-- 分页 -->
+			</td>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="7"></td>
+		</tr>
+	</thead>
+	<tbody ng-repeat="inquiryItem in $data">
+		<tr class="order-hd">
+			<td class="first">
+				<div class="order-main">
+					<span> <input type="checkbox" class="selector"
+						ng-model="inquiryItem.$selected">
+					</span> <span class="text-num text-bold"
+						title="{{inquiryItem.inquiry.date}}"
+						ng-bind="inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span> <span>流水号:<a
+						class="text-num" ng-bind="inquiryItem.inquiry.code" href="#"></a></span>
+				</div>
+			</td>
+			<td colspan="3"><a href="#"
+				ng-bind="inquiryItem.inquiry.enterprise.enName"></a></td>
+			<td class="text-right" colspan="2" class="order-sum"><span
+				class="text-inverse text-bold"
+				ng-bind="inquiryItem.inquiry.endDate | timespan"></span> <span
+				class="text-muted">后截止报价</span></td>
+			<td class="text-center">
+				<div class="operates">
+					<a ng-click="print(inquiryItem)" class="text-muted" title="打印"><i
+						class="fa fa-print fa-lg"></i></a>
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd">
+			<td class="product">
+				<div class="text-num text-bold">
+					<a href="#" ng-bind="inquiryItem.product.code"></a>
+				</div>
+				<div>
+					<a href="#" ng-bind="inquiryItem.product.title"></a>
+				</div>
+				<div class="text-muted" title="{{inquiryItem.product.spec}}"
+					ng-bind="inquiryItem.product.spec"></div>
+			</td>
+			<td class="text-center">
+				<div ng-show="!inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<span ng-bind="reply.lapQty"></span>
+					</div>
+				</div>
+				<div style="margin: 0 auto;" ng-show="inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<div class="form-group input-group input-group-xs">
+							<input type="text" class="form-control input-xs"
+								ng-model="reply.lapQty" min="{{reply.lapQty == 0 ? 0 : 1}}"
+								ng-readonly="inquiryItem.custLap == 1 || reply.lapQty == 0 ? true : false"
+								placeholder="数量" /> <span class="input-group-btn"
+								ng-show="!inquiryItem.custLap && (reply.lapQty == null || reply.lapQty > 0)">
+								<button class="btn btn-default" type="button"
+									ng-click="removeStep(inquiryItem, $index)">
+									<i class="fa fa-trash-o"></i>
+								</button>
+							</span>
+						</div>
+					</div>
+					<a ng-click="addStep(inquiryItem)" class="btn btn-default btn-xs"
+						ng-show="!inquiryItem.custLap">添加分段</a>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<span ng-bind="reply.price"></span> <span
+							ng-show="reply.price == null" class="text-muted">-</span>
+					</div>
+					<div class="dropdown">
+						<a href="javascript:void(0);" class="dropdown-toggle text-default"
+							ng-mouseover="getHistory(inquiryItem)">历史报价<i
+							class="fa fa-fw fa-angle-down"></i></a>
+						<div class="dropdown-menu pane" style="width: 270px;">
+							<div class="pane-body">
+								<ul class="list-unstyled list-menu">
+									<li ng-repeat="historyItem in inquiryItem.history">
+										<div ng-class="{'text-inverse': $index==0}">
+											<div class="row row-sm"
+												ng-repeat="historyReply in historyItem.replies">
+												<div class="col-xs-5">≥{{historyReply.lapQty}}</div>
+												<div class="col-xs-5">价格{{historyReply.price}}</div>
+											</div>
+										</div>
+										<div class="text-muted">{{historyItem.inquiry.date |
+											date:'yyyy-MM-dd'}}{{historyItem.inquiry.enterprise.enName}}
+										</div>
+									</li>
+								</ul>
+								<div
+									ng-show="!inquiryItem.history || inquiryItem.history.length == 0"
+									class="text-center text-muted">暂无历史报价</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div style="margin: 0 auto;" ng-show="inquiryItem.$editing">
+					<div ng-repeat="reply in inquiryItem.replies">
+						<div class="form-group">
+							<input type="text" class="form-control input-xs"
+								ng-model="reply.price" placeholder="价格" />
+						</div>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<span ng-bind="inquiryItem.minOrderQty"></span> <span
+						ng-show="inquiryItem.minOrderQty == null" class="text-muted">-</span>
+				</div>
+				<div ng-show="inquiryItem.$editing">
+					<input type="text" class="form-control input-xs"
+						ng-model="inquiryItem.minOrderQty" placeholder="最小订购">
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<span ng-bind="inquiryItem.minPackQty"></span> <span
+						ng-show="inquiryItem.minPackQty == null" class="text-muted">-</span>
+				</div>
+				<div ng-show="inquiryItem.$editing">
+					<input type="text" class="form-control input-xs"
+						ng-model="inquiryItem.minPackQty" placeholder="最小包装">
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing"
+					ng-init="parseDate(inquiryItem)">
+					<div ng-show="inquiryItem.vendFromDate">
+						<span class="text-muted">从 </span><span
+							ng-bind="inquiryItem.vendFromDate | date:'yyyy-MM-dd'"></span> <span
+							class="text-muted">到 </span><span
+							ng-bind="inquiryItem.vendToDate | date:'yyyy-MM-dd'"></span>
+					</div>
+					<div ng-show="!inquiryItem.vendFromDate">
+						<span class="text-muted">-</span>
+					</div>
+				</div>
+				<div ng-show="inquiryItem.$editing">
+					<div class="form-group input-group input-group-xs input-trigger">
+						<input type="text" ng-model="inquiryItem.vendFromDate"
+							class="form-control" placeholder="开始日期"
+							datepicker-popup="yyyy-MM-dd" is-open="inquiryItem.$fromOpened"
+							min-date="getMinDate(inquiryItem)" ng-required="true"
+							current-text="今天" clear-text="清除" close-text="关闭"
+							datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+							ng-focus="openDatePicker($event, inquiryItem, '$fromOpened')">
+						<span class="input-group-btn">
+							<button type="button" class="btn btn-default"
+								ng-click="openDatePicker($event, inquiryItem, '$fromOpened')">
+								<i class="fa fa-calendar"></i>
+							</button>
+						</span>
+					</div>
+					<div class="form-group input-group input-group-xs input-trigger">
+						<input type="text" ng-model="inquiryItem.vendToDate"
+							class="form-control" placeholder="结束日期"
+							datepicker-popup="yyyy-MM-dd" is-open="inquiryItem.$toOpened"
+							min-date="inquiryItem.vendFromDate" ng-required="true"
+							current-text="今天" clear-text="清除" close-text="关闭"
+							datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+							ng-focus="openDatePicker($event, inquiryItem, '$toOpened')">
+						<span class="input-group-btn">
+							<button type="button" class="btn btn-default"
+								ng-click="openDatePicker($event, inquiryItem, '$toOpened')">
+								<i class="fa fa-calendar"></i>
+							</button>
+						</span>
+					</div>
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!inquiryItem.$editing">
+					<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">报 价</a>
+				</div>
+				<div ng-show="inquiryItem.$editing">
+					<div>
+						<a ng-click="inquiryItem.$editing=!inquiryItem.$editing">取消</a>
+					</div>
+					<div>
+						<button ng-click="onReplyClick(inquiryItem)"
+							ng-disabled="!isValid(inquiryItem)"
+							class="btn btn-link btn-xs text-default">保存</button>
+					</div>
+					<div>
+						<button ng-click="onReplyClick(inquiryItem, true)"
+							ng-disabled="!isValid(inquiryItem, true)"
+							class="btn btn-link btn-xs text-inverse">
+							保存并<br>确认报价
+						</button>
+					</div>
+				</div>
+			</td>
+		</tr>
+	</tbody>
+</table>

+ 274 - 0
src/main/webapp/resources/tpl/index/sale/table/notice.html

@@ -0,0 +1,274 @@
+<style>
+.order-table .header>th {
+	height: 38px;
+	text-align: center;
+	background: #f5f5f5;
+	border-top: 1px solid #e8e8e8;
+	border-bottom: 1px solid #e8e8e8;
+}
+
+.order-table .sep-row {
+	height: 10px;
+}
+
+.order-table .selector {
+	vertical-align: middle;
+	margin: 0 0 2px 0;
+}
+
+.toolbar label {
+	margin-right: 10px;
+	margin-bottom: 0;
+}
+
+.toolbar .select_all {
+	margin: 0 6px 0 10px;
+	line-height: 20px;
+}
+
+.toolbar .btn {
+	-moz-border-radius: 2px;
+	margin-right: 5px;
+	border: 1px solid #dcdcdc;
+	border-radius: 2px;
+	-webkit-border-radius: 2px;
+}
+
+.order-table .order-hd {
+	background: #f5f5f5;
+	height: 40px;
+	line-height: 40px;
+}
+
+.order-table .order-hd td.first {
+	padding-left: 20px;
+}
+
+.order-table .order-hd .order-main span {
+	margin-right: 8px;
+}
+
+.order-table .order-hd .order-code {
+	font-style: normal;
+	font-family: verdana;
+}
+
+.order-table .order-hd .order-sum {
+	padding: 0 5px;
+}
+
+.order-table .order-hd .dropdown-toggle {
+	line-height: 40px;
+	display: block;
+	padding: 0 10px;
+}
+
+.order-table>tbody {
+	border: 1px solid transparent;
+}
+
+.order-table>tbody:hover {
+	border-color: #ccc;
+}
+
+.order-table .operates {
+	display: none;
+}
+
+.order-table>tbody:hover .operates {
+	display: block;
+}
+
+.order-table .order-bd {
+	border-bottom: 1px solid #e6e6e6;
+}
+
+.order-table .order-bd>td {
+	padding: 10px 5px;
+	vertical-align: top;
+	position: relative;
+}
+
+.order-table .order-bd .product {
+	padding-left: 20px;
+}
+
+.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+	height: 26px;
+	padding: 0 5px;
+	font-size: 12px;
+	line-height: 1.5;
+	border-radius: 3px;
+}
+
+.order-snapshot .title {
+	border-top: 1px dashed #ddd;
+}
+
+.order-snapshot .dl-horizontal dt {
+	width: 60px;
+	text-align: left;
+	font-weight: normal;
+	color: #999;
+	padding: 4px 0;
+}
+
+.order-snapshot .dl-horizontal dd {
+	margin-left: 80px;
+	padding: 4px 0;
+}
+/*arrow*/
+.order-send {
+	position: relative;
+}
+
+.order-send.arrow-border:before,.arrow-border:after {
+	content: '';
+	position: absolute;
+	top: 20px;
+	width: 0;
+	height: 0;
+	border: 7px solid transparent;
+}
+
+.order-send.arrow-border.arrow-bottom-right:before {
+	content: '';
+	position: absolute;
+	left: -13px;
+	border-bottom-color: #fff;
+	border-right-color: #fff;
+	margin-top: -10px;
+}
+</style>
+<div class="loading in" ng-class="{'in': loading}">
+	<i></i>
+</div>
+<table class="order-table block" ng-table="tableParams">
+	<thead>
+		<tr class="header">
+			<th>商品</th>
+			<th width="120">备注</th>
+			<th width="240">数量</th>
+			<th width="90">价格</th>
+			<th width="90">交货日期</th>
+			<th width="60">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+		<tr class="toolbar toolbar-top">
+			<td colspan="6">
+				<div>
+					<label><input type="checkbox" class="selector select_all"
+						ng-model="selectAll">全选</label> <a href="javascript:void(0)"
+						class="btn btn-default btn-xs">批量报价</a>
+				</div> <!-- 分页 -->
+			</td>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+	</thead>
+	<tbody ng-repeat="notice in $data">
+		<tr class="order-hd">
+			<td class="first">
+				<div class="order-main">
+					<span> <input type="checkbox" class="selector"
+						ng-model="notice.$selected">
+					</span> <span class="text-num text-bold" title="{{notice.date}}"
+						ng-bind="notice.date | date:'yyyy-MM-dd'"></span>
+				</div>
+			</td>
+			<td colspan="2"><a href="#"
+				ng-bind="notice.orderItem.order.enterprise.enName"></a></td>
+			<td class="text-right dropdown" colspan="2" class="order-sum"><a
+				class="dropdown-toggle" href="javascript:void(0);"> <span
+					class="text-num text-bold" ng-bind="notice.orderItem.order.code"></span>
+					第{{notice.orderItem.number}}行
+			</a>
+				<div class="dropdown-menu order-snapshot" style="padding: 10px 15px">
+					<div class="text-center text-bold title">订单快照</div>
+					<dl class="dl-horizontal">
+						<dt>日期</dt>
+						<dd>{{notice.orderItem.order.date | date : 'yyyy-MM-dd'}}</dd>
+						<dt>采购员</dt>
+						<dd>{{notice.orderItem.order.user.userName}}</dd>
+						<dt>付款条件</dt>
+						<dd>{{notice.orderItem.order.payments}}</dd>
+						<dt>付款币种</dt>
+						<dd>{{notice.orderItem.order.currency}}</dd>
+						<dt>交货地址</dt>
+						<dd>{{notice.orderItem.order.shipAddress}}</dd>
+						<dt>备注</dt>
+						<dd>{{notice.orderItem.order.remark}}</dd>
+					</dl>
+				</div></td>
+			<td class="text-center">
+				<div class="operates">
+					<a ng-click="print(notice)" class="text-muted" title="打印"><i
+						class="fa fa-print fa-lg"></i></a>
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd">
+			<td class="product">
+				<div class="text-num text-bold">
+					<a href="#" ng-bind="notice.orderItem.product.code"></a>
+				</div>
+				<div>
+					<a href="#" ng-bind="notice.orderItem.product.title"></a>
+				</div>
+				<div class="text-muted" title="{{notice.orderItem.product.spec}}"
+					ng-bind="notice.orderItem.product.spec"></div>
+			</td>
+			<td class="text-center">
+				<div ng-show="!notice.$editing">{{notice.remark}}</div>
+				<div ng-show="notice.$editing">
+					<input type="text" class="form-control input-xs"
+						ng-model="notice.send.code" placeholder="送货单号">
+				</div>
+			</td>
+			<td class="br-l">
+				<div ng-show="!notice.$editing">
+					<ul>
+						<li>本次需求:{{notice.qty}}<span class="text-muted pull-right">[订单数:{{notice.orderItem.qty}}]</span></li>
+						<li class="dropdown dropdown-submenu">剩余未发:<span
+							class="text-num text-inverse"
+							ng-bind="notice.qty-(notice.endQty || 0)"></span> <a
+							href="javascript:void(0);" class="dropdown-toggle pull-right"><span
+								ng-class="{'text-muted' : notice.endQty == null || notice.endQty == 0,'text-default': notice.endQty > 0}">[已发货:{{notice.endQty}}]</span></a>
+							<div
+								class="dropdown-menu order-send arrow-border arrow-bottom-right"
+								style="padding: 10px 15px">
+								<span class="text-muted">还未发货</span>
+							</div>
+						</li>
+					</ul>
+				</div>
+				<div style="margin: 0 auto" ng-show="notice.$editing"
+					ng-init="notice.send.qty=notice.qty-(notice.endQty || 0)">
+					<input type="text" class="form-control input-xs"
+						ng-model="notice.send.qty" placeholder="数量">
+				</div>
+			</td>
+			<td class="text-center br-l">{{notice.orderItem.price}}</td>
+			<td class="text-center br-l">{{notice.delivery | date :
+				'yyyy-MM-dd'}}</td>
+			<td class="text-center br-l">
+				<div ng-show="!notice.$editing">
+					<a ng-click="notice.$editing=!notice.$editing">发 货</a>
+				</div>
+				<div ng-show="notice.$editing">
+					<div>
+						<a ng-click="notice.$editing=!notice.$editing">取消</a>
+					</div>
+					<br>
+					<div>
+						<a ng-click="onReplyClick(notice)" class="text-inverse">确认发货</a>
+					</div>
+				</div>
+			</td>
+		</tr>
+	</tbody>
+</table>

+ 270 - 0
src/main/webapp/resources/tpl/index/sale/table/order.html

@@ -0,0 +1,270 @@
+<style>
+.order-table .header>th {
+	height: 38px;
+	text-align: center;
+	background: #f5f5f5;
+	border-top: 1px solid #e8e8e8;
+	border-bottom: 1px solid #e8e8e8;
+}
+
+.order-table .sep-row {
+	height: 10px;
+}
+
+.order-table .selector {
+	vertical-align: middle;
+	margin: 0 0 2px 0;
+}
+
+.toolbar label {
+	margin-right: 10px;
+	margin-bottom: 0;
+}
+
+.toolbar .select_all {
+	margin: 0 6px 0 10px;
+	line-height: 20px;
+}
+
+.toolbar .btn {
+	-moz-border-radius: 2px;
+	margin-right: 5px;
+	border: 1px solid #dcdcdc;
+	border-radius: 2px;
+	-webkit-border-radius: 2px;
+}
+
+.order-table .order-hd {
+	background: #f5f5f5;
+	height: 40px;
+	line-height: 40px;
+}
+
+.order-table .order-hd td.first {
+	padding-left: 20px;
+}
+
+.order-table .order-hd .order-main span {
+	margin-right: 8px;
+}
+
+.order-table .order-hd .order-code {
+	font-style: normal;
+	font-family: verdana;
+}
+
+.order-table .order-hd .order-sum {
+	padding: 0 5px;
+}
+
+.order-table>tbody {
+	border: 1px solid transparent;
+}
+
+.order-table>tbody:hover {
+	border-color: #ccc;
+}
+
+.order-table .operates {
+	display: none;
+}
+
+.order-table .operates i {
+	padding: 0 2px;
+}
+
+.order-table>tbody:hover .operates {
+	display: block;
+}
+
+.order-table .order-bd {
+	border-bottom: 1px solid #e6e6e6;
+}
+
+.order-table .order-bd>td {
+	padding: 10px 5px;
+	vertical-align: top;
+	position: relative;
+}
+
+.order-table .order-bd .product {
+	padding-left: 20px;
+}
+
+.input-xs,.input-group-xs>.form-control,.input-group-xs>.input-group-addon,.input-group-xs>.input-group-btn>.btn
+	{
+	height: 26px;
+	padding: 0 5px;
+	font-size: 12px;
+	line-height: 1.5;
+	border-radius: 3px;
+}
+
+.input-group-xs .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn {
+	border-top-left-radius: 0;
+	border-bottom-left-radius: 0;
+}
+
+.input-trigger .dropdown-menu tr>td>.btn {
+	border-radius: 0;
+	border: none;
+}
+</style>
+<div class="loading in" ng-class="{'in': loading}">
+	<i></i>
+</div>
+<table class="order-table block" ng-table="tableParams">
+	<thead>
+		<tr class="header">
+			<th>商品</th>
+			<th>单价</th>
+			<th width="100">数量</th>
+			<th width="120">交货日期</th>
+			<th width="180">回复状态</th>
+			<th width="60">操作</th>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+		<tr class="toolbar toolbar-top">
+			<td colspan="6">
+				<div>
+					<label><input type="checkbox" class="selector select_all"
+						ng-model="selectAll">全选</label> <a href="javascript:void(0)"
+						class="btn btn-default btn-xs">批量回复</a>
+				</div> <!-- 分页 -->
+			</td>
+		</tr>
+		<tr class="sep-row">
+			<td colspan="6"></td>
+		</tr>
+	</thead>
+	<tbody ng-repeat="order in $data">
+		<tr class="order-hd" ng-dbclick="order.$collapsed=!order.$collapsed">
+			<td class="first">
+				<div class="order-main">
+					<span> <input type="checkbox" class="selector"
+						ng-model="order.$selected">
+					</span> <span class="text-num text-bold" title="{{order.date}}"
+						ng-bind="order.date | date:'yyyy-MM-dd'"></span> <span>订单号:<a
+						class="text-num" ng-bind="order.code" href="#"></a></span>
+				</div>
+			</td>
+			<td colspan="3"><a href="#" ng-bind="order.enterprise.enName"></a></td>
+			<td colspan="1" class="order-sum">{{order.currency}}: <span
+				ng-bind="getOrderTotal(order.orderItems) | number : 2"
+				class="text-num text-bold"></span>
+			</td>
+			<td colspan="1" class="text-center">
+				<div class="operates">
+					<a ng-click="print(order)" class="text-muted" title="打印"><i
+						class="fa fa-print fa-lg"></i></a> <a
+						ng-click="order.$collapsed=!order.$collapsed" class="text-muted"
+						title="收拢"><i class="fa fa-toggle-down fa-lg"></i></a>
+				</div>
+			</td>
+		</tr>
+		<tr class="order-bd" ng-repeat="item in order.orderItems"
+			ng-hide="order.$collapsed">
+			<td class="product">
+				<div class="text-num text-bold">
+					<a href="#" ng-bind="item.product.code"></a>
+				</div>
+				<div>
+					<a href="#" ng-bind="item.product.title"></a>
+				</div>
+				<div class="text-muted" title="{{item.product.spec}}"
+					ng-bind="item.product.spec"></div>
+			</td>
+			<td class="text-center text-num" title="{{item.price}}"
+				ng-bind="item.price"></td>
+			<td class="text-center">
+				<div class="text-num" title="{{item.qty}}" ng-bind="item.qty"></div>
+				<div class="text-muted" ng-bind="item.product.unit"></div>
+				<div style="margin: 0 auto" ng-show="item.$editing">
+					<input type="text" ng-model="item.reply.qty"
+						ng-init="item.reply.qty=item.qty-item.replyQty"
+						class="form-control input-xs" placeholder="回复数量">
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div class="text-num" ng-bind="item.delivery | date:'yyyy-MM-dd'"></div>
+				<br>
+				<div style="margin: 0 auto"
+					class="input-group input-group-xs input-trigger"
+					ng-show="item.$editing">
+					<input type="text" ng-model="item.reply.delivery"
+						ng-init="item.reply.delivery=parseDate(item.delivery)"
+						class="form-control" placeholder="回复交期"
+						datepicker-popup="yyyy-MM-dd" is-open="item.$opened"
+						min-date="order.date" ng-required="true" current-text="今天"
+						clear-text="清除" close-text="关闭"
+						datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+						ng-focus="openDatePicker($event, item)"> <span
+						class="input-group-btn">
+						<button type="button" class="btn btn-default"
+							ng-click="openDatePicker($event, item)">
+							<i class="fa fa-calendar"></i>
+						</button>
+					</span>
+				</div>
+			</td>
+			<td class="br-l">
+				<div ng-show="!item.$editing">
+					<div ng-show="!item.replyQty" class="text-muted text-center">未回复</div>
+					<div ng-show="item.replyQty > 0">
+						<div class="progress progress-sm">
+							<div class="progress-bar progress-bar-success"
+								ng-style="{'width': 100*item.replyQty/item.qty + '%'}">
+								<span class="sr-only"></span>
+							</div>
+						</div>
+						已回复 <span class="text-default">{{item.replyQty}}</span> /
+						{{item.qty}}
+						<div class="dropdown">
+							<a href="javascript:void(0);"
+								class="dropdown-toggle text-default"
+								ng-mouseover="getReply(item)">回复历史<i
+								class="fa fa-fw fa-angle-down"></i></a>
+							<div class="dropdown-menu pane" style="width: 270px;">
+								<div class="pane-body">
+									<ul class="list-unstyled list-menu">
+										<li ng-repeat="reply in item.replies">
+											<div class="row row-sm"
+												ng-class="{'text-inverse': $index==0}">
+												<div class="col-xs-6">数量{{reply.qty}}</div>
+												<div class="col-xs-6">交期{{reply.delivery |
+													date:'yyyy-MM-dd'}}</div>
+											</div>
+											<div class="text-muted">{{reply.recorder}}{{reply.date
+												| date:'yyyy-MM-dd HH:mm:ss'}}回复</div>
+										</li>
+									</ul>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div style="margin: 0 auto" ng-show="item.$editing">
+					<br>
+					<br> <input type="text" ng-model="item.reply.remark"
+						class="form-control input-xs" placeholder="回复备注" />
+				</div>
+			</td>
+			<td class="text-center br-l">
+				<div ng-show="!item.$editing">
+					<a ng-click="item.$editing=!item.$editing">回复</a>
+				</div>
+				<div ng-show="item.$editing">
+					<div>
+						<a ng-click="item.$editing=!item.$editing">取消</a>
+					</div>
+					<br>
+					<div>
+						<a ng-click="onReplyClick(item)" class="text-inverse">确认回复</a>
+					</div>
+				</div>
+			</td>
+		</tr>
+	</tbody>
+</table>

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

@@ -2,16 +2,23 @@
 	<div class="state-wrap" ng-controller="TodoCtrl">
 		<ul class="list-unstyled list-inline">
 			<li class="first"><a href="#"><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 class="tm-h">0</em></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
+					class="tm-h">0</em></a></li>
 		</ul>
 	</div>
 </div>
-<div ui-view></div>
+<div class="block">
+	<div ui-view></div>
+</div>