hdw
2018-11-01 767b0de5119d41f40cf75ceaeac7ad2a08378a86
gx_tieta/WebRoot/equip-charge-param.jsp
@@ -19,6 +19,7 @@
   <link href="css/basic.css" type="text/css" rel="stylesheet" />
   <link rel="stylesheet" type="text/css" href="css/query.css">
   <link rel="stylesheet" type="text/css" href="css/confirm.css">
   <link href="src/css/layui.css" type="text/css" rel="stylesheet">
   <style type="text/css">
      .tbl-toolbox {
         bottom:  80px;
@@ -44,22 +45,23 @@
                  <tr>
                     <th>省<!-- 省 --></th>
                     <th>市<!-- 市 --></th>
                     <th>区/县<!-- 区/县 --></th>
                     <th><s:text name="Computer_site"/><!-- 机房站点 --></th>
                  </tr>
               </thead>
               <tbody>
                  <tr>
                     <td>
                        <select id="station_name1" name="station_name1">
                        </select>
                        <select id="station_name1" name="station_name1"></select>
                     </td>
                     <td>
                        <select id="city" name="station_name2">
                        </select>
                        <select id="city" name="station_name2"></select>
                     </td>
                     <td>
                        <select id="county" name="station_name5"></select>
                     </td>                     
                     <td>
                        <select id="station_name" name="station_name">
                        </select>
                        <select id="station_name" name="station_name"></select>
                     </td>
                  </tr>
               </tbody>
@@ -89,6 +91,7 @@
   <script type="text/javascript" src="js/createTab.js"></script>
   <script type="text/javascript" src="js/myConfirm.js"></script>
   <script type="text/javascript" src="js/myinterval.js"></script>
   <script type="text/javascript" src="src/layui.all.js"></script>
   <script type="text/javascript">
      var Page = {
         pageCurr:1,
@@ -354,7 +357,9 @@
      }
      
      // 省-市-机房-电池组
      var filterLoad;
      $(document).ready(function(){
         filterLoad = layer.load();
         //页面加载时查询维护区中的枢纽类型
         $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
            data=data.result;
@@ -382,10 +387,14 @@
      });
      
      // 根据维护区的内容查询市
      function findCity() {
      function findCity(isLoad) {
         var data = {
            StationName1: $("#station_name1").val()
         };
         // 是否添加等待
         if(isLoad) {
            filterLoad = layer.load();
         }
         // 请求获取当前省下的市
         $.ajax({    
              type: "post",             
@@ -410,9 +419,51 @@
                 }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();
            }
         });
      }
      
      //当维护区的值变换时更新市
@@ -422,15 +473,25 @@
      
      //当维护区的值变换时更新机房站点
      $('#city').change(function(){
         findStationNamebyStationname1();
         findCounty();
      });
      //当区/县的值变换时更新机房站点
      $('#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){
@@ -456,6 +517,8 @@
            }else{
               $("#station_name").text('').html('<option>暂无可测机房站点</option>');
            }
            layer.close(filterLoad);
         });
      }