From f726209d50bf3260f7399182ee63a6fef7dc3a04 Mon Sep 17 00:00:00 2001
From: hdw <496960745@qq.com>
Date: 星期二, 06 十一月 2018 11:13:23 +0800
Subject: [PATCH] 给参数设置添加数据范围和验证

---
 gx_tieta/WebRoot/control.jsp |   83 +++++++++++++++++++++++------------------
 1 files changed, 46 insertions(+), 37 deletions(-)

diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index 7e91207..6915364 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -245,7 +245,7 @@
 								<br>
 								<a href="javascript:void(0);" id="sysSet" class="whyc-btn whyc-btn-disabled" id="specialGraphExport">
 									<span class="whyc-btn-icon fa fa-gear"></span>
-									<span class="whyc-btn-txt">璁剧疆绯荤粺鍙傛暟</span>
+									<span class="whyc-btn-txt">绯荤粺鍙傛暟</span>
 								</a>
 					        </div>
 						</div>
@@ -955,6 +955,10 @@
 		<div class="popup-title"><span>绯荤粺鍙傛暟璁剧疆</span> <a href="javascript:;" class="close">X</a></div>
 		<div class="popup-content">
 			<div class="popup-tbl">
+				<input type="hidden" id="sysSet_ip" value="">		<!-- IP鍦板潃 -->
+				<input type="hidden" id="sysSet_subnet" value=""> 	<!-- 瀛愮綉鎺╃爜 -->
+				<input type="hidden" id="sysSet_netgate" value=""> 	<!-- 缃戝叧鍦板潃 -->
+				<input type="hidden" id="sysSet_mac" value=""> 	<!-- 鐗╃悊鍦板潃 -->
 				<table>
 					<tbody>
 						<tr>
@@ -966,40 +970,24 @@
 							<td><input type="text" id="sysSet_stationName" readonly="readonly" value=""></td>
 						</tr>
 						<tr>
-							<th>IP鍦板潃</th>
-							<th>瀛愮綉鎺╃爜</th>
-						</tr>
-						<tr>
-							<td><input type="text" id="sysSet_ip" readonly="readonly" value=""></td>
-							<td><input type="text" id="sysSet_subnet" readonly="readonly" value=""></td>
-						</tr>
-						<tr>
-							<th>缃戝叧鍦板潃</th>
-							<th>鐗╃悊鍦板潃</th>
-						</tr>
-						<tr>
-							<td><input type="text" id="sysSet_netgate" readonly="readonly" value=""></td>
-							<td><input type="text" id="sysSet_mac" readonly="readonly" value=""></td>
-						</tr>
-						<tr>
-							<th>鎬荤画鑸椂闂�</th>
-							<th>淇濅竴娆′笅鐢电画鑸椂闂�</th>
+							<th>鎬荤画鑸椂闂达紙0~9999鍒嗛挓锛�</th>
+							<th>淇濅竴娆′笅鐢电画鑸椂闂达紙0~9999鍒嗛挓锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="sysSet_endur" value=""></td>
 							<td><input type="text" id="sysSet_firTime" value=""></td>
 						</tr>
 						<tr>
-							<th>鐢垫祦閽抽噺绋�</th>
-							<th>涓�娆′笅鐢电數鍘�(V)</th>
+							<th>鐢垫祦閽抽噺绋嬶紙10~9999A锛�</th>
+							<th>涓�娆′笅鐢电數鍘嬶紙35.0~65.0V锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="sysSet_range" value=""></td>
 							<td><input type="text" id="sysSet_firVol" value=""></td>
 						</tr>
 						<tr>
-							<th>浜屾涓嬬數鐢靛帇(V)</th>
-							<th>DCDC妯″潡鏁伴噺</th>
+							<th>浜屾涓嬬數鐢靛帇锛�35.0~65.0V锛�</th>
+							<th>DCDC妯″潡鏁伴噺锛�1~10锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="sysSet_secVol" value=""></td>
@@ -1007,27 +995,38 @@
 						</tr>
 						<tr>
 							<th>鍗曚綋鏁版嵁鏉ユ簮绫诲瀷</th>
