Browse Source

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

administrator 11 years ago
parent
commit
c546e4f579

+ 1 - 1
src/main/java/com/uas/platform/b2b/dao/PurchaseOrderReplyDao.java

@@ -19,7 +19,7 @@ public interface PurchaseOrderReplyDao extends JpaSpecificationExecutor<Purchase
 	 * @param orderItemId
 	 * @return
 	 */
-	@Query("from PurchaseOrderReply r where r.orderItem.id = :orderItemId")
+	@Query("from PurchaseOrderReply r where r.orderItem.id = :orderItemId order by r.date desc")
 	public List<PurchaseOrderReply> findByOrderItemId(@Param("orderItemId") long orderItemId);
 
 	/**

+ 30 - 23
src/main/webapp/resources/css/index.css

@@ -218,6 +218,22 @@ a {
 .angular-charts-template table {
 	margin-left: 15px !important;
 }
+
+.list-menu>li{
+	padding: 5px 5px 5px 15px;
+	position: relative;
+	border-bottom: 1px dotted #eee;
+}
+
+.list-menu>li:before {
+	position: absolute;
+  	left: 0;
+  	top: -2px;
+	content: ".";
+	font-size: 16px;
+	font-weight: bold;
+	color: #999;
+}
 /* top css stylesheet*/
 #top {
 	background-color: #f5f5f5;
@@ -552,29 +568,10 @@ a {
 	text-align: center;
 }
 
-.user-count
->
-li
-:not
- 
-(
-:last-child
- 
-)
-{
-border-right
-:
- 
-1
-px
- 
-solid
- 
-#e8e8e8
-;
-
-
+.user-count>li:not(:last-child){
+	border-right: 1px solid #e8e8e8;
 }
+
 .user-count .count {
 	color: #56a022;
 	font-size: 24px;
@@ -899,7 +896,7 @@ solid
 	margin: 0;
 }
 
-#footer .list-inline>li:not (:last-child ):after {
+#footer .list-inline>li:not(:last-child):after {
 	margin-left: 15px;
 	content: "|"
 }
@@ -977,4 +974,14 @@ solid
 .progress.progress-sm {
 	height: 14px;
 	margin-bottom: 8px;
+}
+
+.row.row-sm {
+  margin-left: -5px;
+  margin-right: -5px;
+}
+
+.row-sm [class*="col-"]{
+  padding-left: 5px;
+  padding-right: 5px;
 }

+ 10 - 4
src/main/webapp/resources/js/index/app.js

@@ -359,10 +359,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 		
 		$scope.onReplyClick = function(item) {
 			if(item.reply) {
-				var reply = angular.copy(item.reply); 
-				if(reply.delivery && typeof reply.delivery == 'object') {
-					reply.delivery = reply.delivery.getTime();
+				if(!item.reply.qty) {
+					toaster.pop('warning', '提示', '请填写回复数量!');
+					return;
 				}
+				var reply = angular.copy(item.reply); 
+				if(reply.delivery) {
+					if(typeof reply.delivery == 'object')
+						reply.delivery = reply.delivery.getTime();
+				} else
+					reply.delivery = item.delivery;
 				PurcOrderItem.reply({orderItemId: item.id}, reply, function(){
 					toaster.pop('info', '提示', '回复成功');
 					$scope.tableParams.reload();
@@ -382,7 +388,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 					item.replies = replies;
 				});
 			}
-		}
+		};
 	});
 	app.controller('SaleChangeCtrl', function($scope, $filter, PurcChange, ngTableParams, toaster){
 		$scope.tableParams = new ngTableParams({

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

@@ -69,6 +69,10 @@
 	display: none;
 }
 
+.order-table .operates i {
+	padding: 0 2px;
+}
+
 .order-table>tbody:hover .operates {
 	display: block;
 }
@@ -150,7 +154,7 @@
 			</tr>
 		</thead>
 		<tbody ng-repeat="order in $data">
-			<tr class="order-hd">
+			<tr class="order-hd"  ng-dbclick="order.$collapsed=!order.$collapsed">
 				<td class="first">
 					<div class="order-main">
 						<span> <input type="checkbox" class="selector"
@@ -169,10 +173,12 @@
 					<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">
+			<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>
@@ -227,12 +233,22 @@
 							已回复 <span class="text-default">{{item.replyQty}}</span> / {{item.qty}}
 							<div class="dropdown">
 								<a href="javascript:void(0);"
-									class="dropdown-toggle text-default">回复历史<i
+									class="dropdown-toggle text-default" ng-mouseover="getReply(item)">回复历史<i
 									class="fa fa-fw fa-angle-down"></i></a>
-								<div class="dropdown-menu">
-									<ul class="list-unstyled">
-										<li ng-repeat="reply in item.replies">{{reply.qty}}</li>
-									</ul>
+								<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>