Browse Source

物料搜索更新

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9440 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 years ago
parent
commit
134e84906d

+ 1 - 1
src/main/java/com/uas/platform/b2b/service/impl/ProductServiceImpl.java

@@ -342,7 +342,7 @@ public class ProductServiceImpl implements ProductService {
 		int size1 = idStrings.size();
 		List<Product> products = productDao.findByEnUUAndMatchstatus(SystemSession.getUser().getEnterprise().getUu(),
 				Status.SUBMITTED.value());
-		int size2 = 1;
+		int size2 = 0;
 		if (!CollectionUtils.isEmpty(products)) {
 			for (Product porduct : products) {
 				if (porduct.getMatchresults().size() == 1) {

+ 15 - 9
src/main/webapp/resources/js/index/app.js

@@ -16191,11 +16191,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 				} 
 			});
 			Products.updateall( {}, ids, function(data) {
-				$scope.loading = false;
 				if(data.success) {
 					toaster.pop('success', '提示', data.success);
-					$scope.tableParams.page(1);
-					$scope.tableParams.reload();
+					$timeout(function() {
+						$scope.tableParams.page(1);
+						$scope.tableParams.reload();
+						$scope.loading = false;
+					}, 500);
 				}
 				ids = []; // 清空ids,防止重复点击出现多余的数据
 			}, function(response) {
@@ -16385,11 +16387,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 				} 
 			});
 			Products.updateall( {}, ids, function(data) {
-				$scope.loading = false;
 				if(data.success) {
 					toaster.pop('success', '提示', data.success);
-					$scope.tableParams.page(1);
-					$scope.tableParams.reload();
+					$timeout(function() {
+						$scope.tableParams.page(1);
+						$scope.tableParams.reload();
+						$scope.loading = false;
+					}, 500);
 				}
 				ids = []; // 清空ids,防止重复点击出现多余的数据
 			}, function(response) {
@@ -16579,11 +16583,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 				} 
 			});
 			Products.updateall( {}, ids, function(data) {
-				$scope.loading = false;
 				if(data.success) {
 					toaster.pop('success', '提示', data.success);
-					$scope.tableParams.page(1);
-					$scope.tableParams.reload();
+					$timeout(function() {
+						$scope.tableParams.page(1);
+						$scope.tableParams.reload();
+						$scope.loading = false;
+					}, 500);
 				}
 				ids = []; // 清空ids,防止重复点击出现多余的数据
 			}, function(response) {