Ver código fonte

fix: 日常检查

maopixin 2 anos atrás
pai
commit
f1a0a0acd6

+ 51 - 1
src/main/resources/static/app/storage/controller/dailyListCtrl.js

@@ -214,6 +214,10 @@ angular.module('app.storage')
214 214
             $scope.dailycheck.rchygiene = "正常";
215 215
             $scope.dailycheck.rccorridor = "正常";
216 216
             $scope.dailycheck.ratfinchCheck = "0";//鼠雀检查
217
+            $scope.dailycheck.sfjl = 0;//是否结露
218
+            $scope.dailycheck.lsmbqk = 0;//粮食霉变情况
219
+            $scope.dailycheck.cfywxl = 0;//仓房有无渗漏
220
+            $scope.dailycheck.sffc = 0;//是否返潮:
217 221
         }
218 222
 
219 223
 
@@ -260,4 +264,50 @@ angular.module('app.storage')
260 264
             return currentdate;
261 265
         }
262 266
 
263
-    })
267
+    })
268
+	.directive('onlynumber', function($parse) {
269
+		return {  
270
+			link: function (scope, element, attrs, ctrl) {  
271
+				//控制输入框只能输入数字和小数点  
272
+				function limit(){  
273
+					var limitV=element[0].value;  
274
+					limitV=limitV.replace(/[^0-9.]/g,"");
275
+					//处理0开头的整数
276
+					if ((/^0+[0-9]+$/).test(limitV)) {
277
+						limitV=limitV.replace(/\b(0+)/gi,"");
278
+					}
279
+					//限定小数点后的位数
280
+					var digits =  attrs['digits']?Number(attrs['digits']):2;
281
+					if (limitV*Math.pow(10,digits)%1!=0) {
282
+						var index = limitV.indexOf('.');
283
+						var last = index+digits+1;
284
+						limitV = (""+limitV).substring(0,last);
285
+					}
286
+					element[0].value=limitV;  
287
+					$parse(attrs['ngModel']).assign(scope, limitV);
288
+					// format();
289
+				}  
290
+			
291
+				//对输入数字的整数部分插入千位分隔符  
292
+				function format(){  
293
+					var formatV=element[0].value;  
294
+					var array=new Array();  
295
+					array=formatV.split(".");  
296
+					var re=/(-?\d+)(\d{3})/;  
297
+					while(re.test(array[0])){  
298
+						array[0]=array[0].replace(re,"$1,$2")  
299
+					}  
300
+					var returnV=array[0];  
301
+					for(var i=1;i<array.length;i++){  
302
+						returnV+="."+array[i];  
303
+					}  
304
+					element[0].value=returnV;  
305
+					$parse(attrs['ngModel']).assign(scope, formatV);
306
+				}  
307
+			
308
+				scope.$watch(attrs.ngModel,function(){
309
+					limit();
310
+				})
311
+			}  
312
+		};
313
+  	})

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

@@ -77,7 +77,60 @@
77 77
 
78 78
 											</label>
79 79
 										</section>
80
-
80
+										<section class="col col-3">
81
+											<label>保管员:<span style="color: red;">*</span></label>
82
+											<label class="input" style="padding-top:5px;">
83
+												<input type="text" ng-model="dailycheck.bgy" name="bgy" ng-readonly="isNotEdit"
84
+													   placeholder="保管员" required>
85
+											</label>
86
+										</section>
87
+										<section class="col col-3">
88
+											<label>参与人员:<span style="color: red;">*</span></label>
89
+											<label class="input" style="padding-top:5px;">
90
+												<input type="text" ng-model="dailycheck.cyry" name="cyry" ng-readonly="isNotEdit"
91
+													   placeholder="参与人员" required>
92
+											</label>
93
+										</section>
94
+									</div>
95
+									<div class="row">
96
+										<section class="col col-3">
97
+											<label>天气情况:</label>
98
+											<label class="input" style="padding-top:5px;">
99
+												<input type="text" ng-model="dailycheck.tqqk" name="tqqk" ng-readonly="isNotEdit" placeholder="天气情况" maxlength="30">
100
+											</label>
101
+										</section>
102
+										<section class="col col-3">
103
+											<label>粮温℃:</label>
104
+											<label class="input" style="padding-top:5px;">
105
+												<input type="text" ng-model="dailycheck.lw" name="lw" ng-readonly="isNotEdit" placeholder="粮温℃" onlynumber digits="1">
106
+											</label>
107
+										</section>
108
+										<section class="col col-3">
109
+											<label>仓温℃:</label>
110
+											<label class="input" style="padding-top:5px;">
111
+												<input type="text" ng-model="dailycheck.cw" name="cw" ng-readonly="isNotEdit" placeholder="仓温℃" onlynumber digits="1">
112
+											</label>
113
+										</section>
114
+										<section class="col col-3">
115
+											<label>气温℃:</label>
116
+											<label class="input" style="padding-top:5px;">
117
+												<input type="text" ng-model="dailycheck.qw" name="qw" ng-readonly="isNotEdit" placeholder="气温℃" onlynumber digits="1">
118
+											</label>
119
+										</section>
120
+									</div>
121
+									<div class="row">
122
+										<section class="col col-3">
123
+											<label>仓内湿%:</label>
124
+											<label class="input" style="padding-top:5px;">
125
+												<input type="text" ng-model="dailycheck.cns" name="cns" ng-readonly="isNotEdit" placeholder="仓内湿%" onlynumber digits="1">
126
+											</label>
127
+										</section>
128
+										<section class="col col-3">
129
+											<label>仓外湿%:</label>
130
+											<label class="input" style="padding-top:5px;">
131
+												<input type="text" ng-model="dailycheck.cws" name="cws" ng-readonly="isNotEdit" placeholder="仓外湿%" onlynumber digits="1">
132
+											</label>
133
+										</section>
81 134
 									</div>
