Bläddra i källkod

bug样式修改

hanqingsong 1 år sedan
förälder
incheckning
84531fed38

+ 16 - 2
src/main/resources/static/app/storage/controller/festivalbeforeCtrl.js

@@ -137,7 +137,19 @@ angular.module('app.storage')
137 137
         };
138 138
 
139 139
         // 限制多选个数(无限制)
140
+        let houseCheckCount = 0;
140 141
         $scope.multipleChoice = function(item, selectedItems) {
142
+            // 检查仓房数 计算
143
+            if (item.isActive && item.selected === undefined) {
144
+                houseCheckCount += 1;
145
+                $scope.festivalbefore.houseCheckCount = houseCheckCount;
146
+            }
147
+            if (item.selected) {
148
+                houseCheckCount -= 1;
149
+                $scope.festivalbefore.houseCheckCount = houseCheckCount;
150
+            }
151
+
152
+            // 限制多选个数(无限制)
141 153
             if (selectedItems  !== undefined && selectedItems.length >= $rootScope.storelist.length) {
142 154
                 return false;
143 155
             } else {
@@ -185,7 +197,6 @@ angular.module('app.storage')
185 197
         });*/
186 198
         // 效验-检查发现问题
187 199
         $.validator.addMethod("checkProblem",function(value,element, params) {
188
-            // $scope.festivalbefore.problem = value;
189 200
             if ((value.length*2) >= 200) { // Gbase 存储/2
190 201
                 return this.optional(element);
191 202
             }
@@ -194,7 +205,6 @@ angular.module('app.storage')
194 205
 
195 206
         // 效验-整改措施
196 207
         $.validator.addMethod("checkOpinion",function(value,element, params) {
197
-            // $scope.festivalbefore.opinion = value;
198 208
             if ((value.length*2) >= 200) { // Gbase 存储/2
199 209
                 return this.optional(element);
200 210
             }
@@ -204,6 +214,10 @@ angular.module('app.storage')
204 214
         // 提交表单
205 215
         var validator = $("#festivalbefore-form").validate();
206 216
         $scope.saveData = function () {
217
+            if ($scope.festivalbefore.houseIdList.length <= 0) {
218
+                $("#storageDataSelect-error").text("必须填写");
219
+                return;
220
+            }
207 221
             if (validator.form()) {
208 222
                 $scope.festivalbefore.orgId = $rootScope.userInfo.orgId;
209 223
                 $scope.festivalbefore.checkDate = $("input[name='checkDate']").val(); // 时间控件获取值

+ 8 - 8
src/main/resources/static/app/storage/insectPestDetection/view/insectPestDetection-edit.html

@@ -34,10 +34,10 @@
34 34
 													<input type="text" placeholder="自动生成 检测日期(yyyyMMdd)+4 位顺序号" ng-model="insectPests.hcjcdh" ng-readonly="true" />
35 35
 												</label>
36 36
 											</th>
37
-											<th width='15%'>
37
+											<th>
38 38
 												<label class="label" style="margin-top: 9px;text-align: center;">仓房名称<span style="color: red;">*</span></label>
39 39
 											</th>
40
-											<th width='15%'>
40
+											<th>
41 41
 												<label class="select">
42 42
 													<select ng-model="houseId" name="houseId" class="form-control input-sm" ng-disabled="isEdit"
43 43
 															ng-options="store.storehouseId as store.storehouseName for store in storelist"
@@ -46,10 +46,10 @@
46 46
 													</select> <i></i>
47 47
 												</label>
48 48
 											</th>
49
-											<th width='15%'>
49
+											<th>
50 50
 												<label class="label" style="margin-top: 9px;text-align: center;">货位名称<span style="color: red;">*</span></label>
51 51
 											</th>
52
-											<th width='15%'>
52
+											<th>
53 53
 												<label class="select">
54 54
 													<select ng-model="insectPests.vHwCode" name="vHwCode" class="form-control input-sm" ng-disabled="isEdit"
55 55
 															ng-options="ware.warehouseId as ware.warehouseName for ware in warelist" ng-change="getStorageInfo(insectPests.vHwCode)" required>
@@ -75,10 +75,10 @@
75 75
 													<input type="text" ng-model="insectPests.kcsl" ng-readonly="true" />
76 76
 												</label>
77 77
 											</th>
78
-											<th width='15%'>
79
-												<label label class="label" style="margin-top: 9px;text-align: center;">检查害虫方法<span style="color: red;">*</span></label>
78
+											<th>
79
+												<label class="label" style="margin-top: 9px;text-align: center;">检查害虫方法<span style="color: red;">*</span></label>
80 80
 											</th>
81
-											<th width='15%'>
81
+											<th>
82 82
 												<section>
83 83
 													<label class="select">
84 84
 														<select ng-model="insectPests.jchcff" name="jchcff" required ng-disabled="isEdit">
@@ -110,7 +110,7 @@
110 110
 												</label>
111 111
 											</th>
112 112
 											<th >
113
-												<label label class="label" style="margin-top: 9px;text-align: center;">虫粮等级<span style="color: red;">*</span></label>
113
+												<label class="label" style="margin-top: 9px;text-align: center;">虫粮等级<span style="color: red;">*</span></label>
114 114
 											</th>
115 115
 											<th>
116 116
 												<section>

+ 12 - 17
src/main/resources/static/app/storage/views/safeproduce/safeproduce-festivalbefore-edit.html

@@ -227,17 +227,18 @@
227 227
 										<section class="col col-3">
228 228
 											<label class="label">仓房名称(可多选):<span style="color: red;">*</span></label>
229 229
 											<multi-select-tree data-input-model="storageDataSelect" data-default-label="请选择"
230
-															   select-only-leafs="true" required ng-disabled="isNotEdit"
230
+															   select-only-leafs="true" disabled-tree="isNotEdit"
231 231
 															   multi-select="true" data-output-model="festivalbefore.houseIdList"
232 232
 															   data-callback="multipleChoice(item, selectedItems)">
233 233
 											</multi-select-tree>
234
-											<!--<label class="select">
235
-												<select ng-model="festivalbefore.houseId" name="houseId" required
236
-														ng-options="store.storehouseId as store.storehouseName for store in storelist"
237
-														class="form-control" ng-disabled="isNotEdit" >
238
-													<option value="" disabled>&#45;&#45;请选择&#45;&#45;</option>
239
-												</select>
240
-											</label>-->
234
+											<em>
235
+												<span id="storageDataSelect-error" style="color: #D56161;margin-top:6px;padding:0 1px;font-style:normal;font-size:11px;line-height:15px;"></span>
236
+											</em>
237
+										</section>
238
+										<section class="col col-3"><!--ng-hide="!isNotEdit"-->
239
+											<label class="input">检查仓房数:
240
+												<input type="text" ng-model="festivalbefore.houseCheckCount" name="houseCheckCount" ng-disabled="true">
241
+											</label>
241 242
 										</section>
242 243
 										<section class="col col-3">
243 244
 											<label class="label">检查日期:<span style="color: red;">*</span></label>
@@ -253,6 +254,9 @@
253 254
 													   placeholder="检查人员"  required>
254 255
 											</label>
255 256
 										</section>
257
+
258
+									</div>
259
+									<div class="row">
256 260
 										<section class="col col-3">
257 261
 											<label class="input">
258 262
 												<label class="label">提交人:<span style="color: red;">*</span></label>
@@ -260,8 +264,6 @@
260 264
 													   placeholder="提交人"  required>
261 265
 											</label>
262 266
 										</section>
263
-									</div>
264
-									<div class="row">
265 267
 										<section class="col col-3">
266 268
 											<label class="input">
267 269
 												<label class="label">提交时间:<span style="color: red;">*</span></label>
@@ -269,13 +271,6 @@
269 271
 													   placeholder="提交时间"  required>
270 272
 											</label>
271 273
 										</section>
272
-										<section class="col col-3" ng-hide="!isNotEdit">
273
-											<label class="input">
274
-												<label class="label">检查仓房数:</label>
275
-												<input type="text" ng-model="festivalbefore.houseCheckCount" name="houseCheckCount" ng-disabled="true"
276
-													   placeholder="检查仓房数">
277
-											</label>
278
-										</section>
279 274
 									</div>
280 275
 									<div class="row">
281 276
 										<section class="col col-10" style="width:100%">