From 1ccbb80c201e4ddc43fc55f3e8dd8eb4ec7c4967 Mon Sep 17 00:00:00 2001
From: didiyu <1293722656@qq.com>
Date: 星期四, 29 十一月 2018 11:29:04 +0800
Subject: [PATCH] 加

---
 gx_tieta/WebRoot/control.jsp |  104 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 89 insertions(+), 15 deletions(-)

diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp
index 865aa6c..bffa62a 100644
--- a/gx_tieta/WebRoot/control.jsp
+++ b/gx_tieta/WebRoot/control.jsp
@@ -1074,58 +1074,60 @@
 		<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="battInfo_dev_id" value="">		<!-- dev_id -->
+				<input type="hidden" id="battInfo_ip" value="">		<!-- IP鍦板潃 -->
 				<table>
 					<tbody>
 						<tr>
-							<th>鏈烘埧ID</th>
+							<th>璁惧ID</th>
 							<th>鏈烘埧鍚嶇О</th>
 						</tr>
 						<tr>
-							<td><input type="text" id="battInfo_home_id"  readonly="readonly" value=""></td>
+							<td><input type="text" id="battInfo_fbs_id"  readonly="readonly" value=""></td>
 							<td><input type="text" id="battInfo_home_name" readonly="readonly" value=""></td>
 						</tr>
 						<tr>
-							<th>鐢垫睜鏍囩О瀹归噺(AH)</th>
-							<th>鐢垫睜鏍囩О鍐呴樆(u惟)</th>
+							<th>鐢垫睜鏍囩О瀹归噺锛�1~6000.0AH锛�</th>
+							<th>鐢垫睜鏍囩О鍐呴樆锛�1~60000u惟锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="battInfo_nom_cap" value=""></td>
 							<td><input type="text" id="battInfo_nom_res" value=""></td>
 						</tr>
 						<tr>
-							<th>鐢垫睜缁勬暟</th>
-							<th>姣忕粍鐢垫睜鍗曚綋鏁伴噺</th>
+							<th>鐢垫睜缁勬暟锛�1~2锛�</th>
+							<th>姣忕粍鐢垫睜鍗曚綋鏁伴噺锛�1~300 锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="battInfo_batt_num" value=""></td>
 							<td><input type="text" id="battInfo_batt_mon_num" value=""></td>
 						</tr>
 						<tr>
-							<th>鍗曚綋鏍囩О鐢靛帇锛圴锛�</th>
-							<th>鐢垫睜缁勭鏍囩О鐢靛帇锛圴锛�</th>
+							<th>鍗曚綋鏍囩О鐢靛帇锛�0.1~20.0V锛�</th>
+							<th>鐢垫睜缁勭鏍囩О鐢靛帇锛�0.1~600.0V锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="battInfo_batt_nom_vol" value=""></td>
 							<td><input type="text" id="battInfo_group_nom_vol" value=""></td>
 						</tr>
 						<tr>
-							<th>鐢垫睜鏍囩О娓╁害锛堚剝锛�</th>
-							<th>鐢垫睜娴厖鐢靛帇闃�鍊硷紙V锛�</th>
+							<th>鐢垫睜鏍囩О娓╁害锛�0.1~60.0鈩冿級</th>
+							<th>鐢垫睜娴厖鐢靛帇闃�鍊硷紙0.1~60.0V锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="battInfo_batt_nom_temp" value=""></td>
 							<td><input type="text" id="battInfo_batt_float_vol" value=""></td>
 						</tr>
 						<tr>
-							<th>鐢垫睜娴厖鐢垫祦闃�鍊硷紙A锛�</th>
-							<th>鍦ㄧ嚎鐢靛帇浣庨榾鍊硷紙V锛�</th>
+							<th>鐢垫睜娴厖鐢垫祦闃�鍊硷紙0.1~30.0A锛�</th>
+							<th>鍦ㄧ嚎鐢靛帇浣庨榾鍊硷紙0.1~60.0V锛�</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="battInfo_batt_float_curr" value=""></td>
 							<td><input type="text" id="battInfo_online_low_vol" value=""></td>
 						</tr>
 						<tr>
