From b7cfdc2da5f550f39134fba1519286055cbb679e Mon Sep 17 00:00:00 2001
From: 81041 <81041@192.168.10.16>
Date: 星期三, 12 十二月 2018 14:15:17 +0800
Subject: [PATCH] Merge branch 'dev_lxw' of https://whyclxw1@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw

---
 gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit.html |  502 ++++++++++++++++++++++++++++++++++++++
 gx_tieta/WebRoot/mobil/testControl.html                |    2 
 gx_tieta/WebRoot/mobil/index.html                      |    4 
 gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html      |  254 ++++++++++---------
 gx_tieta/WebRoot/mobil/ele-param1.html                 |    2 
 gx_tieta/WebRoot/mobil/batt-unapproved.html            |   12 
 6 files changed, 650 insertions(+), 126 deletions(-)

diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
index cb693bc..88bd059 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
@@ -16,6 +16,7 @@
 	<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">
 	function creatAllView(num){
@@ -179,12 +180,7 @@
 												<input type="text" id="FBSDeviceName" data-mini="true" />
 											</td>
 										</tr>
-										<tr>
-											<td>FBS鐢垫睜绱㈠紩(0-3)</td>
-											<td>
-												<input type="text" id="GroupIndexInFBSDevice" data-mini="true" />
-											</td>
-										</tr>
+									
 										<tr>
 											<td>鐢垫睜缁処D</td>
 											<td>
@@ -195,12 +191,6 @@
 											<td>鏈烘埧鍐呯數姹犵粍缂栧彿</td>
 											<td>
 												<input type="text" readonly unselectable="on" value="123" id="BattGroupNum" class="uncheck" data-mini="true" />
-											</td>
-										</tr>
-										<tr>
-											<td>鐢垫睜缁勫悕绉�</td>
-											<td>
-												<input type="text" id="BattGroupName"  data-mini="true" />
 											</td>
 										</tr>
 										<tr>
@@ -360,13 +350,71 @@
 	$(function () {
 		//setTimes($("#startTestrecord"),'2000-01-01');
 		//setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
+		creatgroupid();
 		installstartdata(temp);
-		
 	});
 	
+	function creatgroupid(){
+		var dev_id ='';
+		$.ajax({
+				type: 'post'
+				,async: true
+				,url: 'BattInfAction!searchmaxdev_id'
+				,data: null
+				,dataType: 'json'
+				,success:function(res) {
+					//console.info(res);
+					var data = JSON.parse(res.result);
+					if(data.length!=0){
+						data = data.data;
+						dev_id = data;
+						//console.info(dev_id);
+						document.getElementById("FBSDeviceId").value = dev_id;
+						var ip = getDevIp(dev_id);
+						//console.info(ip);
+						document.getElementById("FbsDeviceIp").value = ip;
+					}else{
+						alert("groupid鐢熸垚澶辫触");
+					}
+				}   
+		
+		});	
+	}
+	// 鏍规嵁璁惧id璁$畻璁惧ip
+    function getDevIp(dev_id) {
+    	var ptn = /^91([0-9]{7})$/;
+    	var ip = '';
+    	console.info(dev_id);
+    	if(ptn.test(dev_id)) {
+    		var value = Number(RegExp.$1);
+    		// console.log(value);
+    		var intNum = prefixInteger(Math.floor(value/256), 3);
+    		var resNum = prefixInteger(value%256, 3);
+    		ip = '127.000.'+intNum+'.'+resNum;
+    	}else {
+    		ip = '璁惧ID鏍煎紡涓嶆纭�';
+    	}
+    	console.info(ip);
+    	return ip;
+    }
+    // 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊�   //
+  	function setFloatAndoutLine() {
+  		var vol = $('#MonVolStd').val();
+  		var monnum = $('#MonCount').val();
+  		var chargeVol = (vol*1.117*monnum).toFixed(1);		// 娴厖鐢靛帇闃�鍊�
+		var outlineVol = (vol*1.073*monnum).toFixed(1);		// 绂荤嚎鐢靛帇闃�鍊�
+	
+		$('#BattFloatCurrent').val(chargeVol);		// 娴厖鐢靛帇闃�鍊�
+		$('#OfflineVolLevel').val(outlineVol);	// 绂荤嚎鐢靛帇闃�鍊�
+ 	}
+ 	
+    function prefixInteger(num, length) {
+ 		return (num/Math.pow(3,length)).toFixed(length).substr(2);
+	}
+	
+	//瀵煎叆琛ㄦ牸榛樿鏁版嵁
 	function installstartdata(temp){
-		//$("#StationId").value=temp[0];
-		//var t=document.getElementById("station_name1");
+		creatgroupid();
 		document.getElementById("StationId").value = temp[0];
 		document.getElementById("station_name1").value = temp[1];
 		document.getElementById("city").value = temp[2];			//甯�
@@ -374,15 +422,15 @@
 		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("FBSDeviceId").value = dev_id;	
 		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("GroupIndexInFBSDevice").value = temp[12];
 		document.getElementById("BattGroupId").value = temp[13];
 		document.getElementById("BattGroupNum").value = temp[14];
-		document.getElementById("BattGroupName").value = temp[15];
+		//document.getElementById("BattGroupName").value = temp[15];
 		document.getElementById("FloatVolLevel").value = temp[16];
 		document.getElementById("OfflineVolLevel").value = temp[17];
 		document.getElementById("BattFloatCurrent").value = temp[18];
@@ -402,51 +450,59 @@
 		setTimes($("#startTestrecord"),temp[30]);
 		setTimes($("#endTestrecord"),temp[31]);
 		document.getElementById("install_user").value = temp[32];
+		setFloatAndoutLine();
 	}
-
 	
 	// 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁�
 		function getUpdateArr(){
 			var arr = new Array();
-			var obj = new Object();
-			obj.StationId = $("#StationId").val();	// 鏈烘埧缂栧彿
-			obj.StationName = ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val());	// 鎷兼帴鏈烘埧鍚嶇О
-			obj.StationName1 = $("#station_name1").val();		// 鐪�
-			obj.StationName2 = $("#city").val();		// 甯�
-			obj.StationName5 = $("#county").val();		// 鍖�/鍘�
-			obj.StationName3 = $("#StationName3").val();		// 鏈烘埧鍚嶇О
-			obj.StationName4 = $("#StationName4").val();		// 璁惧鍚嶇О
-			obj.StationIp = $("#StationIp").val();				//鏈烘埧ip
-			obj.FBSDeviceId = $("#FBSDeviceId").val();				//璁惧id
-			obj.FbsDeviceIp = $("#FbsDeviceIp").val();				//璁惧ip
-			obj.FbsDeviceIp_YM = $("#FbsDeviceIp_YM").val();			// 璁惧鎺╃爜
-			obj.FbsDeviceIp_WG = $("#FbsDeviceIp_WG").val();			// 缃戝叧
-			obj.FBSDeviceName = $("#FBSDeviceName").val();			//璁惧鍚嶇О
-			obj.GroupIndexInFBSDevice = $("#GroupIndexInFBSDevice").val();	//fbs璁惧绱㈠紩
-			obj.BattGroupId = $("#BattGroupId").val();				//鐢垫睜缁刬d
-			obj.BattGroupNum = $("#BattGroupNum").val();			//鏈烘埧鍐呯數姹犵粍缂栧彿
-			obj.BattGroupName = $("#BattGroupName").val();			//鐢垫睜缁勫悕绉�
-			obj.FloatVolLevel = $("#FloatVolLevel").val();			//娴厖鐢靛帇闃�鍊�
-			obj.OfflineVolLevel = $("#OfflineVolLevel").val();			//绂荤嚎鐢靛帇闃�鍊�
-			obj.BattFloatCurrent = $("#BattFloatCurrent").val();		//娴厖鐢垫祦闃�鍊�
-			obj.MonCount = $("#MonCount").val();				//鍗曚綋鏁伴噺
-			obj.MonCapStd = $("#MonCapStd").val();				//鏍囩О瀹归噺
-			obj.MonVolStd = $("#MonVolStd").val();				//鏍囩О鐢靛帇
-			obj.MonResStd = $("#MonResStd").val();				//鏍囩О鍐呴樆
-			obj.MonSerStd = $("#MonSerStd").val();				//鏍囩О鐢靛
-			obj.MonVolLowToAvg = $("#MonVolLowToAvg").val();			//鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
-			
-			
-			obj.Load_curr = $("#Load_curr").val();				//璐熻浇鐢垫祦
-			obj.DisCurrMax = $("#DisCurrMax").val();				//鏈�澶ф牳瀹圭數娴�
-			obj.station_phone = $("#station_phone").val();			//鍩虹珯鍙风爜
-							
-			obj.BattProducer = $("#BattProducer").val();			//鐢垫睜鍝佺墝
-			obj.BattModel = $("#BattModel").val();				//鐢垫睜鍨嬪彿
-			obj.BattProductDate =  $("#startTestrecord").val();		//鐢垫睜鐢熶骇鏃ユ湡
-			obj.BattInUseDate =  $("#endTestrecord").val();			//鐢垫睜浣跨敤鏃ユ湡
-			obj.install_user = $("#install_user").val();			//瀹夎浜哄憳
-			arr.push(obj);
+			for(var i=0;i<suoyin;i++){
+				var battString = "#battname"+i;
+				var index = String(i);
+				console.info(battString);
+				var obj = {
+					apply_date : new Date().format("yyyy-MM-dd hh:mm:ss"),
+					binf:{
+						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;
 		}
@@ -455,72 +511,34 @@
  <script type="text/javascript">  
    $(function(){
     $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
-    $("#sure").click(function(){
-	    if(temp[33]&&temp[33]=="new"){
-			addBatt();
-		}else{
-			editParm();
-		}  	
+    $("#sure").click(function(){   
+		addBatt(); 	
 	   	function backpage(){window.location.href="ele-param1.html";}
 	     		setTimeout(backpage,500); 
 	  		});
-	    $("#cancel").click(function(){
-	     window.location.href="ele-param1.html";
-	    });
+	   // $("#cancel").click(function(){
+	   //  window.location.href="ele-param1.html";
+	   // });
    });
-   function editParm(){
-   		var parm = getUpdateArr();	
-   		$.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("淇敼鐢垫睜缁勫け璐�!");
-	        	}
- 		});
-   }
-   function addBatt(){
-		var parm = getUpdateArr();	
-		$.ajax({
-			type: "post", 				
-	        url: "BattInfAction!add",				
-	        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("娣诲姞鐢垫睜缁勫彂鐢熼敊璇�!");
-        	}
-        });
-	}
-  
  	
-	
-  
-        /* 鎿嶄綔鎴愬姛 
+ 	function addBatt(){
+ 		var temp = JSON.stringify(getUpdateArr());
+ 		console.info(temp);
+ 		$.ajax({
+ 			type: 'post',
+			async: true,
+			url: 'Battinf_applyAction!add',
+			data: "json="+temp,
+			dataType: 'json',
+			success:function(data) {
+ 				console.info(data);
+ 			}
+ 		});
+ 	}
+       
+    /* 鎿嶄綔鎴愬姛 
    $('#changeSuc').popup('open');
        鎿嶄綔澶辫触
    $('#changeErr').popup('open'); */
    </script>
-</html> 
\ No newline at end of file
+</html>
diff --git a/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit.html b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit.html
new file mode 100644
index 0000000..4c0cf17
--- /dev/null
+++ b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit.html
@@ -0,0 +1,502 @@
+<!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">
+	function creatAllView(num){
+        var allString=''
+           ,i=0;
+       if(num>4){return false}
+       for(i=0;i<num;i++){
+         allString+=creatBattView(i);
+       }
+      $("#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; 
+  }	
+  	var temp = getCookie("eleparm");
+	//console.info(temp);
+	temp=JSON.parse(temp);
+	console.info(temp);
+	console.info(temp[30]);
+	console.info(temp[33]);
+	var suoyin = temp[33];
+	
+   $(function(){creatAllView(4)});
+	</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: 8.5em;
+        }
+        .hbg{
+            background-color:#ddd9;
+        }
+        #battdata {
+            background-color:#dddddd54
+        }
+        .ui-select .ui-btn select{
+            width:77%;
+        }
+	</style>
+	<link rel="stylesheet" href="css/fgpanel.css">
+</head>
+<body>
+	<div data-role="page">
+		
+		<!-- 澶撮儴鍐呭 -->
+		<div data-role="header" data-position="fixed">
+			<a href="ele-param1.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>
+		<!-- 涓讳綋鍐呭 -->
+		<div data-role="main">
+			<!-- <div class="set-option"> -->
+								<table class="layout-set">
+									<tbody>
+										<tr>
+											<td>鏈烘埧缂栧彿</td>
+											<td>
+												<input type="text" id="StationId" 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" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>FBS璁惧IP(閲嶈)</td>
+											<td>
+												<input type="text" id="FbsDeviceIp" 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>FBS鐢垫睜绱㈠紩(0-3)</td>
+											<td>
+												<input type="text" id="GroupIndexInFBSDevice" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鐢垫睜缁処D</td>
+											<td>
+												<input type="text" readonly unselectable="on" value="123" id="BattGroupId" class="uncheck" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鏈烘埧鍐呯數姹犵粍缂栧彿</td>
+											<td>
+												<input type="text" readonly unselectable="on" value="123" id="BattGroupNum" class="uncheck" data-mini="true" />
+											</td>
+										</tr>
+										<tr>
+											<td>鐢垫睜缁勫悕绉�</td>
+											<td>
+												<input type="text" id="BattGroupName"  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 () {
+		//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];
+	}
+
+	
+	// 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁�
+		function getUpdateArr(){
+			var arr = new Array();
+			var obj = new Object();
+			obj.StationId = $("#StationId").val();	// 鏈烘埧缂栧彿
+			obj.StationName = ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val());	// 鎷兼帴鏈烘埧鍚嶇О
+			obj.StationName1 = $("#station_name1").val();		// 鐪�
+			obj.StationName2 = $("#city").val();		// 甯�
+			obj.StationName5 = $("#county").val();		// 鍖�/鍘�
+			obj.StationName3 = $("#StationName3").val();		// 鏈烘埧鍚嶇О
+			obj.StationName4 = $("#StationName4").val();		// 璁惧鍚嶇О
+			obj.StationIp = $("#StationIp").val();				//鏈烘埧ip
+			obj.FBSDeviceId = $("#FBSDeviceId").val();				//璁惧id
+			obj.FbsDeviceIp = $("#FbsDeviceIp").val();				//璁惧ip
+			obj.FbsDeviceIp_YM = $("#FbsDeviceIp_YM").val();			// 璁惧鎺╃爜
+			obj.FbsDeviceIp_WG = $("#FbsDeviceIp_WG").val();			// 缃戝叧
+			obj.FBSDeviceName = $("#FBSDeviceName").val();			//璁惧鍚嶇О
+			obj.GroupIndexInFBSDevice = $("#GroupIndexInFBSDevice").val();	//fbs璁惧绱㈠紩
+			obj.BattGroupId = $("#BattGroupId").val();				//鐢垫睜缁刬d
+			obj.BattGroupNum = $("#BattGroupNum").val();			//鏈烘埧鍐呯數姹犵粍缂栧彿
+			obj.BattGroupName = $("#BattGroupName").val();			//鐢垫睜缁勫悕绉�
+			obj.FloatVolLevel = $("#FloatVolLevel").val();			//娴厖鐢靛帇闃�鍊�
+			obj.OfflineVolLevel = $("#OfflineVolLevel").val();			//绂荤嚎鐢靛帇闃�鍊�
+			obj.BattFloatCurrent = $("#BattFloatCurrent").val();		//娴厖鐢垫祦闃�鍊�
+			obj.MonCount = $("#MonCount").val();				//鍗曚綋鏁伴噺
+			obj.MonCapStd = $("#MonCapStd").val();				//鏍囩О瀹归噺
+			obj.MonVolStd = $("#MonVolStd").val();				//鏍囩О鐢靛帇
+			obj.MonResStd = $("#MonResStd").val();				//鏍囩О鍐呴樆
+			obj.MonSerStd = $("#MonSerStd").val();				//鏍囩О鐢靛
+			obj.MonVolLowToAvg = $("#MonVolLowToAvg").val();			//鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+			
+			
+			obj.Load_curr = $("#Load_curr").val();				//璐熻浇鐢垫祦
+			obj.DisCurrMax = $("#DisCurrMax").val();				//鏈�澶ф牳瀹圭數娴�
+			obj.station_phone = $("#station_phone").val();			//鍩虹珯鍙风爜
+							
+			obj.BattProducer = $("#BattProducer").val();			//鐢垫睜鍝佺墝
+			obj.BattModel = $("#BattModel").val();				//鐢垫睜鍨嬪彿
+			obj.BattProductDate =  $("#startTestrecord").val();		//鐢垫睜鐢熶骇鏃ユ湡
+			obj.BattInUseDate =  $("#endTestrecord").val();			//鐢垫睜浣跨敤鏃ユ湡
+			obj.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(temp[33]&&temp[33]=="new"){
+			addBatt();
+		}else{
+			editParm();
+		}  	
+	   	function backpage(){window.location.href="ele-param1.html";}
+	     		setTimeout(backpage,500); 
+	  		});
+	    $("#cancel").click(function(){
+	     window.location.href="ele-param1.html";
+	    });
+   });
+   function editParm(){
+   		var parm = getUpdateArr();	
+   		$.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("淇敼鐢垫睜缁勫け璐�!");
+	        	}
+ 		});
+   }
+   function addBatt(){
+		var parm = getUpdateArr();	
+		$.ajax({
+			type: "post", 				
+	        url: "BattInfAction!add",				
+	        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("娣诲姞鐢垫睜缁勫彂鐢熼敊璇�!");
+        	}
+        });
+	}
+  
+ 	
+	
+  
+        /* 鎿嶄綔鎴愬姛 
+   $('#changeSuc').popup('open');
+       鎿嶄綔澶辫触
+   $('#changeErr').popup('open'); */
+   </script>
+</html> 
\ No newline at end of file
diff --git a/gx_tieta/WebRoot/mobil/batt-unapproved.html b/gx_tieta/WebRoot/mobil/batt-unapproved.html
index ffd4fa2..7fa589f 100644
--- a/gx_tieta/WebRoot/mobil/batt-unapproved.html
+++ b/gx_tieta/WebRoot/mobil/batt-unapproved.html
@@ -124,7 +124,11 @@
 				</ul>
 			</div>		
 		</div>  
