Browse Source

fix: 选择仓房自动带出保管员

maopixin 2 years ago
parent
commit
95a7979df8

+ 8 - 2
src/main/resources/static/app/storage/controller/dailyListCtrl.js

@@ -118,8 +118,7 @@ angular.module('app.storage')
118
     })
118
     })
119
 
119
 
120
 
120
 
121
-    .controller("dailyListAddCtrl", function($scope,$state, $http, $stateParams, StorehouseService, warehouseService,$rootScope,
122
-                                             dailyService, kcswService, $filter, APP_CONFIG) {
121
+    .controller("dailyListAddCtrl", function($scope,$state, $http, $stateParams, StorehouseService, warehouseService,$rootScope, dailyService, kcswService, keeperService, $filter, APP_CONFIG) {
123
 
122
 
124
         $scope.loadDataById = function(id) {
123
         $scope.loadDataById = function(id) {
125
             dailyService.loadDataById(id).then(function(data){
124
             dailyService.loadDataById(id).then(function(data){
@@ -159,6 +158,13 @@ angular.module('app.storage')
159
                 },function(data){
158
                 },function(data){
160
                     console.log(data);
159
                     console.log(data);
161
                 });
160
                 });
161
+
162
+				// 通过仓房id 获取保管员姓名
163
+				keeperService.getKeeperNamesByHouseId($scope.dailycheck.houseId).then(function(data){
164
+					$scope.dailycheck.bgy = data.keeperNames
165
+				},function(data){
166
+					console.log(data);
167
+				});
162
             } else {
168
             } else {
163
                 // 设置货位号为空.
169
                 // 设置货位号为空.
164
                 $scope.dailycheck.warehouseId = null;
170
                 $scope.dailycheck.warehouseId = null;

+ 8 - 4
src/main/resources/static/app/storage/views/safeproduce/safeproduce-dailyList-add.html

@@ -27,9 +27,13 @@
27
 											<label class="label">仓房名称:<span style="color: red;">*</span></label>
27
 											<label class="label">仓房名称:<span style="color: red;">*</span></label>
28
 											<div ng-if="dailycheck.id == null">
28
 											<div ng-if="dailycheck.id == null">
29
 												<label class="select">
29
 												<label class="select">
30
-													<select ng-model="dailycheck.houseId" name="houseId" required ng-change=change()
31
-															ng-options="store.ch as store.storehouseName for store in storehouseList"
32
-															class="form-control" >
30
+													<select 
31
+														ng-model="dailycheck.houseId"
32
+														name="houseId"
33
+														required
34
+														ng-options="store.ch as store.storehouseName for store in storehouseList"
35
+														ng-change='change()'
36
+														class="form-control" >
33
 														<option value="">--请选择--</option>
37
 														<option value="">--请选择--</option>
34
 													</select>
38
 													</select>
35
 												</label>
39
 												</label>
@@ -81,7 +85,7 @@
81
 											<label>保管员:<span style="color: red;">*</span></label>
85
 											<label>保管员:<span style="color: red;">*</span></label>
82
 											<label class="input" style="padding-top:5px;">
86
 											<label class="input" style="padding-top:5px;">
83
 												<input type="text" ng-model="dailycheck.bgy" name="bgy" ng-readonly="isNotEdit"
87
 												<input type="text" ng-model="dailycheck.bgy" name="bgy" ng-readonly="isNotEdit"
84
-													   placeholder="保管员" required>
88
+													   placeholder="保管员" required disabled>
85
 											</label>
89
 											</label>
86
 										</section>
90
 										</section>
87
 										<section class="col col-3">
91
 										<section class="col col-3">