From af003e94990143664f3df0b0ea59b9fab5f94167 Mon Sep 17 00:00:00 2001
From: CJJ <Administrator@192.168.10.25>
Date: 星期五, 30 十一月 2018 16:41:40 +0800
Subject: [PATCH] 手机 电池组信息配置 新建

---
 gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html |   26 +++++++++++++++++---------
 gx_tieta/WebRoot/mobil/ele-param.html            |    9 +++++++--
 2 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
index bd88a3d..236ae9f 100644
--- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
+++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp.html
@@ -283,9 +283,13 @@
 	temp=JSON.parse(temp);
 	console.info(temp);
 	console.info(temp[30]);
+	console.info(temp[33]);
 	installstartdata(temp);
-
-	getUpdateArr();
+	if(temp[33]&&temp[33]=="new"){
+		
+	}else{
+		
+	}	
 	function installstartdata(temp){
 		//$("#StationId").value=temp[0];
 		//var t=document.getElementById("station_name1");
@@ -378,13 +382,17 @@
    $(function(){
     $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
     $("#sure").click(function(){
-    	editParm();
-    	function backpage(){window.location.href="ele-param.html";}
-      		setTimeout(backpage,3000); 
-   		});
-    $("#cancel").click(function(){
-     window.location.href="ele-param.html";
-    });
+	    if(temp[33]&&temp[33]=="new"){
+			addBatt();
+		}else{
+			editParm();
+		}  	
+	   	function backpage(){window.location.href="ele-param.html";}
+	     		setTimeout(backpage,3000); 
+	  		});
+	    $("#cancel").click(function(){
+	     window.location.href="ele-param.html";
+	    });
    });
    function editParm(){
    		var parm = getUpdateArr();	
diff --git a/gx_tieta/WebRoot/mobil/ele-param.html b/gx_tieta/WebRoot/mobil/ele-param.html
index c2b66bd..322faf6 100644
--- a/gx_tieta/WebRoot/mobil/ele-param.html
+++ b/gx_tieta/WebRoot/mobil/ele-param.html
@@ -193,8 +193,12 @@
         window.location.href="batt-infor-conf-delete.html";   
     });
      $("#newbatt").click(function(){
-     console.info(Page.pageSize);
-        setcookieCreat(Page.pageSize-1);
+     	var currentlength = Math.floor(arrTd.length/34);
+     	if(currentlength<Page.pageSize){
+     		setcookieCreat(currentlength-1);
+     	}else{
+        	setcookieCreat(Page.pageSize-1);
+        }
         window.location.href="batt-infor-conf-temp.html";
     });
     var arrTh = [ '鏈烘埧缂栧彿', '鐪�', '鍩庡競','鍖哄幙','鏈烘埧鍚嶇О','璁惧鍚嶇О','鏈烘埧IP','FBS璁惧ID(閲嶈)','FBS璁惧IP(閲嶈)','瀛愮綉鎺╃爜','缃戝叧','FBS璁惧鍚嶇О','FBS鐢垫睜绱㈠紩(0-3)','鐢垫睜缁処D','鏈烘埧鍐呯數姹犵粍缂栧彿','鐢垫睜缁勫悕绉�','娴厖鐢靛帇闃�鍊�(V)','绂荤嚎鐢靛帇闃�鍊�(V)','娴厖鐢垫祦闃�鍊�(A)','鍗曚綋鏁伴噺','鏍囩О瀹归噺(AH)','鏍囩О鍗曚綋鐢靛帇(V)','鏍囩О鍗曚綋鍐呴樆(m惟)','鏍囩О鍗曚綋鐢靛','鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�(V)','璐熻浇鐢垫祦(A)','鏈�澶ф牳瀹圭數娴�(A)','鍩虹珯鍙风爜','鐢垫睜鍝佺墝','鐢垫睜鍨嬪彿','鐢垫睜鐢熶骇鏃ユ湡','鎶曞叆浣跨敤鏃ユ湡','瀹夎浜哄憳','閰嶇疆鎿嶄綔'];
@@ -238,6 +242,7 @@
 			   			arrcookie.push(arrTd[value]);
 			   		}
 			   	}
+			   	arrcookie.push("new");
 			   	//console.info(arrcookie);
 			   	var json=window.JSON.stringify(arrcookie);
 			   	setCookie("eleparm",json);  //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗�

--
Gitblit v1.9.1