lvzhikai vor 5 Jahren
Ursprung
Commit
29ad9aa959

+ 7 - 1
src/main/resources/static/app/intelligent/fumigation/controller/fumHomeWorkCtrl.js

@@ -222,7 +222,7 @@ angular.module('app.intelligent')
222 222
     // 气体检测信息添加
223 223
     $scope.addRow = function() {
224 224
         var params = [];
225
-        params.houseId = $scope.fumigation.houseId;
225
+        params.houseId = $rootScope.storehouseObj[parseInt($scope.fumigation.houseId)].storehouseCode;
226 226
         var uibModalInstance = $uibModal.open({
227 227
             size:'lg',
228 228
             templateUrl: 'app/intelligent/fumigation/views/homework/dcsqtinfo-list-modal.html',
@@ -465,6 +465,12 @@ angular.module('app.intelligent')
465 465
         return this.optional(element)||(checkNumber.test(value));
466 466
     },"请输入正确的数字类型,最多两位小数!");
467 467
 
468
+    // 自定义验证,验证熏蒸次数
469
+    $.validator.addMethod("validFrequency",function(value,element, params) {
470
+        var checkNumber = /^\+?[1-9]\d*$/;
471
+        return this.optional(element)||(checkNumber.test(value));
472
+    },"请输入大于0的整数!");
473
+
468 474
     // 自定义验证
469 475
     $.validator.addMethod("setState",function(value,element, params) {
470 476
         if(value == "无" || value == "暂无" || value == "空"){

+ 6 - 0
src/main/resources/static/app/intelligent/fumigation/controller/fumigationPlanCtrl.js

@@ -225,6 +225,12 @@ angular.module('app.intelligent')
225 225
     var validator = $("#fumigationPlan-form").validate();
226 226
 
227 227
     // 自定义验证,验证数字
228
+    $.validator.addMethod("validNumbers",function(value,element, params) {
229
+        var checkNumber = /^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,3})?$/;
230
+        return this.optional(element)||(checkNumber.test(value));
231
+    },"请输入大于0的数字,最多三位小数!");
232
+
233
+    // 自定义验证,验证数字
228 234
     $.validator.addMethod("validNumber",function(value,element, params) {
229 235
         var checkNumber = /^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/;
230 236
         return this.optional(element)||(checkNumber.test(value));

+ 1 - 1
src/main/resources/static/app/intelligent/fumigation/controller/pesticideListModalCtrl.js

@@ -43,7 +43,7 @@ function($scope, $uibModalInstance, $filter, $http, $uibModal, $rootScope, gasDe
43 43
     $scope.searchCondition = {};
44 44
     var orgId = $rootScope.depotInfo.orgId;
45 45
     $scope.storehouseObj = $rootScope.storehouseObj;
46
-    // $scope.searchCondition.vCfCode = items.houseId;
46
+    $scope.searchCondition.vCfCode = items.houseId;
47 47
 
48 48
     // 获取列表数据
49 49
     $scope.loadData = function() {

+ 6 - 0
src/main/resources/static/app/intelligent/fumigation/controller/pesticidePlanCtrl.js

@@ -250,6 +250,12 @@ angular.module('app.intelligent')
250 250
         return this.optional(element)||(checkNumber.test(value));
251 251
     },"请输入正确的数字类型,最多两位小数!");
252 252
 
253
+    // 自定义验证,验证熏蒸次数
254
+    $.validator.addMethod("validFrequency",function(value,element, params) {
255
+        var checkNumber = /^\+?[1-9]\d*$/;
256
+        return this.optional(element)||(checkNumber.test(value));
257
+    },"请输入大于0的整数!");
258
+
253 259
     //根据仓房号赋值仓型和仓房尺寸
254 260
     $scope.storeData = function (houseId) {
255 261
         // 获取仓房信息.仓房id.

+ 3 - 3
src/main/resources/static/app/intelligent/fumigation/views/homework/fumHomeWorkAfter-edit.html

@@ -237,7 +237,7 @@
237 237
                                                     <section>
238 238
                                                         <label class="input">
239 239
                                                             <input class="form-control" type="text" ng-model="fumigationAfter.czsjzyrs"
240
-                                                                   ng-readonly="isNotEdit" name="czsjzyrs" validNumber="true">
240
+                                                                   ng-readonly="isNotEdit" name="czsjzyrs" validFrequency="true">
241 241
                                                         </label>
242 242
                                                     </section>
243 243
                                                 </th>
@@ -283,7 +283,7 @@
283 283
                                                     <section>
284 284
                                                         <label class="input">
285 285
                                                             <input class="form-control" type="text" ng-model="fumigationAfter.czclzyrs"
286
-                                                                   ng-readonly="isNotEdit" name="czclzyrs" validNumber="true">
286
+                                                                   ng-readonly="isNotEdit" name="czclzyrs" validFrequency="true">
287 287
                                                         </label>
288 288
                                                     </section>
289 289
                                                 </th>
@@ -422,7 +422,7 @@
422 422
                                                     <section>
423 423
                                                         <label class="input">
424 424
                                                             <input class="form-control" type="text" ng-model="fumigationAfter.xzhckmd" ng-readonly="isNotEdit"
425
-                                                                   name="xzhckmd" validNumber="true">
425
+                                                                   name="xzhckmd" validFrequency="true">
426 426
                                                         </label>
427 427
                                                     </section>
428 428
                                                 </th>

+ 4 - 4
src/main/resources/static/app/intelligent/fumigation/views/homework/fumHomeWorkProcess-edit.html

@@ -315,7 +315,7 @@
315 315
                                                     <section>
316 316
                                                         <label class="input">
317 317
                                                             <input class="form-control" type="text" ng-model="fumigationProcess.totalSupplementDrugTimes" ng-readonly="isNotEdit"
318
-                                                                   name="totalSupplementDrugTimes" validNumber="true">
318
+                                                                   name="totalSupplementDrugTimes" validFrequency="true">
319 319
                                                         </label>
320 320
                                                     </section>
321 321
                                                 </th>
@@ -622,7 +622,7 @@
622 622
                                                     <section>
623 623
                                                         <label class="input">
624 624
                                                             <input class="form-control" type="text" ng-model="fumigationProcess.mbndwcts" ng-readonly="isNotEdit"
625
-                                                                   name="mbndwcts" placeholder="" validNumber="true">
625
+                                                                   name="mbndwcts" placeholder="" validFrequency="true">
626 626
                                                         </label>
627 627
                                                     </section>
628 628
                                                 </th>
@@ -657,7 +657,7 @@
657 657
                                                     <section>
658 658
                                                         <label class="input">
659 659
                                                             <input class="form-control" type="text" ng-model="fumigationProcess.mbsj" ng-readonly="isNotEdit"
660
-                                                                   name="mbsj" validNumber="true">
660
+                                                                   name="mbsj" validFrequency="true">
661 661
                                                         </label>
662 662
                                                     </section>
663 663
                                                 </th>
@@ -762,7 +762,7 @@
762 762
                                                     <section>
763 763
                                                         <label class="input">
764 764
                                                             <input class="form-control" type="text" ng-model="fumigationProcess.sqcsts"
765
-                                                                   ng-readonly="isNotEdit" name="sqcsts" validNumber="true">
765
+                                                                   ng-readonly="isNotEdit" name="sqcsts" validFrequency="true">
766 766
                                                         </label>
767 767
                                                     </section>
768 768
                                                 </th>

+ 1 - 1
src/main/resources/static/app/intelligent/fumigation/views/plan/fumigationPlan-edit.html

@@ -176,7 +176,7 @@
176 176
 												<section>
177 177
 													<label class="input">
178 178
 														<input class="form-control" type="text" ng-model="fumigation.grainCount"
179
-															   name="grainCount" validNumber="true">
179
+															   name="grainCount" validNumbers="true">
180 180
 													</label>
181 181
 												</section>
182 182
 											</th>

+ 5 - 5
src/main/resources/static/app/intelligent/fumigation/views/plan/pesticidePlan-edit.html

@@ -257,7 +257,7 @@
257 257
 													<section>
258 258
 														<label class="input">
259 259
 															<input class="form-control" type="text" ng-model="pesticide.plannDrugCount"
260
-																   name="plannDrugCount" placeholder="" required>
260
+																   name="plannDrugCount" validNumber="true" required>
261 261
 														</label>
262 262
 													</section>
263 263
 												</th>
@@ -270,7 +270,7 @@
270 270
 													<section>
271 271
 														<label class="input">
272 272
 															<input class="form-control" type="text" ng-model="pesticide.lddwyyl"
273
-																   name="lddwyyl" placeholder="">
273
+																   name="lddwyyl" validNumber="true">
274 274
 														</label>
275 275
 													</section>
276 276
 												</th>
@@ -281,7 +281,7 @@
281 281
 													<section>
282 282
 														<label class="input">
283 283
 															<input class="form-control" type="text" ng-model="pesticide.kjdwyyl"
284
-																   name="kjdwyyl" placeholder="">
284
+																   name="kjdwyyl" validNumber="true">
285 285
 														</label>
286 286
 													</section>
287 287
 												</th>
@@ -307,7 +307,7 @@
307 307
 													<section>
308 308
 														<label class="input">
309 309
 															<input class="form-control" type="text" ng-model="pesticide.settingConcentration"
310
-																   name="settingConcentration" placeholder="" validNumber="true" >
310
+																   name="settingConcentration" validNumber="true" >
311 311
 														</label>
312 312
 													</section>
313 313
 												</th>
@@ -328,7 +328,7 @@
328 328
 												<th>
329 329
 													<section>
330 330
 														<label class="select">
331
-															<select ng-model="pesticide.syff" required name="syff"
331
+															<select ng-model="pesticide.syff" name="syff"
332 332
 																	class="form-control">
333 333
 																<option value="">--请选择--</option>
334 334
 																<option value="0">潮解法</option>