Parcourir la source

【客户采购询价】报价成功延时加载,解决报价附件不显示问题

dongbw il y a 8 ans
Parent
commit
ce18c5aefb
1 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 7 3
      src/main/webapp/resources/js/index/app.js

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

@@ -3444,7 +3444,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
     }]);
 
     //客户采购询价
-    app.controller('SaleInquiryCtrl', ['$scope', '$filter', 'PurcInquiry', 'ngTableParams', 'toaster', 'BaseService', 'PurcInquiryInfo', '$upload', '$rootScope', 'token', function ($scope, $filter, PurcInquiry, ngTableParams, toaster, BaseService, PurcInquiryInfo, $upload, $rootScope, token) {
+    app.controller('SaleInquiryCtrl', ['$scope', '$filter', 'PurcInquiry', 'ngTableParams', 'toaster', 'BaseService', 'PurcInquiryInfo', '$upload', '$rootScope', 'token', '$timeout', function ($scope, $filter, PurcInquiry, ngTableParams, toaster, BaseService, PurcInquiryInfo, $upload, $rootScope, token, $timeout) {
         BaseService.scrollBackToTop();
         if ($rootScope.active) {
             $scope.active = $rootScope.active;
@@ -3685,7 +3685,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     PurcInquiry.reply({itemId: item.id, token: $scope.token}, item, function () {
                         $scope.loading = false;
                         toaster.pop('info', '提示', '报价成功');
-                        $scope.tableParams.reload();
+                        $timeout(function () {
+                            $scope.tableParams.reload();
+                        }, 300);
                     }, function (response) {
                         $scope.loading = false;
                         toaster.pop('error', '询价失效', response.data);
@@ -3694,7 +3696,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     PurcInquiry.saveItem({itemId: item.id, token: $scope.token}, item, function () {
                         $scope.loading = false;
                         toaster.pop('info', '提示', '保存成功');
-                        $scope.tableParams.reload();
+                        $timeout(function () {
+                            $scope.tableParams.reload();
+                        }, 300);
                     }, function (response) {
                         $scope.loading = false;
                         toaster.pop('error', '保存失败', response.data);