From 6d0d9ee5e761d990449be40b9d579e3bdb2b6acf Mon Sep 17 00:00:00 2001 From: CJJ <Administrator@USER-20180117QL> Date: 星期三, 26 十二月 2018 11:50:48 +0800 Subject: [PATCH] 修改 --- gx_tieta/WebRoot/mobil/ele-param2.html | 305 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 294 insertions(+), 11 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/ele-param2.html b/gx_tieta/WebRoot/mobil/ele-param2.html index 2cdd9c7..f5cbe0e 100644 --- a/gx_tieta/WebRoot/mobil/ele-param2.html +++ b/gx_tieta/WebRoot/mobil/ele-param2.html @@ -15,6 +15,41 @@ <script src="js/jquery-1.8.3.js"></script> <script src="mobilJs/jquery.mobile-1.4.5.min.js"></script> <style type="text/css"> + /*瑙勫畾闈㈡澘鐨勬牱寮�*/ + .ui-panel { + width: 80%; + } + .ui-panel-dismiss{ + width: 20%; + } + .ui-panel-inner{ + padding:0 !important; + } + .ui-collapsible-heading-toggle{ + padding-left: 1em !important; + } + .panel-header{ + padding: 8px 0; + font-size: 1.2em; + text-indent: 1em; + background-color: #DFDCDC; + } + /*瑙勫畾寮�鍏崇殑浣嶇疆*/ + .ui-flipswitch { + margin-left: 0.5em; + } + + .ui-field-contain{ + padding: 0 0.6em ; + } + .ui-field-contain { + border-bottom-color: #828282; + border-bottom-color: rgba(0,0,0,.15); + border-bottom-width: 1px; + border-bottom-style: none; + } + + .checkdata{ @@ -81,9 +116,41 @@ margin-top:8em; } </style> + <link rel="stylesheet" href="css/fgpanel.css"> </head> <body > - + <div class="fg-panel"> + <form> + <div class="fg-panel-header">绛涢��</div> + <div class="fg-panel-content"> + <fieldset data-role="controlgroup"> + <p>鐪�</p> + <select id="mainteArea" data-mini="true"> + <option value="">鍏ㄩ儴</option> + <option value="">涓�鏋㈢航</option> + <option value="">浜屾灑绾�</option> + <option value="">鏋㈢航妤�</option> + </select> + <p>甯�</p> + <select id="city" data-mini="true"> + <option value="">鍏ㄩ儴</option> + </select> + <p>鍖�/鍘�</p> + <select id="country" data-mini="true"> + <option value="">鍏ㄩ儴</option> + </select> + <p>鏈烘埧绔欑偣</p> + <select id="homeName" data-mini="true"> + <option value="">鍏ㄩ儴</option> + </select> + + </fieldset> + </div> + <div class="fg-panel-btn"> + <a href="javascript:panel.hide(true);" id="submit" data-role="button" class="ui-btn ui-mini ui-btn-b ui-shadow">纭畾</a> + </div> + </form> + </div> <div class="abs"> <div class="rel-full"> <div class="page-header bg-gay3"> @@ -93,7 +160,7 @@ </div> <div class="layui-col-xs6 layui-col-md10 full-height line-height40">鐢宠鐢垫睜缁勫畨瑁�</div> <div class="layui-col-xs3 layui-col-md1 full-height line-height40 t-align-right t-align-right"> - <!-- <button class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="homeInfo"><i class="fa fa fa-bars mrr4"></i>鍔熻兘</button> --> + <button onclick="javascript:panel.show();" class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="screen"><i class="fa fa fa-bars mrr4"></i>绛涢��</button> </div> </div> </div> @@ -163,6 +230,7 @@ <script src="src/layui.all.js"></script> <script type="text/javascript" src="js/tbl.js"></script> <script type="text/javascript" src="mobilJs/base.js"></script> + <script type="text/javascript" src="js/panel.js"></script> <script> var iframePopup = ''; function getEditButIndex(t){ @@ -170,7 +238,7 @@ var index = $(t).attr("but-index"); var parm = seteditparm(index); // console.info(getCookie("eleparm")); - window.location.href="batt-edit.html"; + window.location.href="batt-edit2.html"; return ; } @@ -185,6 +253,17 @@ }); + + + $(document).ready(function(){ + //setPage(); + $("#submit").off('click').on('click.cjj',function(){ + //newbattnum; + + //Page.pageCurr=1; + SearchParam(); + }); + }); // 鎼滅储鏈烘埧鑾峰彇鐒︾偣 @@ -246,7 +325,8 @@ $('#homeLocation').off('click').on('click.cjj', function() { var homeInfo = $(this).data('homeInfo'); console.warn(homeInfo); - searchBattLife(); + var temp=createSearchParam(); + searchBattLife(temp); }); @@ -293,7 +373,7 @@ function seteditparm(index){ if(arrdata.length>0){ //瀛樺叆鐨勪负鎵�鏈夊凡鏌ュ嚭鏁版嵁 console.info(arrdata); - var arr= creatYanshouObj(arrdata,index);//鐢宠楠屾敹鏂规硶銆� + var arr= creatYanshouObj(arrdata,index); return arr; }else{ alert("璇风瓑寰呭嚑绉掑悗鍐嶆彁浜ょ敵璇�"); @@ -314,7 +394,7 @@ StationName2 : arrdata[i].StationName2, // 甯� StationName5 : arrdata[i].StationName5, // 鍖�/鍘� StationName3 : arrdata[i].StationName3, // 鏈烘埧鍚嶇О - StationName4 : arrdata[i].StationName5, // 璁惧鍚嶇О + StationName4 : arrdata[i].StationName4, // 璁惧鍚嶇О StationIp :arrdata[i].StationIp, //鏈烘埧ip FBSDeviceId : arrdata[i].FBSDeviceId, //璁惧id FbsDeviceIp : arrdata[i].FbsDeviceIp, //璁惧ip @@ -341,8 +421,8 @@ BattProducer : arrdata[i].BattProducer, //鐢垫睜鍝佺墝 BattModel : arrdata[i].BattModel, //鐢垫睜鍨嬪彿 - BattProductDate : arrdata[i].BattProductDate+" 00:00:00", //鐢垫睜鐢熶骇鏃ユ湡 - BattInUseDate : arrdata[i].BattInUseDate+" 00:00:00", //鐢垫睜浣跨敤鏃ユ湡 + BattProductDate : arrdata[i].BattProductDate, //鐢垫睜鐢熶骇鏃ユ湡 + BattInUseDate : arrdata[i].BattInUseDate, //鐢垫睜浣跨敤鏃ユ湡 install_user : arrdata[i].install_user, //瀹夎浜哄憳 } } @@ -370,10 +450,24 @@ setCookie("eleparm",json); } - + function SearchParam(){ + var temp = { + page:Page, + binf:{ + StationName1:$('#mainteArea').val(), + StationName2:$('#city').val(), + StationName5: $('#country').val(), + StationName:$('#homeName').val(), + }, + }; + console.info(temp); + searchBattLife(temp) + + + } // 鏌ヨ鍐呭 - function searchBattLife(){ - var temp = createSearchParam(); + function searchBattLife(temp){ + //var temp = createSearchParam(); var json = JSON.stringify(temp); var num =new Array(); var groupId = new Array(); @@ -468,6 +562,195 @@ } + + + + //椤甸潰鍔犺浇鏃舵煡璇㈢渷 + $.post("BattInfAction_serchByStation",null,function(data){ + data = data.result; + data = eval("("+data+")"); + if(data.code==1&&data.data.length>0){ + var $Ostation_name1=$("#mainteArea"); + $Ostation_name1.text(""); + var arr = new Array(); + for(var i=0;i<=data.data.length;i++) + { + if(i == 0){ + arr.push({ + val:"", + txt:"鍏ㄩ儴(鍏�"+data.sum+"涓�)", + }); + }else{ + arr.push({ + val:data.data[i-1].StationName1, + txt:data.data[i-1].StationName1, + }); + } + } + updataSel($Ostation_name1, arr); + } + findCity(); + }); + + +//褰撶渷鏀瑰彉鏃舵洿鏂板競 + function findCity(){ + var data = { + StationName1: $("#mainteArea").val() + }; + $.ajax({ + type: "post", + url: "BattInfAction!serchStationName2", + async:true, + dataType:'json', + data:"json = "+JSON.stringify(data), + success: function(data){ + data = data.result; + data = eval("("+data+")"); + //console.info(data); + //console.info(data.code); + if(data.code==1&&data.data.length>0){ + var $Ostation_name1=$("#city"); + $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].StationName2, + txt:data.data[i-1].StationName2, + }); + } + } + updataSel($Ostation_name1, arr); + } + findCounty(); + } + }); + } + +//褰撳競鏀瑰彉鏃舵洿鏂板尯/鍘� + function findCounty(){ + var data = { + StationName1: $("#mainteArea").val(), + StationName2:$("#city").val(), + }; + //console.info(data); + $.ajax({ + type: "post", + url: "BattInfAction!serchStationName5", + async:true, + dataType:'json', + data:"json = "+JSON.stringify(data), + success: function(data){ + data = data.result; + data = eval("("+data+")"); + //console.info(data); + //console.info(data.code); + if(data.code==1&&data.data.length>0){ + var $Ostation_name1=$("#country"); + $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].StationName5, + txt:data.data[i-1].StationName5, + }); + } + } + updataSel($Ostation_name1, arr); + } + findStationNamebyStationname1(); + } + }); + } + + //褰撳尯鍘挎洿鏂版椂鏇存柊鏈烘埧 + function findStationNamebyStationname1(){ + var jifang = new Array(); + var data = { + StationName1: $("#mainteArea").val(), + StationName2:$("#city").val(), + StationName5:$("#country").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.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(); + data=data.data + for(var i=0;i<data.length;i++){ + if(data[i].Station_install==0){ + jifang.push(data[i]); + } + } + + for(var i=0;i<=jifang.length;i++) + { + if(i == 0){ + arr.push({ + val:"", + stationid:"", + txt:"鍏ㄩ儴(鍏�"+jifang.length+"涓�)", + }); + }else{ + arr.push({ + val:jifang[i-1].StationName3, + stationid:jifang[i-1].StationId, + txt:jifang[i-1].StationName3, + }); + } + } + //console.info(111111111111111); + updataSelStation($Ostation_name1, arr); + } + + + } + }); + } + + + + //褰撶渷鏀瑰彉鏃舵洿鏂板競 + $('#mainteArea').change(function(){ + findCity(); + }); + //褰撳競鏀瑰彉鏃舵敼鍙樺尯/鍘� + $('#city').change(function(){ + findCounty(); + }); + //褰撳尯/鍘挎敼鍙樻椂鏀瑰彉鏈烘埧 + $('#country').change(function(){ + findStationNamebyStationname1(); + }); + + + + $(function() { //鐐瑰嚮涓婁竴椤� -- Gitblit v1.9.1