-		
+		<div data-role="popup" id="myPopup" 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="" id="edit" class="ui-btn ui-corner-all ui-shadow  ui-btn-icon-left ui-icon-edit" >淇敼</a>	  
+        <a href="" id="delete" class="ui-btn ui-corner-all ui-shadow  ui-btn-icon-left ui-icon-forbidden"  data-icon="delete">鍒犻櫎</a>
+        </div>    
 		
     </div>    
 	</div>
@@ -158,7 +162,7 @@
 
        
     $("#edit").click(function(){
-        window.location.href="batt-infor-conf-temp.html";   
+        window.location.href="batt-infor-unapproved-edit.html";   
     });
     $("#delete").click(function(){  //鍒犻櫎鐢垫睜缁�
     	var temp = getCookie("eleparm");
@@ -169,7 +173,7 @@
        // window.location.href="batt-infor-conf-delete.html";   
     });
      
-    var arrTh = [ '鏈烘埧缂栧彿', '鐪�', '鍩庡競','鍖哄幙','鏈烘埧鍚嶇О','璁惧鍚嶇О','鏈烘埧IP','FBS璁惧ID(閲嶈)','FBS璁惧IP(閲嶈)','瀛愮綉鎺╃爜','缃戝叧','FBS璁惧鍚嶇О','FBS鐢垫睜绱㈠紩(0-3)','鐢垫睜缁処D','鏈烘埧鍐呯數姹犵粍缂栧彿','鐢垫睜缁勫悕绉�','娴厖鐢靛帇闃�鍊�(V)','绂荤嚎鐢靛帇闃�鍊�(V)','娴厖鐢垫祦闃�鍊�(A)','鍗曚綋鏁伴噺','鏍囩О瀹归噺(AH)','鏍囩О鍗曚綋鐢靛帇(V)','鏍囩О鍗曚綋鍐呴樆(m惟)','鏍囩О鍗曚綋鐢靛','鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)','璐熻浇鐢垫祦(A)','鏈�澶ф牳瀹圭數娴�(A)','鍩虹珯鍙风爜','鐢垫睜鍝佺墝','鐢垫睜鍨嬪彿','鐢垫睜鐢熶骇鏃ユ湡','鎶曞叆浣跨敤鏃ユ湡','瀹夎浜哄憳','鏈�氳繃鍘熷洜'];
+    var arrTh = [ '鏈烘埧缂栧彿', '鐪�', '鍩庡競','鍖哄幙','鏈烘埧鍚嶇О','璁惧鍚嶇О','鏈烘埧IP','FBS璁惧ID(閲嶈)','FBS璁惧IP(閲嶈)','瀛愮綉鎺╃爜','缃戝叧','FBS璁惧鍚嶇О','FBS鐢垫睜绱㈠紩(0-3)','鐢垫睜缁処D','鏈烘埧鍐呯數姹犵粍缂栧彿','鐢垫睜缁勫悕绉�','娴厖鐢靛帇闃�鍊�(V)','绂荤嚎鐢靛帇闃�鍊�(V)','娴厖鐢垫祦闃�鍊�(A)','鍗曚綋鏁伴噺','鏍囩О瀹归噺(AH)','鏍囩О鍗曚綋鐢靛帇(V)','鏍囩О鍗曚綋鍐呴樆(m惟)','鏍囩О鍗曚綋鐢靛','鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)','璐熻浇鐢垫祦(A)','鏈�澶ф牳瀹圭數娴�(A)','鍩虹珯鍙风爜','鐢垫睜鍝佺墝','鐢垫睜鍨嬪彿','鐢垫睜鐢熶骇鏃ユ湡','鎶曞叆浣跨敤鏃ユ湡','瀹夎浜哄憳','鏈�氳繃鍘熷洜','鎿嶄綔'];
 	dataArr = [];
     var startTime = "1980-01-01";
     var endTime = new Date().format('yyyy-MM-dd');
