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/endure.jsp | 114 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 88 insertions(+), 26 deletions(-) diff --git a/gx_tieta/WebRoot/endure.jsp b/gx_tieta/WebRoot/endure.jsp index 2c7e2e8..d8724a1 100644 --- a/gx_tieta/WebRoot/endure.jsp +++ b/gx_tieta/WebRoot/endure.jsp @@ -8,19 +8,18 @@ <html> <head> <base href="<%=basePath%>"> - - <title><s:text name="Batt_life_history_query"/></title> <!--鐢垫睜缁埅鑳藉姏鍘嗗彶鏌ヨ--> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link href="css/basic.css" rel="stylesheet"> - <link rel="stylesheet" href="css/BrdwMaint.css"> - <link rel="stylesheet" type="text/css" href="css/loading.css"> - <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> + <title><s:text name="Batt_life_history_query"/></title> <!--鐢垫睜缁埅鑳藉姏鍘嗗彶鏌ヨ--> + <link href="css/basic.css" rel="stylesheet"> + <link rel="stylesheet" href="css/BrdwMaint.css"> + <link rel="stylesheet" type="text/css" href="css/loading.css"> + <link href="src/css/layui.css" type="text/css" rel="stylesheet"> <style type="text/css"> body { overflow-x: hidden !important; @@ -65,25 +64,23 @@ <tr class="fWeight"> <td>鐪�</td> <!-- 鐪� --> <td>甯�</td> <!-- 甯� --> + <td>鍖�/鍘�</td> <!-- 鍖�/鍘� --> <td><s:text name="Computer_name"/></td> <!-- 鏈烘埧鍚嶇О --> <td><s:text name="Cruising_ability"/><s:text name="Type"/></td> <!-- 缁埅鑳藉姏绫诲瀷 --> <td colspan="2"><s:text name="Battery_record_time"/></td> <!-- 鐢垫睜娴嬭瘯璁板綍鏃堕棿娈� --> </tr> <tr> <td> - <select id="station_name1"> - - </select> + <select id="station_name1"></select> </td> <td> - <select id="city"> - - </select> + <select id="city"></select> </td> <td> - <select id="station_name"> - - </select> + <select id="county"></select> + </td> + <td> + <select id="station_name"></select> </td> <td> <select id="endu_type"> @@ -145,6 +142,7 @@ <div id="allShade"></div> <script type="text/javascript" src="js/loading.js"></script> <script type="text/javascript" src="js/createTab.js"></script> + <script type="text/javascript" src="src/layui.all.js"></script> <script type="text/javascript"> var Page={ pageCurr:1, @@ -285,7 +283,9 @@ } // 鐪�-甯�-鏈烘埧-鐢垫睜缁� + filterLoad = layer.load(); $(document).ready(function(){ + filterLoad = layer.load(); //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){ data=data.result; @@ -313,10 +313,16 @@ }); // 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯� - function findCity() { + function findCity(isLoad) { var data = { StationName1: $("#station_name1").val() }; + + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } + // 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競 $.ajax({ type: "post", @@ -341,27 +347,80 @@ }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){ @@ -385,6 +444,8 @@ }else{ $("#station_name").text('').html('<option>鏆傛棤鍙祴鏈烘埧绔欑偣</option>'); } + + layer.close(filterLoad); }); } @@ -395,6 +456,7 @@ num:3, //鐢垫睜鐘舵�� BattGroupId:$("#endu_type").val(), //鏌ヨ鏁版嵁 StationName:$('#station_name').val(), //鏈烘埧鍚� + StationName5:$('#county').val(), // 鍖�/鍘� StationName2:$('#city').val(), //甯� StationName1:$('#station_name1').val(), //缁存姢鍖� BattProductDate:$('#starttime').val()+" 00:00:00", @@ -407,8 +469,6 @@ var formjson; //鏌ヨ鐢垫睜缁勭殑鍘嗗彶缁埅鑳藉姏 function searchBattLife(){ - loading.showLoading(); - var jsontemp = $('#search_form').serialize(); if(formjson != jsontemp){ Page.pageCurr = 1; @@ -416,7 +476,9 @@ } var temp = createSearchParam(); - arrTd = new Array(); + arrTd = new Array(); + var load = layer.load(1); + $.ajax({ type: "post", url: "Batttestdata_infAction!serchBattLife", @@ -443,10 +505,10 @@ $('#total').text(Page.pageAll); createAllTbl(tblHd, tblBd, arrTh, arrTd, tblStatus); - loading.hideLoading(); + layer.close(load); }, error:function(){ - loading.hideLoading(); + layer.close(load); noContent.showNoContent("鏌ヨ澶辫触,璇锋鏌ョ綉缁滆繛鎺ワ紒"); } }); -- Gitblit v1.9.1