Browse Source

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

administrator 11 years ago
parent
commit
828ecabbe4

+ 11 - 0
src/main/webapp/resources/js/index/app.js

@@ -299,6 +299,17 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				$scope.notices.splice(index, 1);
 			});
 		};
+		$scope.$watch($scope.notices, function(data) {
+			var q = 0, t = 0;
+			if(data) {
+				angular.forEach(function(d){
+					q += d.qty;
+					t += d.qty * d.price;
+				});
+			}
+			$scope.totalQty = q;
+			$scope.total = t;
+		});
 		$scope.cancel = function() {
 			$modalInstance.close();
 		};

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

@@ -7,8 +7,8 @@
 			<label class="col-md-2 col-sm-2 control-label"><span
 				class="text-inverse text-bold">*</span>送货单号:</label>
 			<div class="col-md-4 col-sm-4">
-				<input type="text" class="form-control input-sm" ng-model="saleSend.code"
-					required placeholder="填写本次送货单号" autofocus>
+				<input type="text" class="form-control input-sm"
+					ng-model="saleSend.code" required placeholder="填写本次送货单号" autofocus>
 			</div>
 		</div>
 		<div class="form-group">
@@ -41,7 +41,8 @@
 				<td width="200">
 					<div ng-bind="::notice.orderItem.product.code"></div>
 					<div ng-bind="::notice.orderItem.product.title"></div>
-					<div class="text-muted text-ellipsis" style="width: 180px;" ng-bind="::notice.orderItem.product.spec"></div>
+					<div class="text-muted text-ellipsis" style="width: 180px;"
+						ng-bind="::notice.orderItem.product.spec"></div>
 				</td>
 				<td width="80" class="text-center">
 					<div>
@@ -67,13 +68,23 @@
 						第 <span ng-bind="::notice.orderItem.number"></span> 行
 					</div>
 				</td>
-				<td width="50" class="text-center"><a ng-click="remove($index, notice)"
-					class="text-muted"><i class="fa fa-trash-o fa-2x"></i><br>取消</a></td>
+				<td width="50" class="text-center"><a
+					ng-click="remove($index, notice)" class="text-muted"><i
+						class="fa fa-trash-o fa-2x"></i><br>取消</a></td>
 			</tr>
 		</table>
 	</div>
 </div>
 <div class="modal-footer">
-	<button class="btn btn-primary" ng-click="send()" ng-disabled="!notices||notices.length==0" type="button">确认送货</button>
+	<div class="pull-left">
+		<ul class="list-inline">
+			<li><span class="text-muted">总数量:</span> <span
+				class="text-num text-bold" ng-bind="totalQty"></span></li>
+			<li><span class="text-muted">总金额:</span> <span
+				class="text-num text-bold" ng-bind="total | number:2"></span></li>
+		</ul>
+	</div>
+	<button class="btn btn-primary" ng-click="send()"
+		ng-disabled="!notices||notices.length==0" type="button">确认送货</button>
 	<button class="btn btn-default" ng-click="cancel()" type="button">取消</button>
 </div>