From b6a397a31a2a2b4f50b3488decaeb931da204442 Mon Sep 17 00:00:00 2001
From: CJJ <Administrator@192.168.10.25>
Date: 星期五, 30 十一月 2018 17:06:27 +0800
Subject: [PATCH] 手机 电池组信息配置删除

---
 gx_tieta/WebRoot/mobil/ele-param.html |   82 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 77 insertions(+), 5 deletions(-)

diff --git a/gx_tieta/WebRoot/mobil/ele-param.html b/gx_tieta/WebRoot/mobil/ele-param.html
index 322faf6..ba0b65e 100644
--- a/gx_tieta/WebRoot/mobil/ele-param.html
+++ b/gx_tieta/WebRoot/mobil/ele-param.html
@@ -189,8 +189,13 @@
     $("#edit").click(function(){
         window.location.href="batt-infor-conf-temp.html";   
     });
-    $("#delete").click(function(){
-        window.location.href="batt-infor-conf-delete.html";   
+    $("#delete").click(function(){  //鍒犻櫎鐢垫睜缁�
+    	var temp = getCookie("eleparm");
+    	temp = JSON.parse(temp);
+    	console.info(temp);
+        var parm = getUpdateArr(temp);
+        delBatt(parm);
+       // window.location.href="batt-infor-conf-delete.html";   
     });
      $("#newbatt").click(function(){
      	var currentlength = Math.floor(arrTd.length/34);
@@ -321,9 +326,7 @@
 					createTbl(tblCon, arrTh, arrTd);			
 				}	
 			});	 
-			
-			
-			
+		
 			/* 妯℃嫙鏁版嵁鍋氬ソ灏卞垹锛侊紒锛侊紒锛侊紒锛侊紒 */
 			
 			/*for(i=0;i<340;i++){
@@ -342,7 +345,76 @@
 					
 			/* 妯℃嫙鏁版嵁鍋氬ソ灏卞垹锛侊紒锛侊紒锛侊紒锛侊紒 */				
 		}
+		function getUpdateArr(temp){
+			var arr = new Array();
+			var obj = new Object();
+			obj.StationId = temp[0];	// 鏈烘埧缂栧彿
+			obj.StationName = (temp[1]+"-"+temp[2]+"-"+temp[4]+"-"+temp[5]);	// 鎷兼帴鏈烘埧鍚嶇О
+			obj.StationName1 = temp[1];		// 鐪�
+			obj.StationName2 = temp[2];		// 甯�
+			obj.StationName5 = temp[3];		// 鍖�/鍘�
+			obj.StationName3 = temp[4];		// 鏈烘埧鍚嶇О
+			obj.StationName4 = temp[5];		// 璁惧鍚嶇О
+			obj.StationIp = temp[6];				//鏈烘埧ip
+			obj.FBSDeviceId = temp[7];				//璁惧id
+			obj.FbsDeviceIp = temp[8];				//璁惧ip
+			obj.FbsDeviceIp_YM = temp[9];			// 璁惧鎺╃爜
+			obj.FbsDeviceIp_WG = temp[10];			// 缃戝叧
+			obj.FBSDeviceName = temp[11];			//璁惧鍚嶇О
+			obj.GroupIndexInFBSDevice = temp[12];	//fbs璁惧绱㈠紩
+			obj.BattGroupId = temp[13];				//鐢垫睜缁刬d
+			obj.BattGroupNum = temp[14];			//鏈烘埧鍐呯數姹犵粍缂栧彿
+			obj.BattGroupName = temp[15];			//鐢垫睜缁勫悕绉�
+			obj.FloatVolLevel = temp[16];			//娴厖鐢靛帇闃�鍊�
+			obj.OfflineVolLevel = temp[17];			//绂荤嚎鐢靛帇闃�鍊�
+			obj.BattFloatCurrent = temp[18];		//娴厖鐢垫祦闃�鍊�
+			obj.MonCount = temp[19];				//鍗曚綋鏁伴噺
+			obj.MonCapStd = temp[20];				//鏍囩О瀹归噺
+			obj.MonVolStd = temp[21];				//鏍囩О鐢靛帇
+			obj.MonResStd = temp[22];				//鏍囩О鍐呴樆
+			obj.MonSerStd = temp[23];				//鏍囩О鐢靛
+			obj.MonVolLowToAvg = temp[24];			//鍗曚綋鐢靛帇娆′綆鍋忕Щ閲�
+			
+			
+			obj.Load_curr = temp[25];				//璐熻浇鐢垫祦
+			obj.DisCurrMax = temp[26];				//鏈�澶ф牳瀹圭數娴�
+			obj.station_phone = temp[27];			//鍩虹珯鍙风爜
+							
+			obj.BattProducer = temp[28];			//鐢垫睜鍝佺墝
+			obj.BattModel = temp[29];				//鐢垫睜鍨嬪彿
+			obj.BattProductDate =  temp[30];		//鐢垫睜鐢熶骇鏃ユ湡
+			obj.BattInUseDate =  temp[31];			//鐢垫睜浣跨敤鏃ユ湡
+			obj.install_user = temp[32];			//瀹夎浜哄憳
+			arr.push(obj);
+			console.info(arr);
+			return arr;
+		}	
 	
+	//鍒犻櫎鐢垫睜缁�
+		function delBatt(temp){
+			$.ajax({
+				type: "post", 				
+		        url: "BattInfAction!delete",				
+		        async:true,				
+		        dataType:'text',
+		        data:"json="+JSON.stringify(temp),	
+		        success: function(data){							        	
+					data = eval('('+data+')');
+					var model = eval('('+data.result+')');
+					console.info(model);
+					if(model.code ==1){
+						alert("鍒犻櫎鐢垫睜缁勬垚鍔�!");
+						function searchBattLife();
+					}else{
+						alert("鍒犻櫎鐢垫睜缁勫け璐�!");
+					}			
+	        	},
+	        	error:function(){
+	        		alert("鍒犻櫎鐢垫睜缁勫け璐�!");
+	        	}
+	        });
+		}
+			
 	function createSearchForm(){
 		var temp={
 				page:Page,

--
Gitblit v1.9.1