|
|
@@ -2,7 +2,7 @@
|
|
2
|
2
|
|
|
3
|
3
|
angular.module('app.business')
|
|
4
|
4
|
.controller("agentBgmxzCtrl", function($scope, $rootScope, $http, $state, agentBgmxzService, FileUploader,
|
|
5
|
|
- agentService, agentDepotService, warehouseService, StorehouseService, fcbgzService, APP_CONFIG) {
|
|
|
5
|
+ agentService, agentDepotService, warehouseService, StorehouseService, fcbgzService, APP_CONFIG,agentStorehouseService) {
|
|
6
|
6
|
|
|
7
|
7
|
// 分页信息
|
|
8
|
8
|
$scope.pageInfo = {pageNum : 1, pageSize : 10};
|
|
|
@@ -62,8 +62,14 @@ angular.module('app.business')
|
|
62
|
62
|
//根据代储库获取仓房列表
|
|
63
|
63
|
$scope.getHouseList = function(depotId) {
|
|
64
|
64
|
if(depotId != null){
|
|
65
|
|
- StorehouseService.getAgentList(depotId,$rootScope.orgInfo.orgId,"1").then(function(data){
|
|
66
|
|
- $scope.storehouseList = data;
|
|
|
65
|
+ // StorehouseService.getAgentList(depotId,$rootScope.orgInfo.orgId,"1").then(function(data){
|
|
|
66
|
+ agentStorehouseService.getDepotToStoreList($rootScope.orgInfo.orgId, depotId).then(function(data){
|
|
|
67
|
+ for (var i = 0; i < $scope.depotList.length; i++) {
|
|
|
68
|
+ if($scope.depotList[i].depotId == depotId){
|
|
|
69
|
+ $scope.orgIds = $scope.depotList[i].orgId;
|
|
|
70
|
+ $scope.storehouseList = data;
|
|
|
71
|
+ }
|
|
|
72
|
+ }
|
|
67
|
73
|
},function(data){
|
|
68
|
74
|
console.log(data);
|
|
69
|
75
|
})
|
|
|
@@ -77,8 +83,7 @@ angular.module('app.business')
|
|
77
|
83
|
//console.log(houseId);
|
|
78
|
84
|
if(houseId != null){
|
|
79
|
85
|
//按照单位获取单位下的仓房信息
|
|
80
|
|
- var depotId = $rootScope.orgInfo.orgId;
|
|
81
|
|
- warehouseService.getStorehouse(depotId, houseId, "1").then(function(data){
|
|
|
86
|
+ agentStorehouseService.getStorehouse($scope.orgIds, houseId).then(function(data){
|
|
82
|
87
|
$scope.warelist = data.wareList; //下拉列表数据
|
|
83
|
88
|
},function (data) {
|
|
84
|
89
|
console.log(data);
|
|
|
@@ -100,6 +105,7 @@ angular.module('app.business')
|
|
100
|
105
|
$scope.synchro = function() {
|
|
101
|
106
|
//查询代储库仓房货位信息
|
|
102
|
107
|
agentBgmxzService.selectAgentHouseWareList($rootScope.orgInfo.orgId,"fcbgz").then(function (data) {
|
|
|
108
|
+ var data = data.strResult;
|
|
103
|
109
|
//console.log(data);
|
|
104
|
110
|
if(data != null && "" != data){
|
|
105
|
111
|
//把数据传到出入库用做条件拿到明细账数据传回来
|