-							<th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺</th>
+							<th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺锛�0~2锛�</th>
 						</tr>
 						<tr>
-							<td><input type="text" id="sysSet_sourceStyle" value=""></td>
+							<td>
+								<select id="sysSet_sourceStyle">
+									<option value="0">浠庢眹闆嗗櫒鑾峰彇</option>
+									<option value="1">浠庝竴鎷�24鑾峰彇</option>
+								</select>
+							</td>
 							<td><input type="text" id="sysSet_bleedNum" value=""></td>
 						</tr>
 						<tr>
-							<th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬬粓姝㈢數鍘嬩笅闄�(V)</th>
-							<th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬪惎鍔ㄧ數鍘嬩笅闄�(V)</th>
+							<th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬬粓姝㈢數鍘嬩笅闄愶紙35.0~65.0V锛�</th>
+							<th>鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬪惎鍔ㄧ數鍘嬩笅闄愶紙35.0~65.0V锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="sysSet_stopLimit" value=""></td>
 							<td><input type="text" id="sysSet_startLimit" value=""></td>
 						</tr>
 						<tr>
-							<th>鐢垫睜鍚堣矾鍣ㄤ富鐢垫睜缁勭紪鍙�</th>
-							<th>鑳屽厜鏃堕暱</th>
+							<th>鐢垫睜鍚堣矾鍣ㄤ富鐢垫睜缁勭紪鍙凤紙1~2锛�</th>
+							<th>鑳屽厜鏃堕暱锛�0~999鍒嗛挓锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="sysSet_groupNum" value=""></td>
 							<td><input type="text" id="sysSet_backLightTime" value=""></td>
+						</tr>
+						<tr>
+							<th>鍋滅數鍏呯數鐢垫祦锛�0~50A锛�</th>
+						</tr>
+						<tr>
+							<td><input type="text" id="sysSet_powerBreakChargeCurr" value=""></td>
 						</tr>
 					</tbody>
 				</table>
@@ -1036,7 +1035,7 @@
 		<div class="popup-footer">
 			<input type="button" name="" id="sysSet_restart" value="閲嶅惎璁惧" >
 			<input type="button" name="" id="sysSet_read" value="璇诲彇" >							
-			<input type="button" name="" id="sysSet_en" class="status-change-set" value="璁剧疆" >
+			<input type="button" name="" id="sysSet_en" class="status-change-set " value="璁剧疆" >
 		</div>
 	</div>
 	
@@ -1142,6 +1141,7 @@
 	<script type="text/javascript" src="js/dischargetest/9611.js"></script>
 	<script type="text/javascript" src="js/dischargetest/bts.js"></script>
 	<script type="text/javascript" src="js/dischargetest/4016.js"></script>
+	<script type="text/javascript" src="js/dischargetest/sysData.js"></script>
 	<script type="text/javascript" src="pages/js/pages/control-common.js"></script>
 	<script type="text/javascript" src="pages/js/pages/siderbar.js"></script>
 	<!-- 寮曞叆鐢佃矾鍥� -->
@@ -4509,8 +4509,11 @@
 			
 			// 璁剧疆
 			$('#sysSet_en').click(function() {
+				// 鍒ゆ柇褰撳墠鎸夐挳鏄惁鍙互鐐瑰嚮
+				if($(this).hasClass('whyc-btn-disabled')) {
+					return;
+				}
 				var tmp = getSysSetData();
-				
 				updateSysData(tmp);
 			});
 			