-							<th>鐢垫睜缁勮繛鎺ョ被鍨�</th>
+							<th>鐢垫睜缁勮繛鎺ョ被鍨�(0~1)</th>
 						</tr>
 						<tr>
 							<td><input type="text" id="battInfo_batt_link_type" value=""></td>
@@ -1136,7 +1138,7 @@
 		</div>
 		<div class="popup-footer">
 			<input type="button" name="" id="battInfo_read" value="璇诲彇" >							
-			<input type="button" name="" id="battInfo_en" class="status-change-set " value="璁剧疆" >
+			<input type="button" name="" id="battInfo_en" class="status-change-set whyc-btn-disabled" value="璁剧疆" >
 		</div>
 	</div>
 	
@@ -1247,6 +1249,7 @@
 	<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="js/dischargetest/battData.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>
 	<script type="text/javascript" src="js/rightmenu.js"></script>
@@ -5146,9 +5149,80 @@
 			
 			
 			// 鐢垫睜鍙傛暟
+			var battCMD = GLOBAL.CMD.batt;	// cmd鍛戒护
+			var battPopup = GLOBAL.battInfoPopup; // 鐢垫睜鍙傛暟妯″潡
+			battPopup.testVal();	// 璁剧疆闈㈡澘鐨勫彇鍊艰寖鍥�
 			$('#battInfoBtn').click(function() {
-				battInfo_popup.showPopup();	// 鏄剧ずbattInfo_popup寮瑰嚭妗嗗拰閬僵灞�
+				// 鑾峰彇鐢垫睜淇℃伅
+				var batt = getBatt();
+				var temp = {
+					dev_id: batt.FBSDeviceId
+				};
+				
+				// 鏌ヨ鐢垫睜鍙傛暟闈㈡澘淇℃伅
+				var load = layer.load(1);
+				battPopup.search(temp, batt, function(res, binf) {
+					layer.close(load);
+					battInfo_popup.showPopup();	// 鏄剧ずbattInfo_popup寮瑰嚭妗嗗拰閬僵灞�
+				});
+				
 			});
+			
+			// 鐐瑰嚮璁惧畾
+			$('#battInfo_en').click(function() {
+				if($(this).hasClass('whyc-btn-disabled')) {
+					return;
+				}
+				// 璁剧疆鐢垫睜鍙傛暟闈㈡澘淇℃伅
+				var load = layer.load(1);
+				battPopup.set(function(res) {
+					layer.close(load);
+					layer.msg(res.msg);
+				});
+			});
+			
+			// 鐐瑰嚮璇诲彇
+			$('#battInfo_read').click(function() {
+				var batt = getBatt();
+				var temp = {
+					dev_id: batt.FBSDeviceId
+				};
+				// 璁剧疆鐢垫睜鍙傛暟闈㈡澘淇℃伅
+				var load = layer.load(1);
+				battPopup.read(function(res) {
+					layer.close(load);
+					// console.log(res);
+					if(res.code == 1) {
+						battPopup.search(temp, batt, function(res, binf) {
+							layer.close(load);
+							layer.msg('鑾峰彇鍙傛暟鎴愬姛');
+						});
+					}else {
+						layer.msg('鑾峰彇鍙傛暟澶辫触');	
+					}
+					
+				});
+			});
+			
+			// 鏌ヨ鐢垫睜鍙傛暟鐨勫��
+			function searchBattInfo(temp, binf) {
+				var load = layer.load(1);
+				// 鏌ヨ鐢垫睜鍙傛暟
+				$.ajax({
+					type: 'post'
+					,async: true
+					,url:'Fbs9100_battparamAction_action_serchByCondition'
+					,data: 'json='+JSON.stringify(temp)
+					,dataType: 'json'
+					,success: function(res) {
+						var rs = JSON.parse(res.result);
+						//console.log(rs);
+					}
+					,complete: function() {
+						layer.close(load);
+					}
+				});
+			}
 		});
 		
 		// 鏈哄巻鍗℃ā鍧�

--
Gitblit v1.9.1