hdw
2018-11-02 4ad4f80b81964c8033ba342ad7c95094be534a61
gx_tieta/WebRoot/batt-station-update.jsp
@@ -68,25 +68,24 @@
                    <form action="" id="search_form">
                    <table>
                        <tr class="fWeight">
                             <td>省</td>                  <!-- 省 -->
                            <td>省</td>                  <!-- 省 -->
                            <td>市</td>                  <!-- 市 -->
                            <td>区/县</td>               <!-- 区/县 -->
                            <td><s:text name="Computer_name"/></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>
                        </tr>
                    </table>
@@ -97,9 +96,6 @@
            <div id="tbHead"></div>
            <!-- 表格滚动的部分 -->
            <div id="tbBrdw"></div>
            <!-- 按钮内容 -->
            <div id="paging">
                <a href="javascript:" class="add">添加<!--添加--></a>
@@ -295,7 +291,7 @@
              }
              
             
              // 省-市-机房-电池组
            // 省-市-机房-电池组
            $(document).ready(function(){
               //页面加载时查询维护区中的枢纽类型
               $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
@@ -351,16 +347,61 @@
                       }else {
                          $select.text('').html('<option>暂无可测市</option>');
                       }
                       findStationNamebyStationname1();
                       findCounty();
                    }
                });
            }
            // 查询区/县
            function findCounty() {
               var tmp = {
                  StationName1:$("#station_name1").val(),
                  StationName2:$("#city").val(),
               };
               // 查询区县
               $.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();
            });
            //当维护区的值变换时更新机房站点
            $('#city').change(function(){
               findCounty();
            });
            //当区/县的值变换时更新机房站点
            $('#county').change(function(){
               findStationNamebyStationname1();
            });
            
@@ -369,7 +410,8 @@
               findStationNamebyStationname1.stations = new Array();
               var tmp = {
                  StationName1:$("#station_name1").val(),
                  StationName2:$("#city").val()
                  StationName2:$("#city").val(),
                  StationName5:$("#county").val()
               };
               //var selectvalue=$("#station_name1 option:selected").val();
               //alert(selectvalue);