From b55e1b0126ac5cfc48ae9aacb5a7cd9235e26ebf Mon Sep 17 00:00:00 2001
From: CJJ <Administrator@192.168.10.26>
Date: 星期三, 21 十一月 2018 11:25:40 +0800
Subject: [PATCH] 手机电池信息统计查询

---
 gx_tieta/WebRoot/mobil/ele-infor-search2.html |  188 ++++++++++++++++++++++++++---------------------
 gx_tieta/WebRoot/mobil/mobilJs/base.js        |    2 
 2 files changed, 105 insertions(+), 85 deletions(-)

diff --git a/gx_tieta/WebRoot/mobil/ele-infor-search2.html b/gx_tieta/WebRoot/mobil/ele-infor-search2.html
index d02f5f5..ea4fd65 100644
--- a/gx_tieta/WebRoot/mobil/ele-infor-search2.html
+++ b/gx_tieta/WebRoot/mobil/ele-infor-search2.html
@@ -263,33 +263,43 @@
 	 //鏌ヨ鐢垫睜淇℃伅
 	 function searchBadBatt(){
 	 	loadshow();
+	 	var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
 	    var temp = createSearchForm();
+	    console.info(stationid);
+	    /*var temp = {
+			StationName1:$("#station_name1").val(),
+			StationName2:$("#city").val(),
+			StationName5: $("#county").val(),
+			StationName: $("#station_name").val(),
+			StationId: stationid
+		};*/
+		//console.info(temp);
 	 	var json = JSON.stringify(temp);
 	 	//console.info(json);
         arrTd = new Array();
         $.post("Batt_Maint_DealarmAction_serchByConditionNew","result="+json,function(data){
 	        data=eval("("+data.result+")");
-	        console.info(data);
+	        //console.info(data);
 	        if(data.code==1 && data.data.length>0){
 				data=data.data;
 				//console.info(data);					
 				arr=new Array();
 				index=0;
 				for(var i=0;i<data.length;i++){
-					Page.pageAll=data[i].page.pageAll;
-					arr[index++]=data[i].binf.BattGroupId;				//鐢垫睜缁刬d
-					arr[index++]=data[i].binf.StationName;				//鏈烘埧鍚嶇О
-					arr[index++]=data[i].binf.StationIp;					//鏈烘埧IP
-					arr[index++]=data[i].binf.BattGroupName;	//鐢垫睜缁勫悕绉�
-					arr[index++]=data[i].binf.BattGroupNum;				//鐢垫睜缁勫簭鍙�
-					arr[index++]=data[i].binf.MonCount;					//鍗曚綋鏁伴噺
-					arr[index++]=data[i].binf.MonCapStd;					//鏍囩О瀹归噺
-					arr[index++]=data[i].binf.MonVolStd;					//鏍囩О鍗曚綋鐢靛帇
-					arr[index++]=data[i].binf.BattProducer;				//鐢垫睜鍝佺墝
-					arr[index++]=data[i].binf.BattProductDate.substr(0,10);			//鐢垫睜鐢熶骇鏃ユ湡
-					arr[index++]=data[i].binf.BattInUseDate.substr(0,10);				//鐢垫睜瀹夎鏃ユ湡	
+					Page.pageAll=data[i].Size;
+					arr[index++]=data[i].BattGroupId;				//鐢垫睜缁刬d
+					arr[index++]=data[i].StationName;				//鏈烘埧鍚嶇О
+					arr[index++]=data[i].StationIp;					//鏈烘埧IP
+					arr[index++]=data[i].BattGroupName;	//鐢垫睜缁勫悕绉�
+					arr[index++]=data[i].BattGroupNum;				//鐢垫睜缁勫簭鍙�
+					arr[index++]=data[i].MonCount;					//鍗曚綋鏁伴噺
+					arr[index++]=data[i].MonCapStd;					//鏍囩О瀹归噺
+					arr[index++]=data[i].MonVolStd;					//鏍囩О鍗曚綋鐢靛帇
+					arr[index++]=data[i].BattProducer;				//鐢垫睜鍝佺墝
+					arr[index++]=data[i].BattProductDate.substr(0,10);			//鐢垫睜鐢熶骇鏃ユ湡
+					arr[index++]=data[i].BattInUseDate.substr(0,10);				//鐢垫睜瀹夎鏃ユ湡	
 				}
-	           console.info(Page);
+	           //console.info(Page);
 	           createTbl(tbl, arrTh, arr);
 	          
 			}else{
@@ -297,7 +307,7 @@
 				Page.pageAll = 0;
 			}
 			setPage();
-			console.info(Page);
+			//console.info(Page);
 			loadclose();     
         }).error(function(){
         	loadclose();
@@ -317,7 +327,7 @@
 			binf:{
 				StationName1:$('#mainteArea').val(),
 				StationName2:$('#city').val(),
-				StationName5:$('#county').val(),
+				StationName5:$('#country').val(),
 				StationName:$('#homeName').val(),
 				BattGroupId:$('#battgroup_name').val(),
 				BattProducer:$('#batt_producer').val(),
@@ -354,7 +364,7 @@
 		data = data.result;
 	    data = eval("("+data+")");
 	    //console.info(data);
-	    console.info(data.code);
+	    //console.info(data.code);
 	    if(data.code==1&&data.data.length>0){
 	   		var $Ostation_name1=$("#mainteArea");
 	    	$Ostation_name1.text("");
@@ -384,7 +394,7 @@
 		var data = {
 			StationName1: $("#mainteArea").val()
 		};
-		console.info(data);
+		//console.info(data);
 		// 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競
 		$.ajax({ 	
 	        type: "post", 				
@@ -395,8 +405,8 @@
 	        success: function(data){
 			data = data.result;
 		    data = eval("("+data+")");
-		    console.info(data);
-		    console.info(data.code);	   
+		    //console.info(data);
+		    //console.info(data.code);	   
 		    if(data.code==1&&data.data.length>0){
 		   		var $Ostation_name1=$("#city");
 		    	$Ostation_name1.text("");
@@ -428,7 +438,7 @@
 			StationName1: $("#mainteArea").val(),
 			StationName2:$("#city").val(),
 		};
-		console.info(data);
+		//console.info(data);
 		$.ajax({ 	
 	        type: "post", 				
 	        url: "BattInfAction!serchStationName5",				
@@ -438,8 +448,8 @@
 	        success: function(data){
 			data = data.result;
 		    data = eval("("+data+")");
-		    console.info(data);
-		    console.info(data.code);	   
+		    //console.info(data);
+		    //console.info(data.code);	   
 		    if(data.code==1&&data.data.length>0){
 		   		var $Ostation_name1=$("#country");
 		    	$Ostation_name1.text("");
@@ -482,10 +492,64 @@
 	        success: function(data){
 			data = data.result;
 		    data = eval("("+data+")");
-		    console.info(data);
-		    console.info(data.code);	   
+		    //console.info(data);
+		    //console.info(data.code);	   
 		    if(data.code==1&&data.data.length>0){
 		   		var $Ostation_name1=$("#homeName");
+		    	$Ostation_name1.text("");
+		    	var arr = new Array();
+		    	for(var i=0;i<=data.data.length;i++)
+		        {
+		           	if(i == 0){
+		           		arr.push({
+		           			val:"",
+		           			stationid:"",
+		           			txt:"鍏ㄩ儴(鍏�"+data.data.length+"涓�)",
+		           		});
+		           	}else{
+		           		arr.push({
+		           			val:data.data[i-1].StationName3,
+		           			stationid:data.data[i-1].StationId,
+		           			txt:data.data[i-1].StationName3,
+		           		});
+		           	}
+		    	}
+		    	//console.info(111111111111111);
+		    	updataSelStation($Ostation_name1, arr);
+	        }
+	       
+	        findserchByBattGroupNamebystationname(); 
+	    }
+	    });
+    }
+ 
+ //鏍规嵁鏈烘埧鑾峰彇鐢垫睜缁�   
+     function findserchByBattGroupNamebystationname(){
+		var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
+	
+		var data = {
+			StationName1: $("#mainteArea").val(),
+			StationName2:$("#city").val(),
+			StationName5:$("#country").val(),
+			StationName: $("#homeName").val(),
+			StationId: stationid
+		};
+		
+		//console.info(data);
+		$.ajax({ 	
+	        type: "post", 				
+	        url: "BattInfAction!serchBattByStation",				
+	        async:true,				
+	        dataType:'json',
+	        data:"json = "+JSON.stringify(data),	
+	        success: function(data){
+			data = data.result;
+		    data = eval("("+data+")");
+		    //console.warn();
+		    //console.info(data);
+		    //console.info(data.code);	   
+		    if(data.code==1&&data.data.length>0){
+		   		var $Ostation_name1=$("#battgroup_name");
 		    	$Ostation_name1.text("");
 		    	var arr = new Array();
 		    	for(var i=0;i<=data.data.length;i++)
@@ -497,59 +561,8 @@
 		           		});
 		           	}else{
 		           		arr.push({
-		           			val:data.data[i-1].StationId,
-		           			txt:data.data[i-1].StationName3,
-		           		});
-		           	}
-		    	}
-		    	console.info(111111111111111);
-		    	updataSelStation($Ostation_name1, arr);
-	        }
-	       
-	        findserchByBattGroupNamebystationname(); 
-	    }
-	    });
-    }
- 
- //鏍规嵁鏈烘埧鑾峰彇鐢垫睜缁�   
-     function findserchByBattGroupNamebystationname(){
-		
-		var data = {
-			StationName1: $("#mainteArea").val(),
-			StationName2:$("#city").val(),
-			StationName5:$("#country").val(),
-			StationName: $("#homeName").text(),
-			StationId: $("#homeName").val()
-		};
-		
-		console.info(data);
-		$.ajax({ 	
-	        type: "post", 				
-	        url: "BattInfAction!serchStationName3",				
-	        async:true,				
-	        dataType:'json',
-	        data:"json = "+JSON.stringify(data),	
-	        success: function(data){
-			data = data.result;
-		    data = eval("("+data+")");
-		    console.warn();
-		    console.info(data);
-		    console.info(data.code);	   
-		    if(data.code==1&&data.data.length>0){
-		   		var $Ostation_name1=$("#battgroup_name");
-		    	$Ostation_name1.text("");
-		    	var arr = new Array();
-		    	for(var i=0;i<=data.data.length;i++)
-		        {
-		           	if(i == 0){
-		           		arr.push({
-		           			val:"",
-		           			txt:"鍏ㄩ儴(鍏�"+data.data.length+"涓�)",
-		           		});
-		           	}else{
-		           		arr.push({
-		           			val:data.data[i-1].StationName3,
-		           			txt:data.data[i-1].StationName3,
+		           			val:data.data[i-1].BattGroupId,
+		           			txt:data.data[i-1].BattGroupName,
 		           		});
 		           	}
 		    	}
@@ -560,12 +573,19 @@
 	    });
     }
     
-   //褰撶淮鎶ゅ尯鏀瑰彉鏃舵洿鏂扮珯鐐�
+   //褰撶渷鏀瑰彉鏃舵洿鏂板競
    $('#mainteArea').change(function(){
    		findCity();	
-		findStationNamebyStationname1();
-   }); 	
-		
+   });
+   //褰撳競鏀瑰彉鏃舵敼鍙樺尯/鍘�
+   $('#city').change(function(){
+   		findCounty();	
+   });
+   //褰撳尯/鍘挎敼鍙樻椂鏀瑰彉鏈烘埧
+   $('#country').change(function(){
+   		findStationNamebyStationname1(); 	
+   });   	
+	//褰撴満鎴挎敼鍙樻椂锛屾洿鏂扮數姹犵粍	
 	$('#homeName').change(function(){
 		findserchByBattGroupNamebystationname();
 	});
@@ -610,7 +630,7 @@
 	$.post("BattInfAction_serchByMonVolStd",null,function(data){
 		data=data.result;
 		data=eval("("+data+")");
-		console.info(data);
+		//console.info(data);
 		if(data.code==1 && data.data.length>0){
 			var $Omonvol_std=$("#monvol_std");
 			$Omonvol_std.text("");
@@ -639,7 +659,7 @@
 		if(data.code==1 && data.data.length>0){
 			var $Omoncap_std2=$("#moncap_std2");
 			$Omoncap_std2.text=("");
-			console.info(data.data[1].MonCapStd);
+			//console.info(data.data[1].MonCapStd);
 			var arr = new Array();
 			for(var i=0;i <= data.data.length;i++){
 				if(i == 0){
diff --git a/gx_tieta/WebRoot/mobil/mobilJs/base.js b/gx_tieta/WebRoot/mobil/mobilJs/base.js
index 71d2dae..da21447 100644
--- a/gx_tieta/WebRoot/mobil/mobilJs/base.js
+++ b/gx_tieta/WebRoot/mobil/mobilJs/base.js
@@ -363,7 +363,7 @@
 		// 鏍规嵁vals鍜宼xt鍊肩敓鎴恛ption
 		for(var i = 0; i < opts.length; i++) {
 	        
-			var opt = $('<option value="'+opts[i].txt+'" stationid="'+opts[i].val+'">'+opts[i].txt+'</option>');
+			var opt = $('<option value="'+opts[i].val+'" stationid="'+opts[i].stationid+'">'+opts[i].txt+'</option>');
 			element.append(opt);
 		}
 	}

--
Gitblit v1.9.1