Browse Source

企业产品库数据加载增加加载中状态

hejq 7 years ago
parent
commit
400dd86b0d

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

@@ -13117,7 +13117,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         BaseService.scrollBackToTop();
         var loadAccount = function () {
             AccountEnterprise.get({}, function (data) {
-                $scope.loading = false;
                 $scope.enterprise = data;
                 $scope.saleStatus = $scope.enterprise.prodsale;
             });
@@ -13154,6 +13153,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         var getService = function () {
             return $scope.searchMethod ? GetProductInfo : GetProductInfoNewest;
         };
+        $scope.loading = true;
 
         $scope.tableParams = new ngTableParams({
             page: 1,
@@ -13165,7 +13165,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             total: 0,
             counts: [5, 10, 25, 50],
             getData: function ($defer, params) {
-                $scope.loading = true;
                 var pageParams = params.url();
                 pageParams.keyword = $scope.keyword;
                 pageParams.searchFilter = $scope.searchFilter;

+ 4 - 4
src/main/webapp/resources/tpl/index/baseInfo/prodList.html

@@ -206,12 +206,12 @@ width: 80px;
 }
 </style>
 <link rel="stylesheet" href="static/css/public.css">
+<div class="loading in" ng-class="{'in': loading}">
+    <i></i>
+</div>
 <div class="block" id="public">
-    <div class="loading in" ng-class="{'in': loading}">
-        <i></i>
-    </div>
     <div class="pub-com_head">
-        <span>产品库</span>
+        <span>产品库{{loading}}</span>
         <div class="p-right">
             <a ng-click="exportXls()" target="_self" class="text-simple" title="导出Excel表格">导出</a>
             <!--<a ui-sref="sale.newProdInfo">新增</a>-->