ソースを参照

云南代储点bug修改

lvzhikai 5 年 前
コミット
5908996bd2

+ 11 - 5
src/main/resources/static/app/business/agent/bgz/bgmxz/controller/agentBgmxzCtrl.js

@@ -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
                     //把数据传到出入库用做条件拿到明细账数据传回来

+ 1 - 1
src/main/resources/static/app/business/agent/bgz/bgmxz/views/agent-bgmxz-list.html

@@ -20,7 +20,7 @@
20 20
                                 <div class="dt-toolbar">
21 21
                                     <div class="col-xs-3 col-sm-10">
22 22
                                         <a has-permission="679" class="btn btn-primary btn-sm" ng-click="showEdit(null,'add')"><span class="fa fa-plus"></span>&nbsp;新&nbsp;增</a>&nbsp;
23
-                                        <a has-permission="680" class="btn btn-primary btn-sm" ng-click="synchro()">&nbsp;同&nbsp;步</a>&nbsp;
23
+                                        <a class="btn btn-primary btn-sm" ng-click="synchro()">&nbsp;同&nbsp;步</a>&nbsp;
24 24
                                         <div class="form-group" ng-hide="true">
25 25
                                             <label class="btn btn-primary btn-sm" for="exampleInputFile1"><i class="glyphicon glyphicon-import"></i>&nbsp;导&nbsp;入</label>
26 26
                                         </div>&nbsp;

+ 9 - 5
src/main/resources/static/app/business/agent/bgz/fcbgz/controller/agentFcbgzCtrl.js

@@ -2,7 +2,7 @@
2 2
 
3 3
 angular.module('app.business')
