Procházet zdrojové kódy

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

maopixin před 2 roky
rodič
revize
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 123
         $scope.loadDataById = function(id) {
125 124
             dailyService.loadDataById(id).then(function(data){
@@ -159,6 +158,13 @@ angular.module('app.storage')
159 158
                 },function(data){
160 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 168
             } else {
163 169
                 // 设置货位号为空.
164 170
                 $scope.dailycheck.warehouseId = null;

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

@@ -27,9 +27,13 @@
27 27
 											<label class="label">仓房名称:<span style="color: red;">*</span></label>
28 28
 											<div ng-if="dailycheck.id == null">
29 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 37
 														<option value="">--请选择--</option>
34 38
 													</select>
35 39
 												</label>
@@ -81,7 +85,7 @@
81 85
 											<label>保管员:<span style="color: red;">*</span></label>
82 86
 											<label class="input" style="padding-top:5px;">
83 87
 												<input type="text" ng-model="dailycheck.bgy" name="bgy" ng-readonly="isNotEdit"
84
-													   placeholder="保管员" required>
88
+													   placeholder="保管员" required disabled>
85 89
 											</label>
86 90
 										</section>
87 91
 										<section class="col col-3">