From d454f73957f38db91b4ad40ebfd4340950485b89 Mon Sep 17 00:00:00 2001
From: CJJ <Administrator@USER-20180117QL>
Date: 星期四, 20 十二月 2018 20:47:36 +0800
Subject: [PATCH] 修改

---
 gx_tieta/WebRoot/mobil/ele-param2.html            |  115 +++++++++
 gx_tieta/WebRoot/mobil/batt-edit.html             |  536 ++++++++++++++++++++++++++++++++++++++++++++
 gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html  |    4 
 gx_tieta/WebRoot/iframe/batt-info-edit.html       |    1 
 gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html |   56 ++++
 5 files changed, 704 insertions(+), 8 deletions(-)

diff --git a/gx_tieta/WebRoot/iframe/batt-info-edit.html b/gx_tieta/WebRoot/iframe/batt-info-edit.html
index ccbce2d..42b3254 100644
--- a/gx_tieta/WebRoot/iframe/batt-info-edit.html
+++ b/gx_tieta/WebRoot/iframe/batt-info-edit.html
@@ -566,6 +566,7 @@
 			//淇敼鐢垫睜缁勪俊鎭�
 			function updBatt(temp){
 				var load= layer.load(1);
+				console.info(temp)
 				$.ajax({
 					type: "post", 				
 			        url: "BattInfAction!update",				
diff --git a/gx_tieta/WebRoot/mobil/batt-edit.html b/gx_tieta/WebRoot/mobil/batt-edit.html
new file mode 100644
index 0000000..e18d700
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/batt-edit.html
@@ -0,0 +1,536 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	<meta charset="UTF-8">
+	<title>淇敼鐢垫睜缁勪俊鎭厤缃�</title>
+	<meta name="viewport" content="width=device-width,initial-scale=1">
+	<meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+	<link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
+	<link href="mobilCss/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css" />
+	<link href="mobilCss/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
+	<link rel="stylesheet" type="text/css" href="css/tbl.css">
+	<script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
+	<script src="mobilJs/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
+	<script src="mobilJs/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
+	<script src="mobilJs/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
+	<script src="mobilJs/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
+	<script type="text/javascript" src="js/tbl.js"></script>
+	<script type="text/javascript" src="mobilJs/base.js"></script>
+	<script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>  
+	<style type="text/css">     
+       
+		table {
+			margin-top:.5em;
+			border-collapse:separate; 
+			border-spacing:0 .5em;
+		}
+		
+		tbody tr td{
+			overflow: hidden;
+			text-overflow:ellipsis;
+			white-space: nowrap;
+		}
+		.uncheck{
+		    background-color: #dddddd38!important;
+            color: #bdbdbdc4!important;
+		}
+		.ui-btn-icon-right {
+            padding-right: 2em;
+        }
+        .hbg{
+            background-color:#ddd9;
+        }
+        #battdata {
+            background-color:#dddddd54
+        }
+        .ui-select .ui-btn select{
+            width:77%;
+        }
+        .ptr0{
+            position: absolute;
+		    top: 0;
+		    right: 0;
+		    margin:0!important; 
+        }
+         #newbattnum-button{
+            padding: 1em 1.9em;
+         }
+	</style>
+	<link rel="stylesheet" href="css/fgpanel.css">
+</head>
+<body>
+	<div data-role="page">
+		
+		<!-- 澶撮儴鍐呭 -->
+		<div data-role="header" data-position="fixed">
+			<a href="ele-param2.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">杩斿洖</a>
+			<h1>淇敼鐢垫睜缁勪俊鎭厤缃�</h1>
+			<!-- <div  data-role="collapsible"  data-type="horizontal"  class="ui-btn-right"  style="padding-bottom:-0.7em; padding-top:-0.7em;" >
+            	<h1 id="alwaysRight">鏂板缓</h1>
+            	<div>
+            	<h1 class="full-width">
+            		<a  href="" target="_top" style="text-decoration:none;">1涓數姹犵粍</a>
+            	</h1>
+            	<h1 class="full-width">
+            		<a href="" target="_top" style="text-decoration:none;">2涓數姹犵粍</a>
+            	</h1>
+            	<h1 class="full-width">
+            		<a href="" target="_top" style="text-decoration:none;">3涓數姹犵粍</a>
+            	</h1>
+            	</div>
+            </div> -->
+            <fieldset data-role="controlgroup" class="ptr0" >
+		           
+		           
+			            <select id="newbattnum" data-mini="true">
+			              <option value=0>鏂板缓鐢垫睜缁�</option>
+			              
+			            </select>
+			            
+		            	
+		        	</fieldset>
+		</div>
+		<!-- 涓讳綋鍐呭 -->
+		<div data-role="main">
+			<!-- <div class="set-option"> -->
+								<table class="layout-set">
+									<tbody>
+										<tr>
+											<td>鏈烘埧缂栧彿</td>
+											<td>
+												<input type="text" id="StationId" class="unable" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鐪�</td>
+											<td>
+												<input type="text" id="station_name1" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鍩庡競</td>
+											<td>
+												<input type="text" id="city" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鍖哄幙</td>
+											<td>
+												<input type="text" id="county" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏈烘埧鍚嶇О</td>
+											<td>
+												<input type="text" id="StationName3" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>璁惧鍚嶇О</td>
+											<td>
+												<input type="text" id="StationName4" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏈烘埧IP</td>
+											<td>
+												<input type="text" id="StationIp" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>FBS璁惧ID(閲嶈)</td>
+											<td>
+												<input type="text" id="FBSDeviceId" class="unable" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>FBS璁惧IP(閲嶈)</td>
+											<td>
+												<input type="text" id="FbsDeviceIp" class="unable" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>瀛愮綉鎺╃爜</td>
+											<td>
+												<input type="text" id="FbsDeviceIp_YM" class="unable" data-mini="true" value="456"/>
+											</td>
+										</tr>
+										<tr>
+											<td>缃戝叧</td>
+											<td>
+												<input type="text" id="FbsDeviceIp_WG" class="unable" data-mini="true" value="456"/>
+											</td>
+										</tr>
+										<tr>
+											<td>FBS璁惧鍚嶇О</td>
+											<td>
+												<input type="text" id="FBSDeviceName" data-mini="true" />
+											</td>
+										</tr>
+										
+										<tr>
+											<td>鏈烘埧鍐呯數姹犵粍缂栧彿</td>
+											<td>
+												<input type="text" readonly unselectable="on" value="123" id="BattGroupNum" class="unable" class="uncheck" data-mini="true" />
+											</td>
+										</tr>
+										
+										<tr>
+											<td>娴厖鐢靛帇闃�鍊�(V)</td>
+											<td>
+												<input type="text" id="FloatVolLevel" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>绂荤嚎鐢靛帇闃�鍊�(V)</td>
+											<td>
+												<input type="text" id="OfflineVolLevel" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>娴厖鐢垫祦闃�鍊�(A)</td>
+											<td>
+												<input type="text" id="BattFloatCurrent" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鍗曚綋鏁伴噺</td>
+											<td>
+												<input type="text" id="MonCount" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏍囩О瀹归噺(AH)</td>
+											<td>
+												<input type="text" id="MonCapStd" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏍囩О鍗曚綋鐢靛帇(V)</td>
+											<td>
+												<input type="text" id="MonVolStd" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏍囩О鍗曚綋鍐呴樆(m惟)</td>
+											<td>
+												<input type="text" id="MonResStd" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏍囩О鍗曚綋鐢靛</td>
+											<td>
+												<input type="text" id="MonSerStd" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)</td>
+											<td>
+												<input type="text" id="MonVolLowToAvg" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>璐熻浇鐢垫祦(A)</td>
+											<td>
+												<input type="text" id="Load_curr" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏈�澶ф牳瀹圭數娴�(A)</td>
+											<td>
+												<input type="text" id="DisCurrMax" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鍩虹珯鍙风爜</td>
+											<td>
+												<input type="text" id="station_phone" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鐢垫睜鍝佺墝</td>
+											<td>
+												<input type="text" id="BattProducer" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鐢垫睜鍨嬪彿</td>
+											<td>
+												<input type="text" id="BattModel" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鐢垫睜鐢熶骇鏃ユ湡</td>
+											<td>
+												<input id="startTestrecord"  type="text" name="appDate" class="appDatefir"  value="2000-01-01" />
+											</td>
+										</tr>
+										<tr>
+											<td>鎶曞叆浣跨敤鏃ユ湡	</td>
+											<td>
+												<input id="endTestrecord" type="text" name="appDate" class="appDatesec"  value="2017-01-01" />
+											</td>
+										</tr>
+										<tr>
+											<td>瀹夎浜哄憳</td>
+											<td>
+												<input type="text" id="install_user" data-mini="true" />
+											</td>
+										</tr>
+									</tbody>
+								</table>
+							<!-- </div> -->
+							    <div id="battdata">
+							        
+							    </div> 
+							  
+			
+		</div>
+		
+		<div data-role="footer" data-position="fixed" data-theme="a">    
+			<div data-role="navbar">
+				<ul>
+				  <li><a href="#yourPopup" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">纭畾</a></li>
+				  <li><a href="" id="cancel" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-delete" data-position-to="window" data-icon="delete" data-role="button">鍙栨秷</a></li>
+				</ul>
+			</div>		
+		</div>   
+		<div data-role="popup" id="yourPopup" class="ui-content" data-overlay-theme="b">
+		<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">鍏抽棴</a>
+        <a href="" data-rel="back" id="sure" class="ui-btn ui-corner-all ui-shadow  ui-btn-icon-left ui-icon-check" >鎻愪氦</a>
+        <a href="" data-rel="back" class="ui-btn ui-corner-all ui-shadow  ui-btn-icon-left ui-icon-delete" >鏀惧純</a>
+    </div>        
+	</div>
+</body>
+
+<script type="text/javascript">
+	function creatAllView(num){
+        var allString=''
+           ,i=0;
+       if(num>4){return false}
+       for(i=0;i<num;i++){
+         allString+=creatBattView(i);
+       }
+     return $("#battdata").html(allString);   
+  } 
+	
+	
+  function creatBattView(index){
+         var count=index+1
+            ,battTitle='<div>'+'<h1 class="hbg">'+'鐢垫睜缁�'+count+'</h1>'+
+             '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'璁惧绱㈠紩'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select>'
+            ,allOption=selectedIndex(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>' 
+            ,battName='<tr>'+'<td>'+'鐢垫睜缁勫悕绉�'+'</td>'+'<td>'+'<input type="text" '+'id='+'battname'+index+' data-mini="true"'+'value='+'鐢垫睜缁�'+count+' />'+'</td>'+'</tr>'+'</tbody>'+'</table>'+'</div>';
+        return battTitle+allOption+battName; 
+               
+  }	
+ 
+  function selectedIndex(index){
+       var selected='',
+           i=0;
+       for(i=0;i<4;i++){  
+          if(i==index){selected+='<option '+'value='+i+' selected'+'>'+i+'</option>';continue;}
+          selected+='<option value='+i+'>'+i+'</option>';
+          
+       }
+       
+       return selected; 
+  }	
+  
+  function creatBa(a){
+        var battnum=4-a,
+            opstring='';        
+        if(a>4&&battnum<=0){return false;}
+        for(var i=0;i<=battnum;i++){
+             
+           opstring+='<option value='+i+'>鏂板缓'+i+'涓數姹犵粍</option>';
+        }
+         console.warn(opstring+'ttt'); 
+         return $('#newbattnum').html(opstring);
+   }
+  	var temp = getCookie("eleparm");
+  	var tempindex = getCookie("eleparmindex");
+	var tempnum = getCookie("eleparmnum");
+	//var temp
+	//console.info(temp);
+	var tempgroupid = getCookie("elegroupid");
+	console.info(tempgroupid);
+	tempgroupid = JSON.parse(tempgroupid);
+	console.info(tempindex);
+	console.info(tempnum);
+	temp=JSON.parse(temp);
+	tempindex = JSON.parse(tempindex);
+	tempnum =JSON.parse(tempnum);
+	var suoyin = temp[33];
+	var addbattnum = tempindex.length;
+   $(function(){
+   creatAllView(tempindex.length).trigger('create');
+   creatBa(tempindex.length).trigger('create');
+   });
+   
+   
+   
+   
+   
+   
+	</script>
+<script type="text/javascript">	
+	$(function () {
+		//setTimes($("#startTestrecord"),'2000-01-01');
+		//setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
+		installstartdata(temp);
+		
+	});
+	
+	function installstartdata(temp){
+		//$("#StationId").value=temp[0];
+		//var t=document.getElementById("station_name1");
+		document.getElementById("StationId").value = temp[0];
+		document.getElementById("station_name1").value = temp[1];
+		document.getElementById("city").value = temp[2];			//甯�
+		document.getElementById("county").value = temp[3];			//鍖哄幙
+		document.getElementById("StationName3").value = temp[4];   //鏈烘埧鍚嶇О
+		document.getElementById("StationName4").value = temp[5];    //璁惧鍚嶇О
+		document.getElementById("StationIp").value = temp[6];		//璁惧IP
+		document.getElementById("FBSDeviceId").value = temp[7];
+		document.getElementById("FbsDeviceIp").value = temp[8];
+		document.getElementById("FbsDeviceIp_YM").value = temp[9];
+		document.getElementById("FbsDeviceIp_WG").value = temp[10];
+		document.getElementById("FBSDeviceName").value = temp[11];
+		//document.getElementById("GroupIndexInFBSDevice").value = temp[12];
+		//document.getElementById("BattGroupId").value = temp[13];
+		document.getElementById("BattGroupNum").value = temp[14];
+		//document.getElementById("BattGroupName").value = temp[15];
+		document.getElementById("FloatVolLevel").value = temp[16];
+		document.getElementById("OfflineVolLevel").value = temp[17];
+		document.getElementById("BattFloatCurrent").value = temp[18];
+		document.getElementById("MonCount").value = temp[19];
+		document.getElementById("MonCapStd").value = temp[20];
+		document.getElementById("MonVolStd").value = temp[21];
+		document.getElementById("MonResStd").value = temp[22];
+		document.getElementById("MonSerStd").value = temp[23];
+		document.getElementById("MonVolLowToAvg").value = temp[24];
+		document.getElementById("Load_curr").value = temp[25];
+		document.getElementById("DisCurrMax").value = temp[26];
+		document.getElementById("station_phone").value = temp[27];
+		document.getElementById("BattProducer").value = temp[28];
+		document.getElementById("BattModel").value = temp[29];
+		//document.getElementById("startTestrecord").value = temp[30];
+		//document.getElementById("endTestrecord").value = temp[31];
+		setTimes($("#startTestrecord"),temp[30]);
+		setTimes($("#endTestrecord"),temp[31]);
+		document.getElementById("install_user").value = temp[32];
+		for(var i=0;i<tempindex.length;i++){
+			battname = "#battname"+i;	
+			$(battname).val(tempindex[i]);
+		}
+	}
+	
+	// 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍淇敼
+	function getUpdateArredit(){
+			var arr = new Array();
+			console.info(addbattnum);
+			for(var i=0;i<addbattnum;i++){
+				var battString = "#battname"+i;
+				var index = String(i);
+				console.info(battString);
+				var obj = {
+						StationId : $("#StationId").val(),	// 鏈烘埧缂栧彿
+						StationName : ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val()),	// 鎷兼帴鏈烘埧鍚嶇О
+						StationName1 : $("#station_name1").val(),		// 鐪�
+						StationName2 : $("#city").val(),		// 甯�
+						StationName5 : $("#county").val(),		// 鍖�/鍘�
+						StationName3 : $("#StationName3").val(),		// 鏈烘埧鍚嶇О
+						StationName4 : $("#StationName4").val(),		// 璁惧鍚嶇О
+						StationIp : $("#StationIp").val(),				//鏈烘埧ip
+						FBSDeviceId : $("#FBSDeviceId").val(),				//璁惧id
+						FbsDeviceIp : $("#FbsDeviceIp").val(),				//璁惧ip
+						FbsDeviceIp_YM : $("#FbsDeviceIp_YM").val(),			// 璁惧鎺╃爜
+						FbsDeviceIp_WG : $("#FbsDeviceIp_WG").val(),			// 缃戝叧
+						FBSDeviceName : $("#FBSDeviceName").val(),			//璁惧鍚嶇О
+						GroupIndexInFBSDevice : i,	//fbs璁惧绱㈠紩
+						BattGroupId : tempgroupid[i],				//鐢垫睜缁刬d
+						BattGroupNum : $("#BattGroupNum").val(),			//鏈烘埧鍐呯數姹犵粍缂栧彿
+						BattGroupName : $(battString).val(),
+						FloatVolLevel : $("#FloatVolLevel").val(),			//娴厖鐢靛帇闃�鍊�
+						OfflineVolLevel : $("#OfflineVolLevel").val(),			//绂荤嚎鐢靛帇闃�鍊�
+						BattFloatCurrent : $("#BattFloatCurrent").val(),		//娴厖鐢垫祦闃�鍊�
+						MonCount : $("#MonCount").val(),				//鍗曚綋鏁伴噺
+						MonCapStd : $("#MonCapStd").val(),				//鏍囩О瀹归噺
+						MonVolStd : $("#MonVolStd").val(),				//鏍囩О鐢靛帇
+						MonResStd : $("#MonResStd").val(),				//鏍囩О鍐呴樆
+						MonSerStd : $("#MonSerStd").val(),				//鏍囩О鐢靛
+						MonVolLowToAvg : $("#MonVolLowToAvg").val(),			//鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+				
+						Load_curr : $("#Load_curr").val(),				//璐熻浇鐢垫祦
+						DisCurrMax : $("#DisCurrMax").val(),				//鏈�澶ф牳瀹圭數娴�
+						station_phone : $("#station_phone").val(),			//鍩虹珯鍙风爜
+										
+						BattProducer : $("#BattProducer").val(),			//鐢垫睜鍝佺墝
+						BattModel : $("#BattModel").val(),				//鐢垫睜鍨嬪彿
+						BattProductDate :  $("#startTestrecord").val()+" 00:00:00",		//鐢垫睜鐢熶骇鏃ユ湡
+						BattInUseDate :  $("#endTestrecord").val()+" 00:00:00",			//鐢垫睜浣跨敤鏃ユ湡
+						install_user : $("#install_user").val(),			//瀹夎浜哄憳
+						Station_install : 0,
+				}
+				arr.push(obj);
+			}
+			console.info(arr);
+			return arr;
+		}
+		
+</script> 
+ <script type="text/javascript">  
+   $(function(){
+    $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
+    $("#sure").click(function(){
+			editBatt(); 	
+
+	    });
+   });
+     
+      //淇敼鐢垫睜缁勶紝娣诲姞鍒癇ATTINF
+	function editBatt(){
+   		var parm = getUpdateArredit();
+   		console.info(parm);	
+   		$.ajax({
+				type: "post", 				
+		        url: "BattInfAction!update",				
+		        async:true,				
+		        dataType:'text',
+		        data:"json="+JSON.stringify(parm),	
+		        success: function(data){							        	
+					data = eval('('+data+')');
+					var model = eval('('+data.result+')');
+					console.info(model);
+					if(model.code ==1){
+						alert("淇敼鎴愬姛");
+					}else{
+						alert("淇敼澶辫触!");
+					}		
+	        	},
+	        	error:function(){
+	        		alert("淇敼鐢垫睜缁勫け璐�!");
+	        	}
+ 		});
+   }   
+ 
+    $('#newbattnum').change(function(){
+    	var numbattnum = parseInt($('#newbattnum').val());
+    	var index =parseInt(tempindex.length);
+    	addbattnum=Math.floor((numbattnum)+(tempindex.length));
+    	console.warn(addbattnum);
+    	creatAllView(addbattnum).trigger('create');
+    	creatBattGroupId(addbattnum);
+   });
+ 
+
+  
+        /* 鎿嶄綔鎴愬姛 
+   $('#changeSuc').popup('open');
+       鎿嶄綔澶辫触
+   $('#changeErr').popup('open'); */
+   </script>
+   
+</html>
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
index 14af2d2..327889b 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
@@ -461,8 +461,8 @@
 		}else{
 			editParm();
 		}  	