@@ -224,7 +228,7 @@
 			
 			for(i=0;i<340;i++){
 			 
-			       
+			       if(i%35==34){arrTd[i]='<a onclick="getButIndex(this)" href="#myPopup" id="butt" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window"'+'but-index='+i+'>淇敼鎴栧垹闄�</a>';continue;}
 					 arrTd[i]=i*10;
 					}
 						
diff --git a/gx_tieta/WebRoot/mobil/ele-param1.html b/gx_tieta/WebRoot/mobil/ele-param1.html
index f0e30b6..22318f1 100644
--- a/gx_tieta/WebRoot/mobil/ele-param1.html
+++ b/gx_tieta/WebRoot/mobil/ele-param1.html
@@ -152,7 +152,7 @@
 		<div data-role="footer" data-position="fixed" data-theme="a">    
 			<div data-role="navbar">
 				<ul>
-				  <li><a href="index.html" 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>
+				  <li><a href="index.html" id="cancel"  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>
 				  <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>
 				</ul>
 			</div>		
diff --git a/gx_tieta/WebRoot/mobil/index.html b/gx_tieta/WebRoot/mobil/index.html
index 8c87962..dbb34c6 100644
--- a/gx_tieta/WebRoot/mobil/index.html
+++ b/gx_tieta/WebRoot/mobil/index.html
@@ -22,7 +22,7 @@
 				<a href="machineroomM.html" target="_top" data-i18n="main.index">娴嬭瘯鏁版嵁</a>
 			</li>
 			<li>
-				<a href="testControl.html" target="_top" data-i18n="main.warningmanagement">鐢垫睜閰嶇疆</a>
+				<a href="testControl.html" target="_top" data-i18n="main.warningmanagement">鐢垫睜瀹夎鐢宠</a>
 			</li>
 			<li>
 				<a href="auditDetail.html" target="_top" data-i18n="main.warningmanagement">瀹℃壒璇︽儏</a>
@@ -89,4 +89,4 @@
 </div>
 	
 	</body>
-</html>
+</html>
diff --git a/gx_tieta/WebRoot/mobil/testControl.html b/gx_tieta/WebRoot/mobil/testControl.html
index 023a5ca..9b31db9 100644
--- a/gx_tieta/WebRoot/mobil/testControl.html
+++ b/gx_tieta/WebRoot/mobil/testControl.html
@@ -20,7 +20,7 @@
 			<div data-role="content">
 				<ul data-role="listview" data-inset="true">
 					<li>
-						<a href="ele-param.html" target="_top">鐢垫睜缁勪俊鎭厤缃�</a>
+						<a href="ele-param1.html" target="_top">鐢宠娣诲姞鐢垫睜缁�</a>
 					</li>
 				</ul>
 				

--
Gitblit v1.9.1