Browse Source

修改获取月平均单价的字段。

yujia 7 years ago
parent
commit
b37a81829a

+ 2 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -644,7 +644,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 				g.edit = false;
 			});
 			if (material.sourceApp == 'ERP') {
-				material.averMonthSalePrice = (material.productDetail && material.productDetail.price) ? material.productDetail.price : 0;
+				material.averMonthSalePrice = (material && material.price) ? material.price : 0;
 			}
             $scope.$$nonProduct.editGoods = angular.copy(goods);
 			goods.edit = true;
@@ -1901,7 +1901,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 			$scope.goods.editMinDelivery = (data && data.minDelivery) || $scope.uasBatchPutOnProperty.minDelivery;
 			$scope.goods.editMaxDelivery = (data && data.maxDelivery) || $scope.uasBatchPutOnProperty.maxDelivery;
 			product.selected = true;
-			product.averMonthSalePrice = (data && data.price) ? data.price : 0;
+			product.averMonthSalePrice = (product && product.price) ? product.price : 0;
 			var goodQtyPrice = {start: $scope.goods.editMinBuyQty, end: $scope.maxReserve};
 			var price = (((data && data.price) ? data.price : 0) *
 			($scope.uasBatchPutOnProperty.fluctuateRate ? $scope.uasBatchPutOnProperty.fluctuateRate : 1));