4 4
     .controller("agentFcbgzCtrl", function($scope, $rootScope, $http, $state, $filter, agentFcbgzService, 
5
-    		agentService, agentDepotService, warehouseService, StorehouseService, APP_CONFIG) {
5
+    		agentService, agentDepotService, warehouseService, agentStorehouseService, APP_CONFIG) {
6 6
 
7 7
     	// 分页信息
8 8
         $scope.pageInfo = {pageNum : 1, pageSize : 10};
@@ -51,8 +51,13 @@ angular.module('app.business')
51 51
         //根据代储库获取仓房列表
52 52
         $scope.getHouseList = function(depotId) {
53 53
             if(depotId != null){
54
-                StorehouseService.getAgentList(depotId,$rootScope.orgInfo.orgId,"1").then(function(data){
55
-                    $scope.storehouseList = data;
54
+                agentStorehouseService.getDepotToStoreList($rootScope.orgInfo.orgId, depotId).then(function(data){
55
+                    for (var i = 0; i < $scope.depotList.length; i++) {
56
+                        if($scope.depotList[i].depotId == depotId){
57
+                            $scope.orgIds = $scope.depotList[i].orgId;
58
+                            $scope.storehouseList = data;
59
+                        }
60
+                    }
56 61
                 },function(data){
57 62
                     console.log(data);
58 63
                 })
@@ -65,8 +70,7 @@ angular.module('app.business')
65 70
         $scope.getWareList = function(houseId) {
66 71
             if(houseId != null){
67 72
                 //按照单位获取单位下的仓房信息
68
-                var depotId = $rootScope.orgInfo.orgId;
69
-                warehouseService.getStorehouse(depotId, houseId, "1").then(function(data){
73
+                agentStorehouseService.getStorehouse($scope.orgIds, houseId).then(function(data){
70 74
                     $scope.warelist = data.wareList;  //下拉列表数据
71 75
                 },function (data) {
72 76
                     console.log(data);

+ 3 - 2
src/main/resources/static/app/business/agent/grainStorage/controller/hcCtrl.js

@@ -27,8 +27,8 @@ angular.module('app.business')
27 27
         $scope.getAgentDepotData = function(agentId){
28 28
             if(agentId != null){
29 29
                 //获取代储库名称做成下拉列表;
30
-                agentDepotService.getAgentDepotHouse("",agentId).then(function(data){
31
-                    $scope.depotList = data.map(function(item) {
30
+                agentDepotService.getPageInfo("1", "100", "",agentId).then(function(data){
31
+                    $scope.depotList = data.list.map(function(item) {
32 32
                         return {
33 33
                             depotId: item.id,
34 34
                             depotName: item.agentDepotName
@@ -101,6 +101,7 @@ angular.module('app.business')
101 101
         $scope.synchro = function() {
102 102
         	//查询代储库仓房货位信息
103 103
         	agentHcService.selectAgentHouseWareList($rootScope.orgInfo.orgId).then(function (data) {
104
+                var data = data.strResult;
104 105
         		if(data != null && "" != data){
105 106
                     //把数据传到出入库用做条件拿到明细账数据传回来
106 107
                     //把传回来的数据在插入到代储点的火车出入库记录表中

+ 3 - 2
src/main/resources/static/app/business/agent/grainStorage/controller/numberCtrl.js

@@ -27,8 +27,8 @@ angular.module('app.business')
27 27
         $scope.getAgentDepotData = function(agentId){
28 28
             if(agentId != null){
29 29
                 //获取代储库名称做成下拉列表;
30
-                agentDepotService.getAgentDepotHouse("",agentId).then(function(data){
31
-                    $scope.depotList = data.map(function(item) {
30
+                agentDepotService.getPageInfo("1", "100", "",agentId).then(function(data){
31
+                    $scope.depotList = data.list.map(function(item) {
32 32
                         return {
33 33
                             depotId: item.id,
34 34
                             depotName: item.agentDepotName
@@ -84,6 +84,7 @@ angular.module('app.business')
84 84
         $scope.synchro = function() {
85 85
         	//查询代储库仓房货位信息
86 86
         	agentBgmxzService.selectAgentHouseWareList($rootScope.orgInfo.orgId,"kcsw").then(function (data) {
87
+                var data = data.strResult;
87 88
         		if(data != null && "" != data){
88 89
                     //把数据传到出入库用做条件拿到明细账数据传回来
89 90
                     //把传回来的数据在插入到代储点的保管明细账表中

+ 4 - 3
src/main/resources/static/app/business/agent/grainStorage/controller/qcCtrl.js

@@ -27,8 +27,8 @@ angular.module('app.business')
27 27
         $scope.getAgentDepotData = function(agentId){
28 28
             if(agentId != null){
29 29
                 //获取代储库名称做成下拉列表;
30
-                agentDepotService.getAgentDepotHouse("",agentId).then(function(data){
31
-                    $scope.depotList = data.map(function(item) {
30
+                agentDepotService.getPageInfo("1", "100", "",agentId).then(function(data){
31
+                    $scope.depotList = data.list.map(function(item) {
32 32
                         return {
33 33
                             depotId: item.id,
34 34
                             depotName: item.agentDepotName
@@ -123,6 +123,7 @@ angular.module('app.business')
123 123
         $scope.synchro = function() {
124 124
         	//查询代储库仓房货位信息
125 125
         	agentQcService.selectAgentHouseWareList($rootScope.orgInfo.orgId).then(function (data) {
126
+                var data = data.strResult;
126 127
         		if(data != null && "" != data){
127 128
                     //把数据传到出入库用做条件拿到明细账数据传回来
128 129
                     //把传回来的数据在插入到代储点的汽车出入库记录表中
@@ -220,7 +221,7 @@ angular.module('app.business')
220 221
                     }
221 222
                 },function(data){
222 223
                     console.log(data);
223
-                });
224
+                })
224 225
             }else{
225 226
                 $scope.storehouseList = {};
226 227
             }

+ 2 - 2
src/main/resources/static/app/business/agent/grainStorage/controller/qualityCtrl.js

@@ -33,8 +33,8 @@ angular.module('app.business')
33 33
         $scope.getAgentDepotData = function(agentId){
34 34
             if(agentId != null){
35 35
                 //获取代储库名称做成下拉列表;
36
-                agentDepotService.getAgentDepotHouse("",agentId).then(function(data){
37
-                    $scope.depotList = data.map(function(item) {
36
+                agentDepotService.getPageInfo("1", "100", "",agentId).then(function(data){
37
+                    $scope.depotList = data.list.map(function(item) {
38 38
                         return {
39 39
                             depotId: item.id,
40 40
                             depotName: item.agentDepotName