From c02e430f16cb51cabb6f4b24f99ec48efc7b0596 Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@192.168.10.26> Date: 星期三, 21 十一月 2018 11:59:20 +0800 Subject: [PATCH] Merge branch 'dev_lxw' of https://whyccjj@gitlab.com/whyclxw1/gx_tieta.git into dev_lxw --- gx_tieta/WebRoot/dischargetest.jsp | 172 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 127 insertions(+), 45 deletions(-) diff --git a/gx_tieta/WebRoot/dischargetest.jsp b/gx_tieta/WebRoot/dischargetest.jsp index 8655f70..a087a89 100644 --- a/gx_tieta/WebRoot/dischargetest.jsp +++ b/gx_tieta/WebRoot/dischargetest.jsp @@ -17,6 +17,7 @@ <link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome-animation.min.css"> <link rel="stylesheet" type="text/css" href="css/whyc-ui.css"> + <link href="src/css/layui.css" type="text/css" rel="stylesheet"> <style> .confirm { z-index: 999; @@ -208,7 +209,7 @@ </tr> <tr> <th><s:text name="Booster"/><s:text name="Upper_limit"/><!-- 鍗囧帇涓婇檺 -->锛圴锛�</th> - <th><s:text name="Charging_current"/><!-- 鍏呯數鐢垫祦 -->锛圓锛�</th> + <th id="ChargeCurrSetLabel"><s:text name="Charging_current"/><!-- 鍏呯數鐢垫祦 -->锛圓锛�</th> </tr> <tr> <td><input id="DCVolHighLimit" type="text" value="0"><i class="fa fa-frown-o error-img" title="鏁版嵁鏍煎紡閿欒"></i></td> @@ -538,6 +539,7 @@ <script type="text/javascript" src="js/elecircle.content.js"></script> <script type="text/javascript" src="js/mypattern.js"></script> <script type="text/javascript" src="js/whyc-jqueryui.js"></script> + <script type="text/javascript" src="src/layui.all.js"></script> <script type="text/javascript"> var arrTh = new Array(); var arrTd = new Array(); @@ -730,46 +732,95 @@ }; // 鍏呯數鐢垫祦 $('.popup.fbs9100 .popup-tbl td i').removeClass('error-data'); + $('.popup.fbs9100 .popup-tbl input[type=text]').removeClass('error-data'); } }); })(jQuery); // 鏇存敼鏀剧數闈㈡澘鐨勫�煎悗 $(function() { - $('.popup.fbs9100 .popup-tbl td i').tooltip(); - // 鐩戞祴闈㈡澘涓殑input鏀瑰彉瑙﹀彂$.checkTestInfor()浜嬩欢 - $('.popup.fbs9100 .popup-tbl').on('input propertychange', 'input', function() { + // 鏀剧數鐢垫祦 + $('#discurr').testVal({ + pattern: /^[0-9]+(\.[0-9]*)?$/, + regVal: true, + min: 0, + max: 1000, + msg: '鍙栧�艰寖鍥�0~1000A' + }); + + // 鏀剧數灏忔椂鐜� + $('#hourrate').testVal({ + pattern: /^[0-9]+$/, + regVal: false, + msg: '杈撳叆鐨勬暟鎹牸寮忎笉姝g‘' + }); + + // 鏀剧數鐢靛 + $('#discap').testVal({ + pattern: /^[0-9]+$/, + regVal: true, + min: 0, + max: 90000, + msg: '鍙栧�艰寖鍥�0~90000AH' + }); + + // 鏀剧數鏃堕暱 + $('#distime').testVal({ + pattern: /^[0-9]+$/, + regVal: true, + min: 0, + max: 5940, + msg: '鍙栧�艰寖鍥�0~5940鍒嗛挓' + }); + + // 鍗曚綋涓嬮檺闃�鍊� + $('#MonomerVol_low').testVal({ + pattern: /^[0-9]+(\.[0-9]*)?$/, + regVal: true, + min: 0, + max: 20, + msg: '鍙栧�艰寖鍥�0~20V' + }); + + // 缁勭涓嬮檺闃�鍊糋roupVol_low + $('#GroupVol_low').testVal({ + pattern: /^[0-9]+(\.[0-9]*)?$/, + regVal: true, + min: 0, + max: 60, + msg: '鍙栧�艰寖鍥�0~60V' + }); + + // 鍗曚綋涓嬮檺鏁伴噺 + $('#MonomerlowCount').testVal({ + pattern: /^[0-9]+$/, + regVal: false, + msg: '杈撳叆鐨勬暟鎹牸寮忎笉姝g‘' + }); + + // 鍗囧帇涓婇檺 + $('#MonomerlowCount').testVal({ + pattern: /^[0-9]+(\.[0-9]*)?$/, + regVal: false, + msg: '杈撳叆鐨勬暟鎹牸寮忎笉姝g‘' + }); + + // 鍏呯數鐢垫祦 + $('#ChargeCurrSet').testVal({ + pattern: /^[0-9]+(\.[0-9]*)?$/, + regVal: false, + msg: '杈撳叆鐨勬暟鎹牸寮忎笉姝g‘' + }); + + // 娓╁害涓婇檺 + $('#TempUpHighLimit').testVal({ + pattern: /^[0-9]+$/, + regVal: false, + msg: '杈撳叆鐨勬暟鎹牸寮忎笉姝g‘' + }); + + $('.popup.fbs9100').on('input propertychange', 'input[type=text]', function() { $.checkTestInfor(); - var bool = $.regPositiveNum($(this).val()); - if(bool) { - // 璇诲彇鏀剧數鍙傛暟鎴愬姛鎵ц - if($.disTestInfor.success) { - paramsBtn.ensure(true); - } - $(this).next('i').removeClass('error-data'); - $(this).myTooltip('hide'); - }else { - paramsBtn.ensure(false); - //var errorImg = $('<i class="fa fa-frown-o error-img"></i>'); - $(this).next('i').addClass('error-data'); - $(this).myTooltip({ - position: 'top', - thing: 'show', - content: '<span style="color:#FF0000">鏁版嵁鏍煎紡閿欒(璇疯緭鍏ユ鏁�)</span>' - }); - } - }); - - // 褰撴枃鏈鑾峰彇鐒︾偣鏃� - $('.popup.fbs9100 .popup-tbl').on('focus', 'input', function() { - if($(this).next('i').hasClass('error-data')) { - $(this).myTooltip('show'); - } - }); - - // 鏂囨湰妗嗗け鍘荤劍鐐� - $('.popup.fbs9100 .popup-tbl').on('blur', 'input', function() { - $(this).myTooltip('hide'); }); $('.popup.fbs9100').on('change', 'select', function() { @@ -1126,13 +1177,26 @@ $('#DCVolHighLimit').val(list[i].fsparam.DCVolHighLimit); $('#ChargeCurrSet').val(list[i].fsparam.ChargeCurrSet); $('#TempUpHighLimit').val(list[i].fsparam.MonomerTmp_High); + + // 鍏呯數鐢垫祦 + $('#ChargeCurrSet').testVal('option', 'allOpts', { + regVal: true, + min: 0, + max: list[0].binf.charge_curr_max, + msg: '鍙栧�艰寖鍥�0~'+list[0].binf.charge_curr_max+'A' + }); + + // 璁剧疆鏂囨湰鍊� + $('#ChargeCurrSetLabel').text('鍏呯數鐢垫祦锛�0~'+list[0].binf.charge_curr_max+'A锛�'); } } } } - + // 鐪�-甯�-鏈烘埧-鐢垫睜缁� + var filterLoad; $(document).ready(function(){ + filterLoad = layer.load(); //椤甸潰鍔犺浇鏃舵煡璇㈢淮鎶ゅ尯涓殑鏋㈢航绫诲瀷 $.post("BattInfAction!serchAllStation",null,function(data){ data=data.result; @@ -1157,10 +1221,16 @@ }); // 鏍规嵁缁存姢鍖虹殑鍐呭鏌ヨ甯� - function findCity() { + function findCity(isLoad) { var data = { StationName1: $("#station_name1").val() }; + + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } + // 璇锋眰鑾峰彇褰撳墠鐪佷笅鐨勫競 $.ajax({ type: "post", @@ -1195,26 +1265,29 @@ //褰撶淮鎶ゅ尯鐨勫�煎彉鎹㈡椂鏇存柊甯� $('#station_name1').change(function(){ - findCity(); + findCity(true); }); //褰撳競鐨勫�煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 $('#city').change(function(){ - findCounty(); + findCounty(true); }); //褰撳尯/鍘跨殑鍊煎彉鎹㈡椂鏇存柊鏈烘埧绔欑偣 $('#county').change(function(){ - findStationNamebyStationname1(); + findStationNamebyStationname1(true); }); // 鏌ヨ鍖�/鍘� - function findCounty() { + function findCounty(isLoad) { var tmp = { StationName1:$("#station_name1").val(), StationName2:$("#city").val(), }; - + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } // 鏌ヨ鍖哄幙 $.ajax({ type: 'post', @@ -1248,12 +1321,16 @@ } //鏍规嵁缁存姢鍖烘煡璇㈢珯鐐� - function findStationNamebyStationname1(){ + function findStationNamebyStationname1(isLoad){ var tmp = { StationName1:$("#station_name1").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){ @@ -1282,11 +1359,11 @@ } $('#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'):''; // 鏋勯�犳煡璇㈡潯浠� var tmp = { @@ -1296,7 +1373,10 @@ StationName: $("#station_name").val(), StationId: stationid }; - + // 鏄惁娣诲姞绛夊緟 + if(isLoad) { + filterLoad = layer.load(); + } //var station_name1=$("#station_name1 option:selected").val(); //var station_name=$("#station_name option:selected").val(); @@ -1326,6 +1406,8 @@ }else{ $("#battgroup_name").text('').html('<option>鏆傛棤鍙祴钃勭數姹犵粍</option>'); } + + layer.close(filterLoad); }); } // 闅愯棌琛ㄦ牸鍔熻兘鎸夐挳鍒楄〃 -- Gitblit v1.9.1