From 2fe250ece8de95b3f70172fe5b45793ab6a3084a Mon Sep 17 00:00:00 2001
From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139>
Date: 星期五, 18 一月 2019 17:30:50 +0800
Subject: [PATCH] 未审批可更改

---
 gx_tieta/WebRoot/dataManage.jsp |  119 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 98 insertions(+), 21 deletions(-)

diff --git a/gx_tieta/WebRoot/dataManage.jsp b/gx_tieta/WebRoot/dataManage.jsp
index 200518c..dc4686e 100644
--- a/gx_tieta/WebRoot/dataManage.jsp
+++ b/gx_tieta/WebRoot/dataManage.jsp
@@ -13,6 +13,7 @@
 	<title><s:text name="Batt_charge_discharge_manage"/></title>
 	<link rel="stylesheet" type="text/css" href="css/basic.css">
 	<link rel="stylesheet" type="text/css" href="css/dtManage.css">
+	<link href="src/css/layui.css" type="text/css" rel="stylesheet">
 	<style>
 		.b8cfe5{
 			background-color:#b8cfe5;
@@ -40,6 +41,7 @@
 					<tr class="fWeight">
 						<td>鐪�</td>								<!-- 鐪� -->
 						<td>甯�</td>								<!-- 甯� -->
+						<td>鍖�/鍘�</td>								<!-- 鍖�/鍘� -->
 						<td><s:text name="Computer_site"/></td>									<!-- 鏈烘埧绔欑偣锛堟垨鏈烘埧璁惧锛� -->
 						<td><s:text name="Battery"/></td>
 						<td><s:text name="Battery_record"/></td>							<!-- 鐢垫睜娴嬭瘯璁板綍 -->
@@ -58,6 +60,10 @@
 						</td>
 						<td>
 							<select id="city" name="bmd.binf.StationName2">
+							</select>
+						</td>
+						<td>
+							<select id="county" name="bmd.binf.StationName5">
 							</select>
 						</td>
 						<td>
@@ -201,6 +207,8 @@
 </body>
 <script type="text/javascript" src="js/createTab.js"></script>
 <script type="text/javascript" src="js/query.js"></script>
+<script type="text/javascript" src="pages/js/common.js"></script>
+<script type="text/javascript" src="src/layui.all.js"></script>
 <script type="text/javascript">
 	var permits;
 	<%	Object obj=session.getAttribute("permits");
@@ -351,7 +359,7 @@
 			var binfs=new Array();
 			$('.tbl-body table tbody tr').each(function(i){
 				if($(this).hasClass('b8cfe5')){
-					binfs.push(Alltestdata[i].binf);
+					binfs.push(batttestdatas[i].binf);
 				}
 			});	 
 			if(confirm("纭鍒犻櫎杩�"+binfs.length+"鏉℃祴璇曟暟鎹悧锛�")){			
@@ -367,30 +375,27 @@
 	
 	//閫変腑鍙抽敭鑿滃崟涓殑[鏌ョ湅鏁版嵁]閫夐」璺宠浆鍒板巻鍙叉暟鎹煡璇㈤〉闈㈤�変腑鎸囧畾鐨勭數姹犵粍
 	$('#right-menu .check_data').click(function(){
-		var battgroupid=0;
-		var stationid = 0;
+		var batt = {};
 		//console.info(Alltestdata);
 		$('.tbl-body table tbody tr').each(function(i){
 			if($(this).hasClass('b8cfe5')){
-				battgroupid=Alltestdata[i].binf.BattGroupId;
-				stationid = Alltestdata[i].binf.StationId;
+				batt = Alltestdata[i].binf;
 			}
-		});	
-		$(this).attr("href","charge-test.jsp?battgroupId="+battgroupid+"&stationId="+stationid);
+		});
+		//console.log(batt);	
+		$(this).attr("href", skipUrl('charge-test.jsp', batt.StationName1, batt.StationName2,batt.StationName5, batt.StationName));
 	});
 	
 	//閫変腑鍙抽敭鑿滃崟涓殑[鏌ョ湅钀藉悗鍗曚綋缁熻鏁版嵁]閫夐」璺宠浆鍒板巻鍙叉暟鎹煡璇㈤〉闈㈤�変腑鎸囧畾鐨勭數姹犵粍
 	$('#right-menu .check_last').click(function(){
-		var battgroupid=0;
-		var stationid = 0;
+		var batt = {};
 		//console.info(Alltestdata);
 		$('.tbl-body table tbody tr').each(function(i){
 			if($(this).hasClass('b8cfe5')){
-				battgroupid = Alltestdata[i].binf.BattGroupId;
-				stationid = Alltestdata[i].binf.StationId;
+				batt = Alltestdata[i].binf;
 			}
 		});	
-		$(this).attr("href","eleAnalyse.jsp?battgroupId="+battgroupid+"&stationId="+stationid);
+		$(this).attr("href", skipUrl('eleAnalyse.jsp', batt.StationName1, batt.StationName2,batt.StationName5, batt.StationName));
 	});	
 	
 	//椤甸潰鍐呭鏁版嵁杩涜鎿嶄綔鐨勬晥鏋�
