hdw
2018-10-31 19f804b2f248e851b0a675635f8413c8dbbc55cf
电池测试添加区/县筛选
1个文件已修改
58 ■■■■■ 已修改文件
gx_tieta/WebRoot/dischargetest.jsp 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/dischargetest.jsp
@@ -85,7 +85,8 @@
                    <thead>
                        <tr>
                            <th>省</th>
                            <th>市<!-- 维护区 --></th>
                            <th>市</th>
                            <th>区/县</th>
                            <th><s:text name="Computer_site"/><!-- 机房站点(或机房设备) --></th>
                            <th><s:text name="Battery_name"/><!-- 蓄电池组名称 --></th>
                        </tr>
@@ -98,6 +99,10 @@
                            </td>
                            <td>
                                <select id="city">
                                </select>
                            </td>
                            <td>
                                <select id="county">
                                </select>
                            </td>
                            <td>
@@ -1180,7 +1185,8 @@
                    }else {
                        $select.text('').html('<option>暂无可测市</option>');
                    }
                    findStationNamebyStationname1();
                    // 查询区/县
                    findCounty();
                }
            });
        }
@@ -1194,14 +1200,59 @@
        
        //当市的值变换时更新机房站点
        $('#city').change(function(){
            findCounty();
        });
        //当区/县的值变换时更新机房站点
        $('#county').change(function(){
            findStationNamebyStationname1();
        });
        // 查询区/县
        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();
                }
            });
        }
        
        //根据维护区查询站点
        function findStationNamebyStationname1(){
            var tmp = {
                StationName1:$("#station_name1").val(),
                StationName2:$("#city").val()
                StationName2:$("#city").val(),
                StationName5: $("#county").val()
            };
            //var selectvalue=$("#station_name1 option:selected").val();
            //alert(selectvalue);
@@ -1241,6 +1292,7 @@
            var tmp = {
                StationName1:$("#station_name1").val(),
                StationName2:$("#city").val(),
                StationName5:$("#county").val(),
                StationName: $("#station_name").val(),
                StationId: stationid
            };