-	   	function backpage(){window.location.href="ele-param1.html";}
-	     		setTimeout(backpage,500); 
+	 //  	function backpage(){window.location.href="ele-param1.html";}
+	 //    		setTimeout(backpage,500); 
 	  		});
 	    $("#cancel").click(function(){
 	     window.location.href="ele-param1.html";
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
index 415fbda..efbeed9 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
@@ -596,13 +596,62 @@
 			return arr;
 		}
 		
+		function getUpdateArredit(){
+			var arr = new Array();
+			for(var i=0;i<suoyin;i++){
+				var battString = "#battname"+i;
+				var index = String(i);
+				console.info(battString);
+				var obj = {
+						StationId : $("#StationId").val(),	// 鏈烘埧缂栧彿
+						StationName : ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val()),	// 鎷兼帴鏈烘埧鍚嶇О
+						StationName1 : $("#station_name1").val(),		// 鐪�
+						StationName2 : $("#city").val(),		// 甯�
+						StationName5 : $("#county").val(),		// 鍖�/鍘�
+						StationName3 : $("#StationName3").val(),		// 鏈烘埧鍚嶇О
+						StationName4 : $("#StationName4").val(),		// 璁惧鍚嶇О
+						StationIp : $("#StationIp").val(),				//鏈烘埧ip
+						FBSDeviceId : $("#FBSDeviceId").val(),				//璁惧id
+						FbsDeviceIp : $("#FbsDeviceIp").val(),				//璁惧ip
+						FbsDeviceIp_YM : $("#FbsDeviceIp_YM").val(),			// 璁惧鎺╃爜
+						FbsDeviceIp_WG : $("#FbsDeviceIp_WG").val(),			// 缃戝叧
+						FBSDeviceName : $("#FBSDeviceName").val(),			//璁惧鍚嶇О
+						GroupIndexInFBSDevice : i,	//fbs璁惧绱㈠紩
+						BattGroupId : $("#BattGroupId").val(),				//鐢垫睜缁刬d
+						BattGroupNum : $("#BattGroupNum").val(),			//鏈烘埧鍐呯數姹犵粍缂栧彿
+						BattGroupName : $(battString).val(),
+						FloatVolLevel : $("#FloatVolLevel").val(),			//娴厖鐢靛帇闃�鍊�
+						OfflineVolLevel : $("#OfflineVolLevel").val(),			//绂荤嚎鐢靛帇闃�鍊�
+						BattFloatCurrent : $("#BattFloatCurrent").val(),		//娴厖鐢垫祦闃�鍊�
+						MonCount : $("#MonCount").val(),				//鍗曚綋鏁伴噺
+						MonCapStd : $("#MonCapStd").val(),				//鏍囩О瀹归噺
+						MonVolStd : $("#MonVolStd").val(),				//鏍囩О鐢靛帇
+						MonResStd : $("#MonResStd").val(),				//鏍囩О鍐呴樆
+						MonSerStd : $("#MonSerStd").val(),				//鏍囩О鐢靛
+						MonVolLowToAvg : $("#MonVolLowToAvg").val(),			//鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+				
+						Load_curr : $("#Load_curr").val(),				//璐熻浇鐢垫祦
+						DisCurrMax : $("#DisCurrMax").val(),				//鏈�澶ф牳瀹圭數娴�
+						station_phone : $("#station_phone").val(),			//鍩虹珯鍙风爜
+										
+						BattProducer : $("#BattProducer").val(),			//鐢垫睜鍝佺墝
+						BattModel : $("#BattModel").val(),				//鐢垫睜鍨嬪彿
+						BattProductDate :  $("#startTestrecord").val()+" 00:00:00",		//鐢垫睜鐢熶骇鏃ユ湡
+						BattInUseDate :  $("#endTestrecord").val()+" 00:00:00",			//鐢垫睜浣跨敤鏃ユ湡
+						install_user : $("#install_user").val(),			//瀹夎浜哄憳
+				}
+				arr.push(obj);
+			}
+			console.info(arr);
+			return arr;
+		}
 </script> 
 <script type="text/javascript">  
 	$(function(){
 		$(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
 		$("#sure").click(function(){
 			if(nullOrn()){
-				if(temp[34]=="edit"){
+				if(temp[34]!="edit"){
 					creatgroupid();//鎻愪氦涔嬪墠鍐嶆楠岃瘉锛屽垱寤篒D
 					addBattnew(); 	//鎻愪氦
 				}else{
@@ -652,8 +701,9 @@
  	}
     
       //淇敼鐢垫睜缁勶紝娣诲姞鍒癇ATTINF
-	function editParm(){
-   		var parm = getUpdateArr();	
+	function editBatt(){
+   		var parm = getUpdateArredit();
+   		console.info(parm);	
    		$.ajax({
 				type: "post", 				
 		        url: "BattInfAction!update",				
diff --git a/gx_tieta/WebRoot/mobil/ele-param2.html b/gx_tieta/WebRoot/mobil/ele-param2.html
index c13f575..70fe2da 100644
--- a/gx_tieta/WebRoot/mobil/ele-param2.html
+++ b/gx_tieta/WebRoot/mobil/ele-param2.html
@@ -313,7 +313,98 @@
 			   	//console.info(arrcookie);
 			   	var json=window.JSON.stringify(arrcookie);
 			   	setCookie("eleparm",json);  //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
+ 				
  		}
+ 		
+ 		// 鏍规嵁鏈烘埧鐨勫悕绉版煡璇㈡満鎴跨殑淇℃伅
+				function searchHomeInfoByName(homename) {
+					var temp = {
+						binf:{
+							StationName1: '',					// 鐪�
+							StationName2: '',					// 甯�
+							StationName5: '',					// 鍖�/鍘�
+							StationName: homename		// 鏈烘埧鍚嶇О
+						}
+						,page: {
+							pageCurr: 1
+							,pageSize: 100
+						}
+					};
+					
+					var load = layer.load(1);
+					// 璇锋眰鍚庡彴
+					$.ajax({
+						type: "post", 				
+				        url: "BattInfAction!searchInform",				
+				        async:true,				
+				        dataType:'json',
+				        data:"json="+JSON.stringify(temp), 	
+				        success: function(data){
+				        	console.info(data);
+				        	data=JSON.parse(data.result);
+				        	console.warn(data);
+			        	}
+				   });
+				}
+ 		//鏌ヨ褰撳墠鏈烘埧鏈夊嚑涓數姹犵粍锛屽苟set鍏OOKIE
+	/*	function searchHomeInfoByName(id) {
+					var groupName = new Array();
+					//var index = 0;
+					var num =new Array();
+					var groupId = new Array();
+					var eleditparm = new Array();
+					//var index1 = 0;
+					var temp = {
+						binf:{
+							StationId:id,					// 鐪�	
+						}
+						,page: {
+							pageCurr: 1
+							,pageSize: 100
+						}
+					};	
+					// 璇锋眰鍚庡彴
+					$.ajax({
+						type: "post", 				
+				        url: "Battinf_applyAction!serchbystationId",				
+				        async:true,				
+				        dataType:'json',
+				        data:"json="+JSON.stringify(temp), 	
+				        success: function(data){
+				        	var data = JSON.parse(data.result)
+				        	console.info(data);
+				        	if(data.code!=0){
+					        	data = data.data;
+					        	for(var i=0;i<data.length;i++){
+						        	console.info(data[i]);
+						        	groupName[i] = data[i].binf.BattGroupName;
+						        	num[i] = data[i].num;
+						        	groupId[i] = data[i].binf.BattGroupId;
+				        			var eleditparmarr={
+				        				groupname : data[i].binf.BattGroupName,
+				        				num : data[i].num,
+				        				groupId :data[i].binf.BattGroupId,
+				        			}
+				        			eleditparm.push(eleditparmarr);	
+				        		}
+				        		 console.info(eleditparm);				        		
+				        	}				      				        	
+				        var json = JSON.stringify(groupName);
+				        var json1 =JSON.stringify(num);
+				        var json2 = JSON.stringify(groupId);
+				        
+				        //console.info(eleditparm)
+				        var jsonedit = JSON.stringify(eleditparm);
+				        setCookie("eleditparm",jsonedit);			   
+						setCookie("eleparmindex",json);             //鐢垫睜缁勫悕绉�
+						setCookie("eleparmnum",json1);				//鐢垫睜缁勭紪鍙�
+						console.info(groupName);
+						setCookie("elegroupid",json2);
+						console.info(json2);
+						//window.location.href="batt-edit.html";	
+				        }
+				    });	    
+		}		*/        
 		function setcookieedit(index){
 			var arrcookie = new Array();	
 			   	for(var i=0;i<33;i++){//鍏�33椤�
@@ -335,12 +426,20 @@
 			   	//console.info(arrcookie);
 			   	var json=window.JSON.stringify(arrcookie);
 			   	setCookie("eleparm",json);  //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�
-			   	window.location.href="batt-infor-conf-temp1.html";
+			   	console.warn(arrcookie[3]);
+			   	var stationname =arrcookie[1]+"-"+arrcookie[2]+"-"+arrcookie[4];
+			   	console.info(stationname);
+			   //	searchHomeInfoByName(stationname);
+			   	//searchHomeInfoByName(arrcookie[0]);
+			   	window.location.href="batt-edit.html";
 		}
 	// 鏌ヨ鍐呭
 		function searchBattLife(){
 			 var temp = createSearchParam();
 			var json = JSON.stringify(temp);
+			var num =new Array();
+			var groupId = new Array();
+			var groupName = new Array();
 			console.info(json);
 			arrTd = new Array();
 			var load;
@@ -359,7 +458,7 @@
 						data=data.data;
 						var index = 0;
 						var ArryTb= new Array();
-						for(i=0;i<data.length;i++){
+						for(var i=0;i<data.length;i++){
 							arrTd.push(data[i].StationId);				//鏈烘埧缂栧彿
 							arrTd.push(data[i].StationName1);				// 鐪�
 							arrTd.push(data[i].StationName2);				// 甯�
@@ -398,8 +497,18 @@
 							arrTd.push(data[i].install_user);					// 璁惧瀹夎浜哄憳
 							arrTd.push('<a onclick="getEditButIndex(this)"  id="edit" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window"'+'but-index='+i+'>淇敼</a>');
 							Page.pageAll = data[i].num;
+							groupName.push(data[i].BattGroupName);
+						    num.push(data.length);
+						    groupId.push(data[i].BattGroupId);
 						} 
-					
+					 	var json = JSON.stringify(groupName);
+				        var json1 =JSON.stringify(num);
+				        var json2 = JSON.stringify(groupId);
+   			   
+						setCookie("eleparmindex",json);             //鐢垫睜缁勫悕绉�
+						setCookie("eleparmnum",json1);				//鐢垫睜缁勭紪鍙�
+	
+						setCookie("elegroupid",json2);
 					}else{
 						Page.pageAll = 0;
 					}

--
Gitblit v1.9.1