@@ -4545,6 +4548,8 @@
 			function searchSysData(temp, showSU) {
 				// 寮�鍚瓑寰呮
 				var load = layer.load(1);
+				// 璁剧疆鎸夐挳鏃犳硶鍙偣.whyc-btn-disabled
+				$('#sysSet_en').addClass('whyc-btn-disabled');
 				// 璇锋眰鍚庡彴
 				$.ajax({
 		            type: "post",
@@ -4558,6 +4563,10 @@
 		                if(rs.code == 1){
 		                	var data = rs.data[0];
 		                	setSysSetData(data);
+		                	// 绉婚櫎涓嶅彲鐐瑰嚮鐘舵��
+		                	initSysDataPopup();
+		                	$('#sysSet_en').removeClass('whyc-btn-disabled');
+		                	sysSet_popup.showPopup();
 		                	if(showSU) {
 		                		noContent.showNoContent('璇诲彇鎴愬姛', true);
 		                	}
@@ -4588,7 +4597,7 @@
 		            data: "json = " + JSON.stringify(temp),
 		            success: function(result) {
 		                var rs = JSON.parse(result.result);
-		                console.info(rs);
+		                //console.info(rs);
 		                if(rs.code == 1){
 		                	noContent.showNoContent('鏇存柊鎴愬姛', true);
 		                }else{
@@ -4655,13 +4664,12 @@
 				$('#sysSet_secVol').val(data.MonomerOrder);			// 浜屾涓嬬數鐢靛帇
 				$('#sysSet_dcdc').val(data.LoaderCount);			// DCDC妯″潡鏁伴噺
 				$('#sysSet_sourceStyle').val(data.DtCardCount);		// 鍗曚綋鏁版嵁鏉ユ簮绫诲瀷
-				$('#sysSet_bleedNum').val(data.PowerBreakChargeCurr);		// 鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺
+				$('#sysSet_bleedNum').val(data.POF_BG_Boost_Cnt);		// 鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺
 				$('#sysSet_stopLimit').val(data.POF_BG_Boost_VolStop);		// 鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬬粓姝㈢數鍘嬩笅闄�
 				$('#sysSet_startLimit').val(data.POF_BG_Boost_VolStart);		// 鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬪惎鍔ㄧ數鍘嬩笅闄�
 				$('#sysSet_groupNum').val(data.MajorBattGroupNum);	// 鐢垫睜鍚堣矾鍣ㄤ富鐢垫睜缁勭紪鍙�
 				$('#sysSet_backLightTime').val(data.BackLightTime);					// 鑳屽厜鏃堕棿
-				
-				sysSet_popup.showPopup();
+				$('#sysSet_powerBreakChargeCurr').val(data.PowerBreakChargeCurr);	//  鍋滅數鍏呯數鐢垫祦
 			}
 			
 			// 鑾峰彇闈㈡澘淇℃伅鐨勫��
@@ -4684,7 +4692,7 @@
 				var startLimit = $('#sysSet_startLimit').val();			// 鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬪惎鍔ㄧ數鍘嬩笅闄�
 				var groupNum = $('#sysSet_groupNum').val();				// 鐢垫睜鍚堣矾鍣ㄤ富鐢垫睜缁勭紪鍙�
 				var backLightTime = $('#sysSet_backLightTime').val();					// 鑳屽厜鏃堕棿
-				
+				var powerBreakChargeCurr = $('#sysSet_powerBreakChargeCurr').val();	//  鍋滅數鍏呯數鐢垫祦
 				
 				var rs = {
 					dev_id: dev_id,
@@ -4699,11 +4707,12 @@
 					MonomerOrder: secVol,
 					LoaderCount: dcdc,
 					DtCardCount: sourceStyle,
-					PowerBreakChargeCurr:bleedNum,
+					POF_BG_Boost_Cnt:bleedNum,
 					POF_BG_Boost_VolStop:stopLimit,
 					POF_BG_Boost_VolStart:startLimit,
 					MajorBattGroupNum:groupNum,
 					BackLightTime:backLightTime,
+					PowerBreakChargeCurr: powerBreakChargeCurr,
 					num: sysCMD.set
 				};
 				

--
Gitblit v1.9.1