Przeglądaj źródła

仓储仓房 初检

jidj 5 lat temu
rodzic
commit
5bd7886fc1

+ 10 - 5
src/main/resources/static/app/storage/controller/qualitycheckCtrl.js

@@ -218,7 +218,7 @@ angular.module('app.storage')
218 218
         }
219 219
 
220 220
     })
221
-    .controller("qualitycheckSaveCtrl", function($scope,$state, $http, $stateParams, StorehouseService, warehouseService, keeperService,
221
+    .controller("qualitycheckSaveCtrl", function($scope,$state, $http, $stateParams, StorehouseService, warehouseService, kcswService, keeperService,
222 222
                                                  $rootScope, $filter, enumService, qualitycheckService,keepAccountService, APP_CONFIG) {
223 223
 
224 224
         $scope.loadDataById = function(id) {
@@ -259,12 +259,17 @@ angular.module('app.storage')
259 259
          */
260 260
         $scope.getBasicData = function() {
261 261
             //按照单位获取单位下的仓房信息
262
-            //var depotId = $rootScope.depotInfo.orgId;
263
-            qualitycheckService.getStorehouseListFromBusiness().then(function(data){
264
-                $scope.storehouseList = data.houseList;
265
-            },function (data) {
262
+            $scope.kcswStr = {ch : null, hwh : null, unitid : $rootScope.orgInfo.orgId, kcsl: null};
263
+            kcswService.getPageInfo(null, null, $scope.kcswStr, null).then(function(data){
264
+                $scope.storehouseList = data.list;
265
+                for (var idx in $scope.storehouseList) {
266
+                    $scope.storehouseName = $rootScope.storehouseObj[$scope.storehouseList[idx].ch].storehouseName;
267
+                    $scope.storehouseList[idx].storehouseName = $scope.storehouseName;
268
+                }
269
+            },function(data){
266 270
                 console.log(data);
267 271
             });
272
+
268 273
         }
269 274
         $scope.getBasicData();
270 275