82 135
 								</fieldset>
83 136
 								<header>虫害检查</header>
@@ -135,14 +188,28 @@
135 188
 											</label>
136 189
 										</section>
137 190
 										<section class="col col-3">
138
-											<span>其它检查:</span>
139
-											<label class="input" style="padding-top: 8px;">
140
-												<input type="text" ng-model="dailycheck.otherCheck" name="otherCheck" ng-disabled="isNotEdit"
141
-													   placeholder="其它检查">
142
-
191
+											<label class="select">
192
+												<label class="label" >是结露:</label>
193
+												<label class="select">
194
+													<select 
195
+														name="sfjl"
196
+														ng-model="dailycheck.sfjl"
197
+														ng-disabled="isNotEdit"
198
+														ng-options="x.value as x.label for x  in [{value:0,label:'无'},{value:1,label:'有'}]"
199
+													>
200
+														<option value="">--请选择--</option>
201
+													</select> <i></i> </label>
202
+											</label>
203
+										</section>
204
+										<section class="col col-3">
205
+											<label class="select">
206
+												<label class="label" >粮食霉变情况:</label>
207
+												<label class="select">
208
+													<select name="lsmbqk" ng-model="dailycheck.lsmbqk"  ng-disabled="isNotEdit" ng-options="x.value as x.label for x  in [{value:0,label:'无'},{value:1,label:'有'}]">
209
+														<option value="">--请选择--</option>
210
+													</select> <i></i> </label>
143 211
 											</label>
144 212
 										</section>
145
-
146 213
 									</div>
147 214
 									<div class="row">
148 215
 										<section class="col col-3">
@@ -166,6 +233,15 @@
166 233
 													   placeholder="灯">
167 234
 											</label>
168 235
 										</section>
236
+										<section class="col col-3">
237
+											<label class="select">
238
+												<label class="label" >仓房有无渗漏:</label>
239
+												<label class="select">
240
+													<select name="cfywxl" ng-model="dailycheck.cfywxl"  ng-disabled="isNotEdit" ng-options="x.value as x.label for x  in [{value:0,label:'无'},{value:1,label:'有'}]">
241
+														<option value="">--请选择--</option>
242
+													</select> <i></i> </label>
243
+											</label>
244
+										</section>
169 245
 									</div>
170 246
 									<div class="row">
171 247
 										<section class="col col-3">
@@ -182,7 +258,22 @@
182 258
 													   placeholder="查粮走道">
183 259
 											</label>
184 260
 										</section>
185
-
261
+										<section class="col col-3">
262
+											<label class="select">
263
+												<label class="label" >是否返潮:</label>
264
+												<label class="select">
265
+													<select name="sffc" ng-model="dailycheck.sffc"  ng-disabled="isNotEdit" ng-options="x.value as x.label for x  in [{value:0,label:'无'},{value:1,label:'有'}]">
266
+														<option value="">--请选择--</option>
267
+													</select> <i></i> </label>
268
+											</label>
269
+										</section>
270
+										<section class="col col-3">
271
+											<span>其它检查:</span>
272
+											<label class="input" style="padding-top: 8px;">
273
+												<input type="text" ng-model="dailycheck.otherCheck" name="otherCheck" ng-disabled="isNotEdit"
274
+													   placeholder="其它检查">
275
+											</label>
276
+										</section>
186 277
 									</div>
187 278
 									<div class="row">
188 279
 										<section class="col col-10" style="width:100%">