Explorar el Código

物料销售开关添加加载中状态

dongbw hace 8 años
padre
commit
36f3763952
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      src/main/webapp/resources/js/index/app.js

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

@@ -21272,7 +21272,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         // 开启销售
         $scope.unlock = function (id) {
+            $scope.loading = true;
             Products.unlock({id: id}, {}, function (data) {
+                $scope.loading = false;
                 toaster.pop('success', '提示', '操作成功');
                 $scope.tableParams.reload();
             }, function (response) {
@@ -21282,7 +21284,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         // 关闭销售
         $scope.lock = function (id) {
+            $scope.loading = true;
             Products.lock({id: id}, {}, function (data) {
+                $scope.loading = false;
                 toaster.pop('success', '提示', '操作成功');
                 $scope.tableParams.reload();
             }, function (response) {
@@ -21292,7 +21296,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         // 开启购买
         $scope.unlockPurc = function (id) {
+            $scope.loading = true;
             Products.unlockPurc({id: id}, {}, function (data) {
+                $scope.loading = false;
                 toaster.pop('success', '提示', '操作成功');
                 $scope.tableParams.reload();
             }, function (response) {
@@ -21302,7 +21308,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         // 关闭购买
         $scope.lockPurc = function (id) {
+            $scope.loading = true;
             Products.lockPurc({id: id}, {}, function (data) {
+                $scope.loading = false;
                 toaster.pop('success', '提示', '操作成功');
                 $scope.tableParams.reload();
             }, function (response) {