Browse Source

物料产品编辑功能更新

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

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

@@ -306,9 +306,11 @@ public class ProductServiceImpl implements ProductService {
 			try {
 				prod = productDao.save(prod);
 			} catch (Exception e) {
+				map.put("error", "更新失败");
 				e.printStackTrace();
 			}
 		}
+		map.put("success", "更新成功");
 		return map;
 	}
 

+ 2 - 1
src/main/webapp/resources/js/index/app.js

@@ -2068,7 +2068,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 					}
 				});
 			}
-			console.log($scope.isChanged);
 			angular.forEach($scope.changes, function(changed) {
 				if(changed.index != index) {
 					if(changed.status) {
@@ -10695,6 +10694,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 			Products.updateone({id: id}, {}, function(data) {
 				if(data.success) {
 					toaster.pop('success', '提示', data.success);
+					window.location.reload();
 				}
 			}, function(response) {
 				toaster.pop('error', '提示', response.data);
@@ -17960,6 +17960,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 			Products.updateone({id: id}, {}, function(data) {
 				if(data.success) {
 					toaster.pop('success', '提示', data.success);
+					window.location.reload();
 				}
 			}, function(response) {
 				toaster.pop('error', '提示', response.data);