Просмотр исходного кода

删除物料时不跳转到第一页

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7744 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 лет назад
Родитель
Сommit
3236612fc9
1 измененных файлов с 21 добавлено и 21 удалено
  1. 21 21
      src/main/webapp/resources/js/index/app.js

+ 21 - 21
src/main/webapp/resources/js/index/app.js

@@ -947,24 +947,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			}
 		});
 		
-		$scope.showImageDialog = function(modal) {
-			require([ 'jquery-uploadify' ], function() {
-				$modal.open({
-					templateUrl : 'static/tpl/index/home/insert.html',
-					controller : 'ImageInsertCtrl',
-					backdrop : 'static'
-				}).result.then(function(image){
-					$scope.imageUrl = image.thumb;
-					User.postImageUrl(null, angular.toJson($scope.imageUrl), function(data){
-						$scope.user = data;
-					}, function(response) {
-						toaster.pop('error', '设置图像失败,' + response.data);
-					});
-					
-				});
-			});
-		}
-		
 		$scope.logout = function() {
 			AuthenticationService.logout();
 		};
@@ -1647,7 +1629,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
   				PurcOrderItem[getPurcStatus($scope.active)].call(null, BaseService.parseParams(pageParams), function(page){
   					$scope.loading = false;
   					if(page) {
-  						
   						$defer.resolve(page.content);
   						params.total(page.totalElement);
   						$scope.searchFilterXls = angular.copy(pageParams.searchFilter);//保存当前取值的条件
@@ -1711,9 +1692,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
   		};
   		
   		// 搜索框回车
-  		$scope.onSearch = function() {
+  		$scope.onSearch = function(keyword) {
   			$scope.tableParams.page(1);
   			$scope.tableParams.reload();
+  			$scope.tip = keyword;
   		};
   		// 选择查找日期
   		$scope.onDateCondition = function(){
@@ -5676,6 +5658,25 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			}, function(){
 			});
 		};
+		
+		// 设置logo
+		$scope.showImageDialog = function(modal) {
+			require([ 'jquery-uploadify' ], function() {
+				$modal.open({
+					templateUrl : 'static/tpl/index/home/insert.html',
+					controller : 'ImageInsertCtrl',
+					backdrop : 'static'
+				}).result.then(function(image){
+					$scope.imageUrl = image.thumb;
+					User.postImageUrl(null, angular.toJson($scope.imageUrl), function(data){
+						$scope.user = data;
+					}, function(response) {
+						toaster.pop('error', '设置图像失败,' + response.data);
+					});
+					
+				});
+			});
+		}
 	}]);
 	
 	// 编辑收货地址
@@ -7589,7 +7590,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				} else {
 					toaster.pop("success", "提示", "删除成功");
 					$timeout(function() {
-						$scope.tableParams.page(1);
 						$scope.tableParams.reload();
 					}, 500);
 				}