From 36dcc192d70e52978e78c9b6e6cebec62a20fa51 Mon Sep 17 00:00:00 2001
From: whyclj <1525436766@qq.com>
Date: 星期四, 10 一月 2019 15:13:55 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/WebRoot/js/buildNav.js                   |    1 
 gx_tieta/WebRoot/iframe/setcurr.html              |   11 +
 gx_tieta/WebRoot/sys-set-test.jsp                 |  284 ++++++++++++++++++++++++++++++++++++++--
 gx_tieta/WebRoot/mobil/index.html                 |   15 +
 gx_tieta/WebRoot/mobil/wcheckAccept.html          |    3 
 gx_tieta/WebRoot/mobil/wcheckAccept-index.html    |    9 
 gx_tieta/WebRoot/mobil/wapprovalBatt-index.html   |    6 
 gx_tieta/WebRoot/mobil/batt-approve-index.html    |    2 
 gx_tieta/WebRoot/mobil/hcheckAccpet-index.html    |   26 ++-
 gx_tieta/WebRoot/mobil/batt-unapproved-index.html |    2 
 gx_tieta/WebRoot/mobil/wapprovalBatt.html         |    3 
 gx_tieta/WebRoot/batch-set-curr.jsp               |   11 
 12 files changed, 328 insertions(+), 45 deletions(-)

diff --git a/gx_tieta/WebRoot/batch-set-curr.jsp b/gx_tieta/WebRoot/batch-set-curr.jsp
index 582651d..711c159 100644
--- a/gx_tieta/WebRoot/batch-set-curr.jsp
+++ b/gx_tieta/WebRoot/batch-set-curr.jsp
@@ -537,13 +537,12 @@
 						,{field:'StationName', title:'鏈烘埧鍚嶇О', align:'center', width: 470}
 						,{field:'BattGroupId', title:'鐢垫睜缁処D', align:'center', width: 160}
 						,{field:'BattGroupName', title:'鐢垫睜缁勫悕绉�', align:'center', width: 160}
-						,{field:'devStatus', title:'璁惧鐘舵��', templet: '#devStatus', align:'center', width: 600}
+						,{field:'devStatus', title:'璁惧鐘舵��', templet: '#devStatus', align:'center', width: 700}
 						,{field:'testTime', title:'宸叉祴鏃堕暱', templet: '#testTime', align:'center', width: 140}
 						,{field:'signalNum', title:'閫氫俊璁℃暟', templet: '#signalNum', align:'center', width: 140}
 						,{field:'StationName9', title:'璁惧鐗堟湰鍙�', align:'center', width: 160}
-						,{field:'MonCount', title:'鍗曚綋鏁伴噺', align:'center', width: 100}
+						,{field:'Load_curr', title:'璐熻浇鐢垫祦', align:'center', width: 100}
 						,{field:'MonCapStd', title:'鏍囩О瀹归噺', align:'center', width: 100}
-						,{field:'MonVolStd', title:'鏍囩О鍗曚綋鐢靛帇', align:'center', width: 140}
 						,{field:'doThings', fixed: 'right', title: '璁剧疆鐘舵��', toolbar: '#setStatus', align: 'center', width: 160}
 				    ]]
 					,data:[]
