Browse Source

物料编辑时,点击取消还原为原来的数据

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7567 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 years ago
parent
commit
fe3d78fe2b
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/main/webapp/resources/js/index/app.js

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

@@ -7494,7 +7494,6 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 			GetProductInfo.getOne({id: $stateParams.id}, function(data) {
 				if(data.attach) {
 					GetProductInfo.getAttach({id: data.attach.id}, function(data) {
-						console.log(data.url);
 						// 查看范例
 						$scope.showImg = function() {
 							var src = data.url, box = $('#image-box');
@@ -7523,7 +7522,11 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 		
 		// 取消
 		$scope.cancel = function() {
-			$scope.prodInfo.$editing = false;
+			GetProductInfo.getOne({id: $stateParams.id}, function(data) {
+				$scope.prodInfo = data;
+				$scope.prodInfo.$editing = false;
+				$scope.loading = false;
+			});
 		};
 		
 		$scope.submit = function(prodInfo) {