Explorar el Código

货车总金额,计算表达式修改

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1071 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
administrator hace 11 años
padre
commit
c4fe58acb3
Se han modificado 1 ficheros con 7 adiciones y 5 borrados
  1. 7 5
      src/main/webapp/resources/js/index/app.js

+ 7 - 5
src/main/webapp/resources/js/index/app.js

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