hdw
2018-11-01 de90e409e2c15c8f96fa70e1e253a39234a4641b
落后单体查询
1个文件已修改
189 ■■■■■ 已修改文件
gx_tieta/WebRoot/taskplan.jsp 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/taskplan.jsp
@@ -19,6 +19,7 @@
<!-- 导入页面特定样式 -->
<link rel="stylesheet" type="text/css" href="css/taskplan_layout.css">
<link rel="stylesheet" type="text/css" href="css/query.css">
<link href="src/css/layui.css" type="text/css" rel="stylesheet">
<!-- 导入Jquery -->
</head>
<body>
@@ -34,56 +35,53 @@
            <span class="summary"><s:text name="Behind_monomer"/><s:text name="Search"/>--&gt;<s:text name="Show/hide_the_query_conditions"/></span>
            <div class="checkCon">
                <form action="" id="search_form">
                <!-- 维护区信息 -->
                <table>
                    <tr class="fWeight">
                        <td>设备类型</td>
                        <td>省</td>            <!-- 省 -->
                        <td>市</td>            <!-- 市 -->
                        <td><s:text name="Computer_site"/></td>                <!-- 机房站点(或机房设备)-->
                        <td><s:text name="Battery"/></td>                    <!-- 蓄电池组 -->
                        <td style="display:none;" colspan="2"><s:text name="Battery_installation_period"/></td>                                         <!-- 电池安装时间段-->
                        <td colspan="2"><s:text name='Record'/><s:text name="Time"/></td>        <!-- 放电时间 -->
                        <td style="display:none;"><s:text name="Battery_brand"/>电池品牌</td>
                    </tr>
                    <tr>
                        <td>
                            <select id="dev_type" name="dev_type">
                                <option value="1">FBS/BTS设备</option>
                                <option value="2">LD9设备</option>
                            </select>
                        </td>
                        <td>
                            <select id="station_name1" name="station_name1">
                            </select>
                        </td>
                        <td>
                            <select id="city" name="station_name2">
                            </select>
                        </td>
                        <td>
                            <select id="station_name" name="station_name">
                            </select>
                        </td>
                        <td>
                            <select id="battgroup_name" name="battgroup_name">
                            </select>
                        </td>
                        <td style="display:none;"><input type="text" id="startinusedate" name="startinusedate" value="1970-1-1" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                        <td style="display:none;"><input type="text" id="endinusedate" name="endinusedate" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                        <td><input type="text" id="startdischargedate" name="startdischargedate" value="1970-1-1" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                        <td><input type="text" id="enddischargedate" name="enddischargedate" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                        <td style="display:none;">
                            <select id="producer" name="producer">
                            </select>
                        </td>
                    </tr>
                </table>
                    <!-- 维护区信息 -->
                    <table>
                        <tr class="fWeight">
                            <td>设备类型</td>
                            <td>省</td>            <!-- 省 -->
                            <td>市</td>            <!-- 市 -->
                            <td>区/县</td>        <!-- 区/县 -->
                            <td><s:text name="Computer_site"/></td>                <!-- 机房站点(或机房设备)-->
                            <td><s:text name="Battery"/></td>                    <!-- 蓄电池组 -->
                            <td style="display:none;" colspan="2"><s:text name="Battery_installation_period"/></td>                                         <!-- 电池安装时间段-->
                            <td colspan="2"><s:text name='Record'/><s:text name="Time"/></td>        <!-- 放电时间 -->
                            <td style="display:none;"><s:text name="Battery_brand"/>电池品牌</td>
                        </tr>
                        <tr>
                            <td>
                                <select id="dev_type" name="dev_type">
                                    <option value="1">FBS/BTS设备</option>
                                    <option value="2">LD9设备</option>
                                </select>
                            </td>
                            <td>
                                <select id="station_name1" name="station_name1"></select>
                            </td>
                            <td>
                                <select id="city" name="station_name2"></select>
                            </td>
                            <td>
                                <select id="county" name="county"></select>
                            </td>
                            <td>
                                <select id="station_name" name="station_name"></select>
                            </td>
                            <td>
                                <select id="battgroup_name" name="battgroup_name"></select>
                            </td>
                            <td style="display:none;"><input type="text" id="startinusedate" name="startinusedate" value="1970-1-1" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                            <td style="display:none;"><input type="text" id="endinusedate" name="endinusedate" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                            <td><input type="text" id="startdischargedate" name="startdischargedate" value="1970-1-1" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                            <td><input type="text" id="enddischargedate" name="enddischargedate" readonly="readonly" onfocus="new Calendar().show(this)"></td>
                            <td style="display:none;">
                                <select id="producer" name="producer">
                                </select>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