@@ -440,7 +445,7 @@
 		});
 	});
 	
-	
+	var batttestdatas;		//褰撳墠琛ㄦ牸涓殑鏁版嵁鏁扮粍(鍏朵腑鐨剆tationid鏍囪瘑浜嗗綋鍓嶆暟鎹槸灞炰簬鍐呴樆鏁版嵁杩樻槸鍏呮斁鐢垫暟鎹�)
 	var  formjson;
 	//鏍规嵁绛涢�夋潯浠舵煡璇�
 	function searchDisCharage(){
@@ -451,6 +456,7 @@
 			formjson = temp;
 		}
 		Alltestdata=new Array();
+		batttestdatas = new Array();
 		// 娓呴櫎琛ㄦ牸鍐呭
 		$('.tbl-body table').remove();
 		//鍒涘缓绛夊緟妗�
@@ -470,6 +476,7 @@
 					var alllist=list[i];
 					var tmp = $.extend(true, {}, alllist.data);
 					Alltestdata.push(tmp);
+					batttestdatas.push(alllist.data);
 					Page = alllist.data.page;
 					tbArrTd.push(alllist.data.binf.StationName);		//鏈烘埧鍚嶇О
 					tbArrTd.push(alllist.data.binf.BattGroupName);		//鐢垫睜缁勫悕绉�
@@ -597,7 +604,10 @@
 		}
 	}
 	
+	// 鐪�-甯�-鏈烘埧-鐢垫睜缁�
+	var filterLoad;
 	$(document).ready(function(){
+		filterLoad = layer.load();
 		//椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷
 		$.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
 			data=data.result;
@@ -625,10 +635,16 @@
 	});
 	
 	// 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯�
-	function findCity() {
+	function findCity(isLoad) {
 		var data = {
 			StationName1: $("#station_name1").val()
 		};
+		
+		// 鏄惁娣诲姞绛夊緟
+		if(isLoad) {
+			filterLoad = layer.load();
+		}
+		
 		// 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競
 		$.ajax({ 	
 	        type: "post", 				
@@ -653,27 +669,79 @@
 	        	}else {
 	        		$select.text('').html('<option>鏆傛棤鍙祴甯�</option>');
 	        	}
-	        	findStationNamebyStationname1();
+	        	findCounty();
 	        }
 	    });
 	}
 	