@@ -855,7 +854,7 @@
 	            
 	            // 鏋勯�犳壒閲忚缃斁鐢靛弬鏁扮殑鏂规硶
 	            function getSetCurrParam(data, ratio) {
-	            	//console.log(data);
+	            	// console.log(data);
 	            	var rs = [];
 	            	for(var i=0; i<data.length; i++) {
 	            		var _data = data[i];
@@ -1181,12 +1180,14 @@
 									if(_data.dev_workstate ==0 && _data.dev_res_test_state != 0) {
 										index = 3;
 									}
+									var monCap = _data.dev_captest_cap==0?_data.dev_captest_cap:_data.dev_captest_cap.toFixed(1);
 									// 璁剧疆璁惧鐘舵�佸瓧绗︿覆
 									str = "鐘舵��:"	+ workStates[index]+
 										  ",鍛婅:"+alarmStates[_data.dev_alarmstate]+
 										  ",缁勭鐢靛帇(V):"+_data.dev_captest_groupvol+
+										  ",鍦ㄧ嚎鐢靛帇(V):"+_data.dev_captest_onlinevol+
 										  ",鐢垫祦(A):"+_data.dev_captest_curr+
-										  ",瀹归噺(AH):"+_data.dev_captest_cap;
+										  ",瀹归噺(AH):"+monCap;
 									// 璁剧疆璁惧鍐呴樆娴嬭瘯鐨勫瓧绗︿覆
 									if(index == 3){
 								 		str = "鐘舵��:"+workStates[index]+
diff --git a/gx_tieta/WebRoot/iframe/setcurr.html b/gx_tieta/WebRoot/iframe/setcurr.html
index 951acf5..ae6cc35 100644
--- a/gx_tieta/WebRoot/iframe/setcurr.html
+++ b/gx_tieta/WebRoot/iframe/setcurr.html
@@ -36,6 +36,13 @@
 			<button class="layui-btn layui-btn-sm layui-btn-normal">鏈缃�</button>
 		{{# } }}
 	</script>
+	<script type="text/html" id="BattGroupNum">
+		{{# if(d.BattGroupNum == 1) { }}
+			鐢垫睜缁�1
+		{{# }else { }}
+			鐢垫睜缁�2
+		{{# } }}
+	</script>
     <script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
     <script type="text/javascript" src="../js/base.js"></script>
     <script type="text/javascript" src="../src/layui.js"></script>
@@ -52,7 +59,7 @@
             
             var setCurr = parent.$('#setCurrIframe').data('setCurr');
             var addBattStr = parent.$('#setCurrIframe').data('addBattStr');
-            console.log(addBattStr);
+            //console.log(setCurr);
             // 琛ㄦ牸妯″潡
 			var tOptions = {
 				elem: '#pageTbl'
@@ -63,7 +70,7 @@
 					{type:'checkbox',fixed: 'left'}
 					,{field:'dev_id', title:'璁惧ID', align:'center', width: 140}
 					,{field:'StationName', title:'鏈烘埧鍚嶇О', align:'center', width: 480}
-					,{field:'BattGroupNum', title:'鐢垫睜缁勭储寮�', align:'center', width: 140}
+					,{field:'BattGroupNum', title:'鐢垫睜缁勫悕绉�', templet:'#BattGroupNum', align:'center', width: 140}
 					,{field:'DisCurr', title:'鏀剧數鐢垫祦锛圓锛�', align:'center', width: 160}
 					,{field:'DisCap', title:'鏀剧數瀹归噺锛圓H锛�', align:'center', width: 160}
 					,{field:'DisTime', title:'鏀剧數鏃堕暱锛堝垎閽燂級', align:'center', width: 160}
diff --git a/gx_tieta/WebRoot/js/buildNav.js b/gx_tieta/WebRoot/js/buildNav.js
index 1e23f7c..487f276 100644
--- a/gx_tieta/WebRoot/js/buildNav.js
+++ b/gx_tieta/WebRoot/js/buildNav.js
@@ -64,6 +64,7 @@
      	{permit_item_name:'install_look_permit',num:82},		//鍩虹珯瀹夎瀹℃壒
      	{permit_item_name:'batt_discharge_model_permit',num:83},		//BTS璁惧鍗囩骇
      	{permit_item_name:'batt_discharge_model_permit',num:84},		//鎵归噺鐢垫睜缁勫弬鏁拌缃�
+     	{permit_item_name:'batt_discharge_model_permit',num:85},		//鎵归噺绯荤粺鍙傛暟璁剧疆
      	
      	{permit_item_name:'batt_alm_param_query_permit',num:31}, // 鐢垫睜鍛婅鍙傛暟璁剧疆
      	{permit_item_name:'batt_alm_param_query_permit',num:66} // 璁惧鍛婅鍙傛暟璁剧疆
diff --git a/gx_tieta/WebRoot/mobil/batt-approve-index.html b/gx_tieta/WebRoot/mobil/batt-approve-index.html
index 7b69220..5dd2a1d 100644
--- a/gx_tieta/WebRoot/mobil/batt-approve-index.html
+++ b/gx_tieta/WebRoot/mobil/batt-approve-index.html
@@ -102,7 +102,7 @@
 		var arrdata = new Array();
 		
 		var Page = {
-			pageSize:20, 				//姣忛〉鐨勮鏁�
+			pageSize:100, 				//姣忛〉鐨勮鏁�
 			pageCurr:1,  				//褰撳墠椤电爜鏁�
 			pageAll:0,
 		};
diff --git a/gx_tieta/WebRoot/mobil/batt-unapproved-index.html b/gx_tieta/WebRoot/mobil/batt-unapproved-index.html
index 4e67438..74426ce 100644
--- a/gx_tieta/WebRoot/mobil/batt-unapproved-index.html
+++ b/gx_tieta/WebRoot/mobil/batt-unapproved-index.html
@@ -75,7 +75,7 @@
 		var arrdata = new Array();
 		
 		var Page = {
-			pageSize:20, 				//姣忛〉鐨勮鏁�
+			pageSize:100, 				//姣忛〉鐨勮鏁�
 			pageCurr:1,  				//褰撳墠椤电爜鏁�
 			pageAll:0,
 		};
diff --git a/gx_tieta/WebRoot/mobil/hcheckAccpet-index.html b/gx_tieta/WebRoot/mobil/hcheckAccpet-index.html
index 7bffaee..aad45b6 100644
--- a/gx_tieta/WebRoot/mobil/hcheckAccpet-index.html
+++ b/gx_tieta/WebRoot/mobil/hcheckAccpet-index.html
@@ -64,7 +64,14 @@
 				aLi = $(this).index();
 				console.info(aLi);
 				console.info(stationlist);
-				station = getbatt(stationlist,aLi);
+				var pagecurr = $(this).find('a').attr('value');
+				var index = 0;
+				for(var i=0;i<(pagecurr-1);i++){
+					index +=pageindexNum[i]; 
+				}
+				index += aLi;
+				//console.info(index);
+				station = getbatt(stationlist,index);
 				var arr=setarrbatt(arrdata,station);
 				console.info(arr);
 				if(arr){
@@ -75,7 +82,7 @@
 		
 		var arrTd = new Array();
 		var arrdata = new Array();
-		
+		var pageindexNum = new Array();//鐢变簬杩囨护閲嶅鏈烘埧锛屽垎椤靛け鏁堬紝瀛樺偍姣忛〉鏈烘埧涓暟銆�
 		var Page = {
 			pageSize:20, 				//姣忛〉鐨勮鏁�
 			pageCurr:1,  				//褰撳墠椤电爜鏁�
@@ -118,19 +125,21 @@
 		 					arrdata.push(data[i]);//瀛樺偍鏁版嵁
 		 					if(model.length==0){
 		 						model.push(data[i].binf.StationName);
+		 						stationlist.push(data[i].binf.StationName);
 		 					}else{
 		 						if(model[model.length-1]!=data[i].binf.StationName){//鑻ヤ笉閲嶅锛屽垯PUSH杩涘幓
 		 							model.push(data[i].binf.StationName);
+		 							stationlist.push(data[i].binf.StationName);
 		 						}
 		 					}
 	 						//console.info(model);
 	 								
 	 					}
-	 					stationlist=model;
+	 					//stationlist.push(model);
 	 					//console.info(model);
 	 					//if(Page.pageCurr==1){
 	 						loadclose();
-	 						createUl($('#battList'),model);
+	 						createUl($('#battList'),model,Page.pageCurr);
 	 					//}else{
 	 						//addteUl($('#battList'),model);
 	 					//}
@@ -219,7 +228,7 @@
 		   	setCookie("happroval",json);  //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
 			return arr;
 		}
-		function addteUl(ulCon,dataList){
+		function addteUl(ulCon,dataList,value){
 			// 鍒涘缓ul
 			var _ul = $('<ul data-role="listview" data-inset="true"></ul>');
 			
@@ -227,7 +236,7 @@
 			for (var i = 0; i < dataList.length; i++){
 				var _li = $('<li></li');
 				
-				var _a = $('<a href="#page1" value=""  data-transition="slide">'+dataList[i]+'</a>');
+				var _a = $('<a href="#page1" value='+value+'  data-transition="slide">'+dataList[i]+'</a>');
 								
 				// 灏哶a娣诲姞鍒癬li锛屽皢_li娣诲姞鍒癬ul涓�
 				_li.append(_a);
@@ -238,12 +247,13 @@
 			ulCon.append(_ul).trigger('create');			
 			loadclose();
 		}
- 		function createUl(ulCon, dataList) {
+ 		function createUl(ulCon, dataList,value) {
 			//console.info(index);
 			// 娓呯悊瀹瑰櫒涓嬬殑ul
 			if(Page.pageCurr==1){
 				ulCon.find('ul').remove();
 			}
+			pageindexNum[value-1]=dataList.length;
 			// 鍒涘缓ul
 			var _ul = $('<ul data-role="listview" data-inset="true"></ul>');
 			
@@ -251,7 +261,7 @@
 			for (var i = 0; i < dataList.length; i++){
 				var _li = $('<li></li');
 				
-				var _a = $('<a href="#page1" value=""  data-transition="slide">'+dataList[i]+'</a>');
+				var _a = $('<a href="#page1" value='+value+'  data-transition="slide">'+dataList[i]+'</a>');
 								
 				// 灏哶a娣诲姞鍒癬li锛屽皢_li娣诲姞鍒癬ul涓�
 				_li.append(_a);
diff --git a/gx_tieta/WebRoot/mobil/index.html b/gx_tieta/WebRoot/mobil/index.html
index 80037c4..45eea61 100644
--- a/gx_tieta/WebRoot/mobil/index.html
+++ b/gx_tieta/WebRoot/mobil/index.html
@@ -61,23 +61,30 @@
 
 	<script type="text/javascript" src="mobilJs/base.js"></script>
 	<script>
-	$(document).bind("mobileinit", function(){
-		
-	
+	$(document).bind("mobileinit", function(){	
 		// enable i18n
 		$.mobile.i18nEnabled = false;
 		//$.mobile.i18nFolder = "i18n"
 		$.mobile.ignoreContentEnabled = true;
-
 		// $(document).delegate("#btn", "vclick", function(){
 
 		// 	alert( $.trim( $("#tpl").html() ) );
 		// });
+		/*cleanCookie("wapproval");
+		cleanCookie("happroval");
+		cleanCookie("batt");
+		cleanCookie("station"); */ 
 	});
 
 	$(function(){
 		delCookie("pages");
 		delCookie("stationId");
+		delCookie("wapproval");
+		delCookie("happroval");
+		delCookie("batt");
+		delCookie("station");
+		delCookie("eleparm");
+		delCookie("eleparm1"); 
 		$(document.body).css( "visibility", "visible") ;
 	});
 	
diff --git a/gx_tieta/WebRoot/mobil/wapprovalBatt-index.html b/gx_tieta/WebRoot/mobil/wapprovalBatt-index.html
index 5a20fae..15890e7 100644
--- a/gx_tieta/WebRoot/mobil/wapprovalBatt-index.html
+++ b/gx_tieta/WebRoot/mobil/wapprovalBatt-index.html
@@ -74,7 +74,7 @@
 		var arrdata = new Array();
 		
 		var Page = {
-			pageSize:20, 				//姣忛〉鐨勮鏁�
+			pageSize:100, 				//姣忛〉鐨勮鏁�
 			pageCurr:1,  				//褰撳墠椤电爜鏁�
 			pageAll:0,
 		};
@@ -115,16 +115,18 @@
 			 					arrdata.push(data[i]);//瀛樺偍鏁版嵁
 			 					if(model.length==0){
 			 						model.push(data[i].binf.StationName);
+			 						stationlist.push(data[i].binf.StationName);
 			 					}else{
 			 						if(model[model.length-1]!=data[i].binf.StationName){//鑻ヤ笉閲嶅锛屽垯PUSH杩涘幓
 			 							model.push(data[i].binf.StationName);
+			 							stationlist.push(data[i].binf.StationName);
 			 						}
 			 					}
 		 						console.info(model);
 		 						
 	 						}
 	 					}
-	 					stationlist=model;
+	 					//stationlist=model;
 	 					createUl($('#battList'),model);
 	 				}
 	 			}
diff --git a/gx_tieta/WebRoot/mobil/wapprovalBatt.html b/gx_tieta/WebRoot/mobil/wapprovalBatt.html
index a743356..4cd59b1 100644
--- a/gx_tieta/WebRoot/mobil/wapprovalBatt.html
+++ b/gx_tieta/WebRoot/mobil/wapprovalBatt.html
@@ -248,6 +248,7 @@
 	// 閫氳繃瀹℃壒璇锋眰
 	function exBattGroupAjax(data) {
 		// 璇锋眰鍚庡彴
+		loadshow();
 		$.ajax({
 			type: 'post'
 			,async: true
@@ -258,9 +259,11 @@
 				var rs = JSON.parse(res.result);
 				// console.log(rs);
 				if(rs.code == 1) {
+					loadclose();
 					alert("纭瀹℃牳鎴愬姛");
 					window.location.href="wapprovalBatt-index.html";
 				}else {
+					loadclose();
 					alert('纭瀹℃牳澶辫触锛�');
 				}		
 			}
diff --git a/gx_tieta/WebRoot/mobil/wcheckAccept-index.html b/gx_tieta/WebRoot/mobil/wcheckAccept-index.html
index 3e77be9..1b7db4b 100644
--- a/gx_tieta/WebRoot/mobil/wcheckAccept-index.html
+++ b/gx_tieta/WebRoot/mobil/wcheckAccept-index.html
@@ -74,7 +74,7 @@
 		var arrdata = new Array();
 		
 		var Page = {
-			pageSize:20, 				//姣忛〉鐨勮鏁�
+			pageSize:100, 				//姣忛〉鐨勮鏁�
 			pageCurr:1,  				//褰撳墠椤电爜鏁�
 			pageAll:0,
 		};
@@ -115,16 +115,17 @@
 			 					arrdata.push(data[i]);//瀛樺偍鏁版嵁
 			 					if(model.length==0){
 			 						model.push(data[i].binf.StationName);
+			 						stationlist.push(data[i].binf.StationName);
 			 					}else{
 			 						if(model[model.length-1]!=data[i].binf.StationName){//鑻ヤ笉閲嶅锛屽垯PUSH杩涘幓
 			 							model.push(data[i].binf.StationName);
+			 							stationlist.push(data[i].binf.StationName);
 			 						}
 			 					}
-		 						console.info(model);
-		 						
+		 						console.info(model);	
 	 						}
 	 					}
-	 					stationlist=model;
+	 					//stationlist=model;
 	 					createUl($('#battList'),model);
 	 				}
 	 			}
diff --git a/gx_tieta/WebRoot/mobil/wcheckAccept.html b/gx_tieta/WebRoot/mobil/wcheckAccept.html
index 0f197aa..ae1c6fc 100644
--- a/gx_tieta/WebRoot/mobil/wcheckAccept.html
+++ b/gx_tieta/WebRoot/mobil/wcheckAccept.html
@@ -385,6 +385,7 @@
 	// 閫氳繃瀹℃壒璇锋眰
 	function exBattGroupAjax(data) {
 		// 璇锋眰鍚庡彴
+		loadshow();
 		$.ajax({
 			type: 'post'
 			,async: true
@@ -395,9 +396,11 @@
 				var rs = JSON.parse(res.result);
 				// console.log(rs);
 				if(rs.code == 1) {
+					loadclose();
 					alert("纭楠屾敹鎴愬姛");
 					window.location.href="wcheckAccept-index.html";
 				}else {
+					loadclose();
 					alert('纭楠屾敹澶辫触');
 				}		
 			}
diff --git a/gx_tieta/WebRoot/sys-set-test.jsp b/gx_tieta/WebRoot/sys-set-test.jsp
index 4d629b2..c6e884b 100644
--- a/gx_tieta/WebRoot/sys-set-test.jsp
+++ b/gx_tieta/WebRoot/sys-set-test.jsp
@@ -15,7 +15,7 @@
 		<meta http-equiv="expires" content="0">    
 		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 		<meta http-equiv="description" content="This is my page">
-	    <title>绯荤粺璁剧疆娴嬭瘯</title>
+	    <title>鎵归噺绯荤粺鍙傛暟璁剧疆</title>
 		<link rel="stylesheet" type="text/css" href="pages/css/base.css">
 		<link rel="stylesheet" type="text/css" href="jqueryui/jquery-ui.css">
 	    <link rel="stylesheet" type="text/css" href="src/css/layui.css">
@@ -59,7 +59,7 @@
         <div class="layui-page-container" data-genuitec-lp-enabled="false" data-genuitec-file-id="wc1-14" data-genuitec-path="/gx_tieta/WebRoot/batch-set-curr.jsp">
         	<!-- 鏉′欢绛涢�� -->
             <div class="layui-page-filter">
-                <div class="page-filter-header layui-page-filter-fweight">绯荤粺璁剧疆娴嬭瘯</div>
+                <div class="page-filter-header layui-page-filter-fweight">鎵归噺绯荤粺鍙傛暟璁剧疆</div>
                 <div class="page-filter-content">
                     <table>
                         <tr class="layui-page-filter-tbl-header layui-page-filter-fweight">
@@ -163,7 +163,7 @@
 						</div>
 						<button class="layui-btn layui-btn-sm mrl8" id="batchAdd"><i class="fa fa-plus mrr8"></i>娣诲姞璁惧</button>
             			<button class="layui-btn layui-btn-sm" id="sysSet">鎵归噺璁剧疆绯荤粺鍙傛暟</button>
-            			
+            			<button class="layui-btn layui-btn-sm" id="sysRestart">鎵归噺閲嶅惎璁惧</button>
             		</div>
             	</div>
             	<!-- 琛ㄦ牸鍐呭 -->
@@ -178,7 +178,7 @@
 			{{# if(d.DtCardCount==1) { }}
 				浠庝竴鎷�24鑾峰彇
 			{{# }else{  }}
-				浠庢眹闆嗗櫒鑾峰彇
+				<span style="color: #FF0000">浠庢眹闆嗗櫒鑾峰彇</span>
 			{{# } }}
 		</script>
 		<!-- 鎿嶄綔鏍� -->
@@ -203,6 +203,55 @@
 				<button class="layui-btn layui-btn-sm layui-btn-disabled">鏈缃�</button>
 			{{# } }}
 		</script>
+		<script type="text/html" id="allStatus">
+			{{#
+				var getStatus = function (val) {
+					var status = '<button class="layui-btn layui-btn-sm layui-btn-danger">鏈煡</button>';
+					switch(val) {
+						case 0:
+							status='<button class="layui-btn layui-btn-sm layui-btn-danger">璇诲彇澶辫触</button>';
+						break;
+						case 1:
+							status='<button class="layui-btn layui-btn-sm layui-btn-normal">璇诲彇鎴愬姛</button>';
+						break;
+						case 2:
+							status='<button class="layui-btn layui-btn-sm layui-btn-danger">璁剧疆澶辫触</button>';
+						break;
+						case 3:
+							status='<button class="layui-btn layui-btn-sm">璁剧疆鎴愬姛</button>';
+						break;
+						case 4:
+							status='<button class="layui-btn layui-btn-sm layui-btn-danger">閲嶅惎澶辫触</button>';
+						break;
+						case 5:
+							status='<button class="layui-btn layui-btn-sm layui-btn-warm">閲嶅惎鎴愬姛</button>';
+						break;
+						case 6:
+							status='<button class="layui-btn layui-btn-sm layui-btn-warm">淇敼鏈缃�</button>';
+						break;
+					}
+					return status;
+				};
+			}}
+			
+			{{ getStatus(d.allStatus) }}
+		</script>
+		<!-- 鐢垫祦閽抽噺绋� -->
+		<script type="text/html" id="CurrentRange">
+			{{# if(d.CurrentRange_bool == 1){ }}
+				{{d.CurrentRange}}
+			{{# }else{ }}
+				<span style="color:#FF0000;">{{d.CurrentRange}}</span>
+			{{# } }}
+		</script>
+		<!-- DCDC妯″潡鏁伴噺 -->
+		<script type="text/html" id="LoaderCount">
+			{{# if(d.LoaderCount_bool == 1){ }}
+				{{d.LoaderCount}}
+			{{# }else{ }}
+				<span style="color:#FF0000;">{{d.LoaderCount}}</span>
+			{{# } }}
+		</script>
 		<!-- 鏅�氶潰鏉� -->
 		<script type="text/html" id="normalSet">
 			<div class="layui-form layui-"></div>
@@ -214,6 +263,24 @@
                 	<label class="layui-form-label">{{d.msg}}</label>
                 	<div class="layui-input-block">
                    		<input type="text" id="sysSetVal" name="{{d.field}}" lay-verify="{{d.verify}}" lay-verType="tips" placeholder="璇疯緭鍏ヨ瀹氬弬鏁�" autocomplete="off" class="layui-input">
+                	</div>
+            	</div>
+            	<div class="layui-form-item t-align-right" style="display: none">
+                	<button class="layui-btn layui-btn-sm mrr8" lay-submit="" lay-fllter="go" id="go">纭畾</button>
+                	<button class="layui-btn layui-btn-sm layui-btn-danger mrr8">鍙栨秷</button>
+            	</div>
+        	</div>
+    	</script>
+    	<!-- 璁剧疆鍗曚綋鏁版嵁鏉ユ簮闈㈡澘 -->
+    	<script type="text/html" id="sysSetDtCardCountTpl">
+        	<div class="layui-form layui-form-pane layui-form-pane-width160 mrl8 mrr8 mrt30" id="sysSetForm" lay-filter="sysSetFilter">
+            	<div class="layui-form-item">
+                	<label class="layui-form-label">{{d.msg}}</label>
+                	<div class="layui-input-block">
+						<select name="{{d.field}}">
+							<option value="1">浠庝竴鎷�24鑾峰彇</option>
+							<option value="0">浠庢眹闆嗗櫒鑾峰彇</option>
+						</select>
                 	</div>
             	</div>
             	<div class="layui-form-item t-align-right" style="display: none">
@@ -485,17 +552,15 @@
 			            ,{field:'dev_id', title:'璁惧ID', align:'center', width: 160}
 			            ,{field:'stationName', title:'鏈烘埧鍚嶇О', align:'center', width: 470}
 			            ,{field:'BattGroupNum', title:'鐢垫睜缁勬暟', align:'center', width: 120}
-			            ,{field:'readStatus', title:'璇诲彇鐘舵��', templet: '#readStatus', align:'center', width: 120}
-						,{field:'setStatus', title:'璁剧疆鐘舵��', templet: '#setStatus', align:'center', width: 120}
 			            ,{field: 'moncapstds', title: '鐢垫睜缁勬爣绉板閲忥紙AH锛�', align: 'center', width: 180}
 			            ,{field: 'RealCap', title: '鐢垫睜缁勫疄闄呭閲忥紙AH锛�', align: 'center', width: 180}
 			            ,{field:'GroupVolRange', title:'鎬荤画鑸椂闂达紙鍒嗛挓锛�<i class="fa fa-edit normal" title="璁剧疆鎬荤画鑸椂闂�"></i>', align:'center', width: 180}
 			            ,{field:'GroupVolSorce', title:'淇濅竴娆′笅鐢电画鑸椂闂达紙鍒嗛挓锛�<i class="fa fa-edit normal" title="璁剧疆淇濅竴娆′笅鐢电画鑸椂闂�"></i>', align:'center', width: 240}
-			            ,{field:'CurrentRange', title:'鐢垫祦閽抽噺绋嬶紙A锛�<i class="fa fa-edit normal" title="璁剧疆鐢垫祦閽抽噺绋�"></i>', templet: '', align:'center', width: 180}
+			            ,{field:'CurrentRange', title:'鐢垫祦閽抽噺绋嬶紙A锛�<i class="fa fa-edit normal" title="璁剧疆鐢垫祦閽抽噺绋�"></i>', templet: '#CurrentRange', align:'center', width: 180}
 			            ,{field:'CurrentTyte', title:'涓�娆′笅鐢电數鍘嬶紙V锛�<i class="fa fa-edit normal" title="璁剧疆涓�娆′笅鐢电數鍘�"></i>', align:'center', width: 180}
 			            ,{field:'MonomerOrder', title:'浜屾涓嬬數鐢靛帇锛圴锛�<i class="fa fa-edit normal" title="璁剧疆浜屾涓嬬數鐢靛帇"></i>', align:'center', width: 180}
-			            ,{field:'LoaderCount', title:'DCDC妯″潡鏁伴噺 <i class="fa fa-edit normal" title="璁剧疆DCDC妯″潡鏁伴噺"></i>', align:'center', width: 180}
-			            ,{field:'DtCardCount', title:'鍗曚綋鏁版嵁鏉ユ簮绫诲瀷 <i class="fa fa-edit" title="璁剧疆鍗曚綋鏁版嵁鏉ユ簮绫诲瀷"></i>', templet: '#DtCardCount', align:'center', width: 200}
+			            ,{field:'LoaderCount', title:'DCDC妯″潡鏁伴噺 <i class="fa fa-edit normal" title="璁剧疆DCDC妯″潡鏁伴噺"></i>',templet: '#LoaderCount', align:'center', width: 180}
+			            ,{field:'DtCardCount', title:'鍗曚綋鏁版嵁鏉ユ簮绫诲瀷 <i class="fa fa-edit DtCardCount" title="璁剧疆鍗曚綋鏁版嵁鏉ユ簮绫诲瀷"></i>', templet: '#DtCardCount', align:'center', width: 200}
 			            ,{field:'POF_BG_Boost_Cnt', title:'鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺 <i class="fa fa-edit normal" title="璁剧疆鍋滅數鍗囧帇姒ㄥ共鐢垫睜鏁伴噺"></i>', align:'center', width: 240}
 			            ,{field:'POF_BG_Boost_VolStop', title:'鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬬粓姝㈢數鍘嬩笅闄愶紙V锛�<i class="fa fa-edit normal" title="璁剧疆鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬬粓姝㈢數鍘嬩笅闄�"></i>', align:'center', width: 400}
 			            ,{field:'POF_BG_Boost_VolStart', title:'鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬪惎鍔ㄧ數鍘嬩笅闄愶紙V锛�<i class="fa fa-edit normal" title="璁剧疆鍋滅數鍗囧帇姒ㄥ共鐢垫睜绔數鍘嬪惎鍔ㄧ數鍘嬩笅闄�"></i>', align:'center', width: 400}
@@ -504,7 +569,7 @@
 			            ,{field:'PowerBreakChargeCurr', title:'鍋滅數鍏呯數鐢垫祦锛圓锛�<i class="fa fa-edit normal" title="璁剧疆鍋滅數鍏呯數鐢垫祦"></i>', align:'center', width: 240}
 			            ,{field:'StationName9', title:'鐗堟湰鍙�', align:'center', width: 160}
 			            ,{field:'Load_curr', title:'璐熻浇鐢垫祦锛圓锛�', align:'center', width: 160}
-			            ,{field:'doThings', fixed: 'right', title: '鎿嶄綔', toolbar: '#doThings', align: 'center', width: 120} 
+			            ,{field:'allStatus', fixed: 'right', title: '鐘舵��', templet: '#allStatus', align: 'center', width: 180}
 			        ]]
 			        ,data:[]
 			        ,limit: 10000
@@ -522,7 +587,11 @@
         		var sysSetForm = new LayuiForm('sysSetForm');
         		
         		// 璁剧疆鏅�氱郴缁熷弬鏁版ā鏉�
-        		var sysSetNormalTpl = $('#sysSetNormalTpl').html();      
+        		var sysSetNormalTpl = $('#sysSetNormalTpl').html(); 
+        		
+        		// 璁剧疆鍗曚綋鏁版嵁鏉ユ簮妯℃澘
+        		var sysSetDtCardCountTpl = $('#sysSetDtCardCountTpl').html();
+        		     
         		// 鐐瑰嚮琛ㄦ牸涓悓姝ョ殑鎸夐挳
         		$('.layui-page-content').on('click', '.layui-table-header .fa.normal', function() {
         			var title = $(this).attr('title');
@@ -549,6 +618,32 @@
         			}
         		});
         		
+        		//  鐐瑰嚮琛ㄦ牸鍗曚綋鏁版嵁鏉ユ簮杩涜淇敼
+        		$('.layui-page-content').on('click', '.layui-table-header .fa.DtCardCount', function() {
+        			var title = $(this).attr('title');
+        			var th = $(this).parent().parent().parent();
+        			var field = th.data('field');
+        			
+        			// 鍒ゆ柇鏄惁瀛樺湪鍙互璁剧疆鐨勬満鎴�
+        			if(tOptions.data.length == 0) {
+        				layer.msg('璇峰厛娣诲姞鏈烘埧锛�');
+        			}else {
+        				var checkStatus = table.checkStatus('pageTbl'); // 鑾峰彇琚�変腑鐨勮
+        				var checkData = checkStatus.data;
+	        			if(checkData.length == 0) {
+	        				layer.msg('璇烽�夋嫨瑕佽缃殑鏈烘埧锛�');
+	        				return;
+	        			}
+	        			
+	        			var keyIds= getKeyId(checkData);
+	        			
+        				// 鏇存柊鎸囧畾鐨勫垪
+       					var showFormData = getShowFormData(title, field);
+       					// 鏄剧ず闈㈡澘
+       					changeTblData(sysSetDtCardCountTpl, showFormData, keyIds);
+        			}	
+        		});
+        		
         		// 淇敼琛ㄦ牸鍐呭
         		function changeTblData(html, data, keyIds) {
        				// 闈㈡澘鏄剧ず
@@ -560,14 +655,36 @@
 		                    ,area: ['400px', '200px']
 		                    ,content: html
 		                    ,btn:['纭畾', '鍙栨秷']
+		                    ,success: function() {
+		                    	form.render(null, 'sysSetFilter');
+		                    }
 		                    ,yes:function(index) {
-		                    	layer.close(index);	 // 鍏抽棴闈㈡澘
 		                        $('#go').click();	// 瑙﹀彂layui form琛ㄥ崟鎻愪氦浜嬩欢
 		                        sysSetForm.get(function(obj) {
+		                        	layer.close(index);	 // 鍏抽棴闈㈡澘
 		                        	var rsData = [];
 		                            for(var i=0;i<keyIds.length; i++) {
 		                            	var _keyId = keyIds[i];
 		                            	var _rsData = $.extend({}, _keyId, obj);
+		                            	_rsData.allStatus = 6;		// 淇敼鍙傛暟浣嗘湭璁剧疆
+		                            	var _trData = layuiTbl.getTr('dev_id', _rsData.dev_id);
+		                            	
+		                            	// 鍒ゆ柇鏄惁涓虹數娴侀挸閲忕▼,璁剧疆鏄惁绗﹀悎鏍囧噯
+		                            	if(_rsData.CurrentRange != undefined) {
+		                            		if(_trData.code == 1) {
+		                            			// 璁剧疆褰撳墠鍐呭鏄惁绗﹀悎鏍囧噯
+		                            			_rsData.CurrentRange_bool = checkCurrentRange(_trData.data.MonVolStd, _rsData.CurrentRange);
+		                            		}
+		                            	}
+		                            	
+		                            	// 鍒ゆ柇鏄惁涓篋CDC妯″潡鏁伴噺锛岃缃槸鍚︾鍚堟爣鍑�
+		                            	if(_rsData.LoaderCount != undefined) {
+		                            		if(_trData.code == 1) {
+		                            			// 璁剧疆褰撳墠鍐呭鏄惁绗﹀悎鏍囧噯
+		                            			_rsData.LoaderCount_bool = checkLoaderCount(_trData.data.MonVolStd, _rsData.LoaderCount);
+		                            		}
+		                            	}
+		                            	
 		                            	rsData.push(_rsData);
 		                            }
 		                            
@@ -636,6 +753,10 @@
         				case 'PowerBreakChargeCurr':		// 鑳屽厜鏃堕暱
         					rs.verify = 'required|number|intNum|PowerBreakChargeCurr'
         					rs.msg = '鍙栧�艰寖鍥�0~50'
+        				break;
+        				case 'DtCardCount':
+        					rs.verify = 'required';
+        					rs.msg = '璇烽�夋嫨鏉ユ簮';
         				break;
         			}
         			
@@ -795,6 +916,7 @@
         				tmp.dev_id = _data.FBSDeviceId;			// 璁惧ID
         				tmp.stationName = _data.StationName;		// 鏈烘埧鍚嶇О
         				tmp.BattGroupNum = _data.BattGroupNum;	// 鐢垫睜缁勬暟
+        				tmp.MonVolStd = _data.MonVolStd;		// 鍗曚綋鏍囩О鐢靛帇
         				tmp.moncapstds = _data.moncapstds;		// 鍗曚綋鏍囩О瀹归噺
         				tmp.StationName9 = _data.StationName9;	// 璁惧鐗堟湰鍙�
         				tmp.Load_curr = _data.Load_curr;		// 璐熻浇鐢垫祦
@@ -814,11 +936,13 @@
         				
         				// 鍒ゆ柇璇诲彇鐘舵�� 
         				if(_data.num == 1) {
-        					tmp.readStatus = 1;		// 璇诲彇鎴愬姛
+        					tmp.allStatus = 1;		// 璇诲彇鎴愬姛
         				}else {
-        					tmp.readStatus = 0;		// 璇诲彇澶辫触
+        					tmp.allStatus = 0;		// 璇诲彇澶辫触
         				}
-        				tmp.setStatus = 0;
+        				tmp.CurrentRange_bool = checkCurrentRange(_data.MonVolStd, tmp.CurrentRange);		// 妫�娴嬬數娴侀挸閲忕▼
+        				tmp.LoaderCount_bool = checkLoaderCount(_data.MonVolStd, tmp.LoaderCount); 			// 妫�娴婦CDC妯″潡鏁伴噺
+        				//console.log(tmp.CurrentRange_bool);
         				// 灏嗘暟鎹坊鍔犲埌缁撴灉闆嗕腑
         				rs.push(tmp);
         			}
@@ -914,9 +1038,9 @@
 								for(var i=0; i<data.length; i++) {
 									var _data = data[i];
 									if(_data.num == 1) {
-										_data.setStatus = 1;
+										_data.allStatus = 3;		// 璁剧疆鎴愬姛
 									}else {
-										_data.setStatus = 2;
+										_data.allStatus = 2;		//  璁剧疆澶辫触
 									}
 									_data.CurrentTyte = _data.CurrentTyte/10;	// 涓�娆′笅鐢电數鍘�
         							_data.MonomerOrder = _data.MonomerOrder/10;	// 浜屾涓嬬數鐢靛帇
@@ -930,11 +1054,95 @@
 									var _checkData = checkData[i];
 									var tmp = {};
 									tmp.dev_id = _checkData.dev_id;
-									tmp.setStatus = 0;
+									_data.allStatus = 2;		//  璁剧疆澶辫触
 									rsData.push(tmp);
 								}
 								layuiTbl.update('dev_id', rsData);
 							}
+						}
+						,complete: function() {
+							layer.close(loading);
+						}
+					});
+				}
+				
+				// 鎵归噺閲嶅惎璁惧鎸夐挳
+				$('#sysRestart').click(function() {
+					var checkStatus = table.checkStatus('pageTbl'); // 鑾峰彇琚�変腑鐨勮
+       				var checkData = checkStatus.data;
+        			if(checkData.length == 0) {
+        				layer.msg('璇烽�夋嫨瑕佽缃殑鏈烘埧锛�');
+        				return;
+        			}
+        			
+        			// 璋冪敤閲嶅惎璁惧鐨勮姹�
+        			batchRestartSys(checkData);
+				});
+				
+				// 鎵归噺閲嶅惎璁惧璇锋眰
+				function batchRestartSys(params) {
+					// 鍒ゆ柇data鏄惁涓虹┖
+					if(!params || params.length==0) {
+						layer.msg('璇烽�夋嫨瑕侀噸鍚殑璁惧');
+						return;
+					}
+					
+					// 寮瑰嚭璇㈤棶寮瑰嚭妗�
+					layer.confirm('鏄惁鎵归噺閲嶅惎璁惧', {icon: 3, title: '鎻愮ず'}, function(index) {
+						// 瀵规暟鎹繘琛屽鐞�
+						var rsData = [];
+						// 閬嶅巻params鐨勫��
+						for(var i=0; i<params.length; i++)  {
+							var _params = params[i];
+							_params.op_cmd = sysSetCmd.restart;
+							_params.num = 0;
+							rsData.push(_params);
+						}
+						
+						// 璇锋眰鍚庡彴
+						ajaxBatchRestartSys(rsData);
+						
+					});
+				}
+				
+				// 鏇村叿鏁版嵁鍚戝悗鍙拌姹傞噸鍚澶�
+				function ajaxBatchRestartSys(params) {
+					var loading = layer.load(1);
+					// 閲嶅惎璁惧
+					$.ajax({
+						type: 'post'
+						,async: true
+						,url: 'Fbs9100_sysparamAction_action_restartPL_FBS'
+						,data: 'json='+JSON.stringify(params)+'&json_msg='+addBattStr
+						,dataType: 'json'
+						,success: function(res) {
+							var rs = JSON.parse(res.result);
+							if(rs.code == 1) {
+								var data = rs.data;
+								// 閬嶅巻 data
+								for(var i=0; i<data.length; i++) {
+									var _data = data[i];
+									if(_data.num == 1) {
+										_data.allStatus = 5;		//  閲嶅惎鎴愬姛
+									}else {
+										_data.allStatus = 4;		// 閲嶅惎澶辫触
+									}
+								}
+								
+								// 鏇存柊琛ㄦ牸
+								layuiTbl.update('dev_id', data);
+							}
+						}
+						,error: function() {
+							layer.msg('閲嶅惎澶辫触');
+							// 閬嶅巻params
+							for(var i=0; i<params.length; i++) {
+								var _param = params[i];
+								_param.allStatus = 4;		// 閲嶅惎澶辫触 
+							}
+							
+							// 鏇存柊琛ㄦ牸
+							layuiTbl.update('dev_id', params);
 						}
 						,complete: function() {
 							layer.close(loading);
@@ -963,6 +1171,46 @@
 					}
 					return rs;
 				}
+				
+				// 妫�娴嬬數娴侀挸鏁版嵁鏄惁绗﹀悎鏍囧噯
+				function checkCurrentRange(monVolStd, CRange) {
+					var rsBool = 0;		// 杩斿洖缁撴灉鏄惁绗﹀悎鏍囧噯0涓嶇鍚堬紝 1绗﹀悎
+					// 鍒ゆ柇瀵瑰簲鍏崇郴
+					switch(Number(monVolStd)){
+						case 12:		// 12V璁惧
+							if(CRange == 100) {
+								rsBool = 1;
+							}
+						break;
+						case 2:		// 2V璁惧
+							if(CRange == 200) {
+								rsBool = 1;
+							}
+						break;
+					}
+					
+					return rsBool;
+				}
+				
+				// 妫�娴婦CDC妯″潡鏁伴噺
+				function checkLoaderCount(monVolStd, LoaderCount) {
+					var rsBool = 0;		// 杩斿洖缁撴灉鏄惁绗﹀悎鏍囧噯0涓嶇鍚堬紝 1绗﹀悎
+					// 鍒ゆ柇瀵瑰簲鍏崇郴
+					switch(Number(monVolStd)){
+						case 12:		// 12V璁惧
+							if(LoaderCount == 1) {
+								rsBool = 1;
+							}
+						break;
+						case 2:		// 2V璁惧
+							if(LoaderCount == 2) {
+								rsBool = 1;
+							}
+						break;
+					}
+					
+					return rsBool;
+				}
         	});
         </script>
     </body>

--
Gitblit v1.9.1