Browse Source

物料删除增加加载动画

dongbw 8 years ago
parent
commit
459f7a12b0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/main/webapp/resources/js/index/app.js

+ 3 - 0
src/main/webapp/resources/js/index/app.js

@@ -13466,6 +13466,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         //删除
         $scope.deleteById = function (id) {
+            $scope.loading = true;
             GetProductInfo.deleteById({}, id, function (data) {
                 if (data.error) {
                     toaster.pop("error", "提示", data.error);
@@ -13475,7 +13476,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                         $scope.tableParams.reload();
                     }, 500);
                 }
+                $scope.loading = false;
             }, function (response) {
+                $scope.loading = false;
                 toaster.pop("error", "删除失败", response.data);
             });
         };