@@ -136,6 +134,7 @@
    <div class="clear"></div>
</body>
<script type="text/javascript" src="js/createTab.js"></script>
<script type="text/javascript" src="src/layui.all.js"></script>
<script type="text/javascript">
    var Page = {
        pageSize:10,                 //每页的行数
@@ -345,7 +344,7 @@
            Page.pageCurr = 1;
            formjson = temp;
        }
        loading.showLoading();
        var load = layer.load(1);
        var json = window.JSON.stringify(temp);
        arrTd = new Array();        
        $.ajax({     
@@ -357,7 +356,7 @@
                success: function(data){ 
                    data = eval('('+data+')');
                    var model = eval('('+data.result+')');
                    //console.info(model);
                    console.info(model);
                    if(model.code == 1){
                        for(var i = 0;i < model.data.length;i++){
                            //console.info(model.data.length);
@@ -386,7 +385,7 @@
                    $('#page_num').val(Page.pageCurr);
                    //console.info(arrTd);
                    changeTblByStatus();
                    loading.hideLoading();
                    layer.close(load);
                },
                error:function(a){
                    //console.info(a);
@@ -455,7 +454,9 @@
    }
    
    // 省-市-机房-电池组
    var filterLoad;
    $(document).ready(function(){
        filterLoad = layer.load();
        //页面加载时查询维护区中的枢纽类型
        $.post("User_battgroup_baojigroup_battgroupAction!serchStationName1InGroup",null,function(data){
            data=data.result;
@@ -483,10 +484,15 @@
    });
    
    // 根据维护区的内容查询市
    function findCity() {
    function findCity(isLoad) {
        var data = {
            StationName1: $("#station_name1").val()
        };
        // 是否添加等待
        if(isLoad) {
            filterLoad = layer.load();
        }
        // 请求获取当前省下的市
        $.ajax({     
            type: "post",                 
@@ -511,27 +517,79 @@
                }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();
            }
        });
    }
    //当维护区的值变换时更新市
    $('#station_name1').change(function(){
        findCity();
        findCity(true);
    });
    
    //当维护区的值变换时更新机房站点
    $('#city').change(function(){
        findStationNamebyStationname1();
        findCounty(true);
    });
    //当区/县的值变换时更新机房站点
    $('#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){
@@ -561,20 +619,24 @@
    
    // 根据机房名称查询电池组
    $('#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 = {
            StationName1:$("#station_name1").val(),
            StationName2:$("#city").val(),
            StationName5:$("#county").val(),
            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();
        
@@ -605,6 +667,8 @@
            }else{
                $("#battgroup_name").text('').html('<option>暂无可测蓄电池组</option>');
            }
            layer.close(filterLoad);
        });
    }
    
@@ -638,6 +702,7 @@
                StationName:$('#station_name').val(),
                StationName2:$('#city').val(),
                StationName1:$('#station_name1').val(),
                StationNmae5:$('#county').val(),
                BattGroupId:$('#battgroup_name').val(),
                BattProducer:$('#producer').val(),
                BattInUseDate:$('#startinusedate').val()+" 00:00:00",