Kaynağa Gözat

封仓确认单-修改

hanqingsong 1 yıl önce
ebeveyn
işleme
b4faf195e2

+ 16 - 7
src/main/resources/static/app/business/storageSealedConfirmation/controller/pageEditCtrl.js

@@ -1,7 +1,6 @@
1
 angular.module('app.business').controller("pageEditCtrl", function ($scope, $http, $stateParams, $state, $rootScope, APP_CONFIG, $uibModal, pageListService, warehouseService) {
1
 angular.module('app.business').controller("pageEditCtrl", function ($scope, $http, $stateParams, $state, $rootScope, APP_CONFIG, $uibModal, pageListService, warehouseService) {
2
     $scope.title = $stateParams.title;
2
     $scope.title = $stateParams.title;
3
     $scope.sealedStorage = {};
3
     $scope.sealedStorage = {};
4
-
5
     // console.log("userInfoAllData", $rootScope.userInfoAllData)
4
     // console.log("userInfoAllData", $rootScope.userInfoAllData)
6
 
5
 
7
     // 根据id查询数据
6
     // 根据id查询数据
@@ -106,17 +105,28 @@ angular.module('app.business').controller("pageEditCtrl", function ($scope, $htt
106
 
105
 
107
     // 货位列表
106
     // 货位列表
108
     $scope.loadWare = function() {
107
     $scope.loadWare = function() {
109
-        warehouseService.getStorehouse($rootScope.orgInfo.orgId, $scope.sealedStorage.houseId).then(function(data){
110
-            $scope.warelist = data.wareList;
111
-        },function(data){
112
-            console.log(data);
113
-        });
108
+        // datatype 0:仓房,1:油罐
109
+        console.log($rootScope.storehouseObj[$scope.sealedStorage.houseId].datatype)
110
+        if ($rootScope.storehouseObj[$scope.sealedStorage.houseId].datatype == 1) {
111
+            // 油罐,没有货位
112
+            $scope.warelist = [];
113
+            $scope.checkGrainAttribute();
114
+        } else {
115
+            // 仓房获取货位
116
+            warehouseService.getStorehouse($rootScope.orgInfo.orgId, $scope.sealedStorage.houseId).then(function(data){
117
+                $scope.warelist = data.wareList;
118
+            },function(data){
119
+                console.log(data);
120
+            });
121
+        }
114
     };
122
     };
115
 
123
 
116
     // 获取封仓数据
124
     // 获取封仓数据
117
     $scope.checkGrainAttribute = function() {
125
     $scope.checkGrainAttribute = function() {
126
+        console.log($scope.sealedStorage.houseId)
118
         pageListService.checkGrainAttribute($rootScope.orgInfo.orgId, $scope.sealedStorage.houseId, $scope.sealedStorage.warehouseId).then(function(data){
127
         pageListService.checkGrainAttribute($rootScope.orgInfo.orgId, $scope.sealedStorage.houseId, $scope.sealedStorage.warehouseId).then(function(data){
119
             $scope.sealedStorage = data.data;
128
             $scope.sealedStorage = data.data;
129
+            console.log($scope.sealedStorage)
120
         },function(data){
130
         },function(data){
121
             console.log(data);
131
             console.log(data);
122
         });
132
         });
@@ -124,7 +134,6 @@ angular.module('app.business').controller("pageEditCtrl", function ($scope, $htt
124
 
134
 
125
     // 表单效验
135
     // 表单效验
126
     var validator = $("#storageSealed-form").validate();
136
     var validator = $("#storageSealed-form").validate();
127
-
128
     // 保存
137
     // 保存
129
     $scope.save = function() {
138
     $scope.save = function() {
130
         if(validator.form()) {
139
         if(validator.form()) {

+ 4 - 1
src/main/resources/static/app/business/storageSealedConfirmation/service/pageListService.js

@@ -42,7 +42,10 @@ angular.module('app.business').service("pageListService", function ($http, $root
42
         var d = $q.defer();
42
         var d = $q.defer();
43
         $http({
43
         $http({
44
             method : 'GET',
44
             method : 'GET',
45
-            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/checkGrainAttribute/' + orgId + '/' + houseId + '/' + warehouseId
45
+            url : APP_CONFIG.sharedUrl + '/storageSealedConfirmation/checkGrainAttribute/' + orgId + '/' + houseId,
46
+            params : {
47
+                warehouseId : warehouseId
48
+            }
46
         }).then(function successCallback(response) {
49
         }).then(function successCallback(response) {
47
             // 请求成功执行代码
50
             // 请求成功执行代码
48
             d.resolve(response.data);
51
             d.resolve(response.data);

+ 14 - 14
src/main/resources/static/app/business/storageSealedConfirmation/views/pageEdit.html

@@ -36,11 +36,11 @@
36
                                             </label>
36
                                             </label>
37
                                         </section>
37
                                         </section>
38
                                         <section class="col col-3">
38
                                         <section class="col col-3">
39
-                                            <label class="label">货位名称:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
39
+                                            <label class="label">货位名称:</label>
40
                                             <label class="select">
40
                                             <label class="select">
41
                                                 <select ng-model="sealedStorage.warehouseId" ng-disabled="isNotEdit" ng-change="checkGrainAttribute()"
41
                                                 <select ng-model="sealedStorage.warehouseId" ng-disabled="isNotEdit" ng-change="checkGrainAttribute()"
42
                                                         ng-options="ware.warehouseId as ware.warehouseName for ware in warelist"
42
                                                         ng-options="ware.warehouseId as ware.warehouseName for ware in warelist"
43
-                                                        class="form-control" required>
43
+                                                        class="form-control">
44
                                                     <option value="">--请选择--</option>
44
                                                     <option value="">--请选择--</option>
45
                                                 </select>
45
                                                 </select>
46
                                             </label>
46
                                             </label>
@@ -48,15 +48,15 @@
48
                                         <section class="col col-3">
48
                                         <section class="col col-3">
49
                                             <label class="label">粮食品种:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
49
                                             <label class="label">粮食品种:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
50
                                             <label class="input">
50
                                             <label class="input">
51
-                                                <input type="text" ng-model="dicData[sealedStorage.grainKind]" name="idCard"
52
-                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
51
+                                                <input type="text" ng-model="dicData[sealedStorage.grainKind]" name="grainKind"
52
+                                                       placeholder="" ng-readonly="true" required>
53
                                             </label>
53
                                             </label>
54
                                         </section>
54
                                         </section>
55
                                         <section class="col col-3">
55
                                         <section class="col col-3">
56
                                             <label class="label">粮食品性质:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
56
                                             <label class="label">粮食品性质:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
57
                                             <label class="input">
57
                                             <label class="input">
58
-                                                <input type="text" ng-model="dicData[sealedStorage.grainAttribute]" name="idCard"
59
-                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
58
+                                                <input type="text" ng-model="dicData[sealedStorage.grainAttribute]" name="grainAttribute"
59
+                                                       placeholder="" ng-readonly="true" required>
60
                                             </label>
60
                                             </label>
61
                                         </section>
61
                                         </section>
62
                                     </div>
62
                                     </div>
@@ -64,29 +64,29 @@
64
                                         <section class="col col-3">
64
                                         <section class="col col-3">
65
                                             <label class="label">封仓数量(公斤):<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
65
                                             <label class="label">封仓数量(公斤):<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
66
                                             <label class="input">
66
                                             <label class="input">
67
-                                                <input type="text" ng-model="sealedStorage.sealedNumber" name="idCard"
68
-                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
67
+                                                <input type="text" ng-model="sealedStorage.sealedNumber" name="sealedNumber"
68
+                                                       placeholder="" ng-readonly="true" required>
69
                                             </label>
69
                                             </label>
70
                                         </section>
70
                                         </section>
71
                                         <section class="col col-3">
71
                                         <section class="col col-3">
72
                                             <label class="label">等级:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
72
                                             <label class="label">等级:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
73
                                             <label class="input">
73
                                             <label class="input">
74
-                                                <input type="text" ng-model="dicData[sealedStorage.grainGrade]" name="idCard"
75
-                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
74
+                                                <input type="text" ng-model="dicData[sealedStorage.grainGrade]" name="grainGrade"
75
+                                                       placeholder="" ng-readonly="true" required>
76
                                             </label>
76
                                             </label>
77
                                         </section>
77
                                         </section>
78
                                         <section class="col col-3">
78
                                         <section class="col col-3">
79
                                             <label class="label">产地:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
79
                                             <label class="label">产地:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
80
                                             <label class="input">
80
                                             <label class="input">
81
-                                                <input type="text" ng-model="dicData[sealedStorage.placeOfOrigin]" name="idCard"
82
-                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
81
+                                                <input type="text" ng-model="dicData[sealedStorage.placeOfOrigin]" name="placeOfOrigin"
82
+                                                       placeholder="" ng-readonly="true" required>
83
                                             </label>
83
                                             </label>
84
                                         </section>
84
                                         </section>
85
                                         <section class="col col-3">
85
                                         <section class="col col-3">
86
                                             <label class="label">收获年度:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
86
                                             <label class="label">收获年度:<span style="color: red;margin-left: 5px;text-align: center;">*</span></label>
87
                                             <label class="input">
87
                                             <label class="input">
88
-                                                <input type="text" ng-model="dicData[sealedStorage.harvestYear]" name="idCard"
89
-                                                       placeholder="" ng-readonly="true" sfzhm="true" maxlength="18" required>
88
+                                                <input type="text" ng-model="dicData[sealedStorage.harvestYear]" name="harvestYear"
89
+                                                       placeholder="" ng-readonly="true" required>
90
                                             </label>
90
                                             </label>
91
                                         </section>
91
                                         </section>
92
                                     </div>
92
                                     </div>