|
|
@@ -276,7 +276,7 @@ angular.module('app.storage').controller("insectPestDetectionNewCtrl", function
|
|
276
|
276
|
};
|
|
277
|
277
|
})
|
|
278
|
278
|
// 虫害手工录入
|
|
279
|
|
-.controller("insectPestEditNewCtrl", function($scope, $filter, $http, $stateParams, $state, $rootScope, $uibModal, insectPestDetectionNewService, warehouseService) {
|
|
|
279
|
+.controller("insectPestEditNewCtrl", function($scope, $filter, $http, $stateParams, $state, $rootScope, $uibModal, insectPestDetectionNewService, warehouseService, pageListService) {
|
|
280
|
280
|
|
|
281
|
281
|
// 仓房列表
|
|
282
|
282
|
$scope.loadWare = function(houseId) {
|
|
|
@@ -287,6 +287,16 @@ angular.module('app.storage').controller("insectPestDetectionNewCtrl", function
|
|
287
|
287
|
});
|
|
288
|
288
|
};
|
|
289
|
289
|
|
|
|
290
|
+ // 获取库存信息
|
|
|
291
|
+ $scope.getStorageInfo = function(warehouseId) {
|
|
|
292
|
+ insectPestDetectionNewService.getCheckGrainAttribute($rootScope.orgInfo.orgId, $scope.houseId, warehouseId).then(function(data){
|
|
|
293
|
+ $scope.insectPests.lypz = data.data.lypz;
|
|
|
294
|
+ $scope.insectPests.kcsl = data.data.kcsl;
|
|
|
295
|
+ },function(data){
|
|
|
296
|
+ console.log(data);
|
|
|
297
|
+ });
|
|
|
298
|
+ };
|
|
|
299
|
+
|
|
290
|
300
|
$scope.isEdit = false;
|
|
291
|
301
|
|
|
292
|
302
|
if ($stateParams.id != "0") {
|
|
|
@@ -296,6 +306,7 @@ angular.module('app.storage').controller("insectPestDetectionNewCtrl", function
|
|
296
|
306
|
$scope.houseId = $rootScope.storeHouseCodeObj[data.data.vCcCode].storehouseId;
|
|
297
|
307
|
$scope.insectPests.vHwCode = parseInt(data.data.vHwCode);
|
|
298
|
308
|
$scope.insectPests.cldjpd = parseInt(data.data.cldjpd);
|
|
|
309
|
+ $scope.insectPests.hcjcdh = $scope.insectPests.hcjcdh.substr(-12);
|
|
299
|
310
|
$scope.pestList = [];
|
|
300
|
311
|
if (data.data != "error") {
|
|
301
|
312
|
var hczl = data.data.hczl;
|
|
|
@@ -323,6 +334,8 @@ angular.module('app.storage').controller("insectPestDetectionNewCtrl", function
|
|
323
|
334
|
$scope.saveFlag = false;
|
|
324
|
335
|
$scope.insectPests.vUpdatePeople = $rootScope.userInfo.realName;
|
|
325
|
336
|
$scope.insectPests.orgId = $rootScope.orgInfo.orgId;
|
|
|
337
|
+ $scope.insectPests.commitPeople = $rootScope.userInfo.realName;
|
|
|
338
|
+ $scope.insectPests.commitTime = $filter('date')(new Date(), "yyyy-MM-dd hh:mm:ss");
|
|
326
|
339
|
}
|
|
327
|
340
|
|
|
328
|
341
|
var validator = $("#insectPests-form").validate();
|