+	// 鏌ヨ鍖�/鍘�
+	function findCounty(isLoad) {
+		var tmp = {
+			StationName1:$("#station_name1").val(),
+			StationName2:$("#city").val(),
+		};
+		// 鏄惁娣诲姞绛夊緟
+		if(isLoad) {
+			filterLoad = layer.load();
+		}
+		// 鏌ヨ鍖哄幙
+		$.ajax({
+			type: 'post',
+			async: true,
+			url: "BattInfAction!serchStationName5",
+			data: "json="+JSON.stringify(tmp),
+			success:function(data) {
+				var rs = JSON.parse(data.result);
+				var $select = $("#county");
+				if(rs.code==1){
+					var _data = rs.data;
+					// 鏍规嵁鏁版嵁鏋勯�犵敓鎴愪笅鎷夊垪琛ㄧ殑鏁版嵁
+					var optsList = [];
+					for(var i=0;i<_data.length;i++){
+						var __data = _data[i];
+						var _attr = {
+							StationId: __data.StationId
+						};
+						var tmp = getOptionsData(__data.StationName5, __data.StationName5, __data, _attr);
+						optsList.push(tmp);
+					}
+					
+					// 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃
+					createOptions($select, optsList, true);
+				}else{
+					$select.text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>');
+				}
+				findStationNamebyStationname1();
+			}
+		});
+	}
+	
 	//褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯�
 	$('#station_name1').change(function(){
-		findCity();
+		findCity(true);
 	});
 	
 	//褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣
 	$('#city').change(function(){
-		findStationNamebyStationname1();
+		findCounty(true);
+	});
+	
+	//褰撳尯/鍘跨殑鍊煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣
+	$('#county').change(function(){
+		findStationNamebyStationname1(true);
 	});
 	
 	//鏍规嵁鐪侊紝甯傛煡璇㈢珯鐐�
-	function findStationNamebyStationname1(){
+	function findStationNamebyStationname1(isLoad){
 		var tmp = {
 			StationName1:$("#station_name1").val(),
-			StationName2:$("#city").val()
+			StationName2:$("#city").val(),
+			StationName5: $("#county").val()
 		};
+		// 鏄惁娣诲姞绛夊緟
+		if(isLoad) {
+			filterLoad = layer.load();
+		}
 		//var selectvalue=$("#station_name1 option:selected").val();
 		//alert(selectvalue);
 		$.post("BattInfAction!serchStationName3","json="+JSON.stringify(tmp),function(data){
@@ -702,16 +770,21 @@
 	}
 	
 	$('#station_name').change(function(){
-		findserchByBattGroupNamebystationname();
+		findserchByBattGroupNamebystationname(true);
 	});
 	
 	//鏍规嵁鐪侊紝甯傚拰鏈烘埧鏌ヨ钃勭數姹犵粍
-	function findserchByBattGroupNamebystationname(){
+	function findserchByBattGroupNamebystationname(isLoad){
 		var stationid = $("#station_name").find('option:selected').attr('stationid')?$("#station_name").find('option:selected').attr('stationid'):'';
+		// 鏄惁娣诲姞绛夊緟
+		if(isLoad) {
+			filterLoad = layer.load();
+		}
 		// 鏋勯�犳煡璇㈡潯浠�
 		var tmp = {
 			StationName1:$("#station_name1").val(),
 			StationName2:$("#city").val(),
+			StationName5: $("#county").val(),
 			StationName: $("#station_name").val(),
 			StationId: stationid
 		};
@@ -742,9 +815,12 @@
 				
 				// 鏍规嵁鏁版嵁鐢熸垚涓嬫媺鍒楄〃
 				createOptions($select, optsList, true);
+				$select.find('option:selected').eq(0).val(0);
 			}else{
 				$("#battgroup_name").text('').html('<option>鏆傛棤鍙祴钃勭數姹犵粍</option>');
 			}
+			
+			layer.close(filterLoad);
 		});
 	}
 	
@@ -908,6 +984,7 @@
 			binf:{
 				StationName1:$('#station_name1').val(),
 				StationName2:$('#city').val(),
+				StationName5: $('#county').val(),
 				StationName:$('#station_name').val(),
 				BattGroupId:$('#battgroup_name').val()
 			},

--
Gitblit v1.9.1