CJJ
2018-12-25 11cd3824e96bbe5644b0d0720dc4260f341468c2
修改
2个文件已修改
595 ■■■■■ 已修改文件
gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html 308 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/mobil/ele-param2.html 287 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html
@@ -83,7 +83,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>省</td>
                                            <td>*省</td>
                                            <td>
                                                <select id="mainteArea" data-mini="true">
                                                  <option value="">全部</option>
@@ -94,7 +94,7 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>城市</td>
                                            <td>*城市</td>
                                            <td>
                                                <select id="city" data-mini="true">
                                                    <option value="">全部</option>
@@ -102,15 +102,15 @@
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>区县</td>
                                            <td>*区县</td>
                                            <td>
                                                 <select id="country" data-mini="true">
                                                 <select id="county" data-mini="true">
                                                    <option value="">全部</option>
                                                 </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>机房名称</td>
                                            <td>*机房名称</td>
                                            <td>
                                                <input type="text" id="homeName"  data-mini="true">
                                                    
@@ -123,19 +123,12 @@
                                        
                                                <input type="hidden" id="StationIp" data-mini="true" />
                                            
                                                <input type="hidden" id="FbsDeviceIp_YM" class="unable" data-mini="true" value="456"/>    
                                                <input type="hidden" id="FbsDeviceIp_WG" class="unable"  data-mini="true" value="456"/>
                                                <input type="hidden" id="FBSDeviceName" data-mini="true" />
                                            
                                                <input type="hidden" readonly unselectable="on" value="123" id="BattGroupNum" class="unable" class="uncheck" data-mini="true" />
                                            
                                        
@@ -162,12 +155,11 @@
                                                    <input type="radio" name="battnum" id="twentyfour" value="24"> 
                                                  </fieldset>
                                                    
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>标称单体电压(V)</td>
                                            <td>*标称单体电压(V)</td>
                                            <td>
                                                <input type="text" id="MonVolStd" class="unable" data-mini="true" />
                                            </td>
@@ -198,15 +190,14 @@
                                            
                                        
                                        <tr>
                                            <td>基站电话号码</td>
                                            <td>*基站电话号码</td>
                                            <td>
                                                <input type="text" id="station_phone" data-mini="true" />
                                            </td>
                                        </tr>
                                            <input id="startTestrecord"  type="hidden" name="appDate" class="appDatefir"  value="2000-01-01" />
                                            <input id="endTestrecord" type="hidden" name="appDate" class="appDatesec"  value="2017-01-01" />
                                            <input id="startTestrecord"  type="hidden" name="appDate" class="appDatefir"  value="2000-01-01 00:00:00" />
                                            <input id="endTestrecord" type="hidden" name="appDate" class="appDatesec"  value="2017-01-01 00:00:00" />
                                            
                                        <tr>
                                            <td>*安装人员</td>
@@ -280,7 +271,7 @@
  function creatBattView(index){
         var count=index+1
            ,battTitle='<div>'+'<h1 class="hbg">'+'电池组'+count+'</h1>'+
             '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'电池品牌'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select>'
             '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'电池品牌'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" id="battproducer" data-type="horizontal">'+'<select>'
            ,battBrand=selectedIndex(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>' 
            ,battType='<tr>'+'<td>'+'电池型号'+'</td>'+'<td>'+'<input type="text" '+'id='+'batttype'+index+' data-mini="true"'+'value='+'电池型号'+count+' />'+'</td>'+'</tr>' 
            ,battNum='<tr>'+'<td>'+'电池数量'+'</td>'+'<td>'+'<input type="text" '+'id='+'battnum'+index+' data-mini="true"'+'value='+'电池数量'+count+' />'+'</td>'+'</tr>' 
@@ -294,12 +285,25 @@
  function selectedIndex(index){
       var selected='',
           i=0;
       for(i=0;i<4;i++){
          if(i==index){selected+='<option '+'value='+i+' selected'+'>'+'电池品牌'+i+'</option>';continue;}
          selected+='<option value='+i+'>'+'电池品牌'+i+'</option>';
       }
       selected+= '<option '+'value='+'理士'+'>'+'理士'+'</option>';
       selected+= '<option '+'value='+'圣阳'+'>'+'圣阳'+'</option>';
       selected+= '<option '+'value='+'双登'+'>'+'双登'+'</option>';
       selected+= '<option '+'value='+'SENRY'+'>'+'SENRY'+'</option>';
       selected+= '<option '+'value='+'南都'+'>'+'南都'+'</option>';
       selected+= '<option '+'value='+'爱默生'+'>'+'爱默生'+'</option>';
       selected+= '<option '+'value='+'科士达'+'>'+'科士达'+'</option>';
       selected+= '<option '+'value='+'银泰'+'>'+' 银泰'+'</option>';
       selected+= '<option '+'value='+'丰日'+'>'+' 丰日'+'</option>';
       selected+= '<option '+'value='+'中兴能派'+'>'+' 中兴能派'+'</option>';
        selected+= '<option '+'value='+'光宇'+'>'+' 光宇'+'</option>';
        selected+= '<option '+'value='+'艾诺斯华达'+'>'+'艾诺斯华达'+'</option>';
        selected+= '<option '+'value='+'雄韬'+'>'+' 雄韬'+'</option>';
        selected+= '<option '+'value='+'风帆'+'>'+' 风帆'+'</option>';
        selected+= '<option '+'value='+'文隆'+'>'+' 文隆'+'</option>';
        selected+= '<option '+'value='+'风帆'+'>'+' 风帆'+'</option>';
        selected+= '<option '+'value='+'中山'+'>'+' 中山'+'</option>';
          selected+= '<option '+'value='+'美的'+'>'+' 美的'+'</option>';
          selected+= '<option '+'value='+'朗达'+'>'+' 朗达'+'</option>';
       return selected; 
  }    
      var temp = getCookie("eleparm");
@@ -322,19 +326,12 @@
               var $Ostation_name1=$("#mainteArea");
            $Ostation_name1.text("");
            var arr = new Array();
            for(var i=0;i<=data.data.length;i++)
            for(var i=0;i<data.data.length;i++)
            {
                   if(i == 0){
                       arr.push({
                           val:"",
                           txt:"全部(共"+data.sum+"个)",
                       });
                   }else{
                       arr.push({
                           val:data.data[i-1].StationName1,
                           txt:data.data[i-1].StationName1,
                       });
                   }
                arr.push({
                           val:data.data[i].StationName1,
                           txt:data.data[i].StationName1,
                   });
            }
            updataSel($Ostation_name1, arr);
        }
@@ -362,19 +359,12 @@
                   var $Ostation_name1=$("#city");
                $Ostation_name1.text("");
                var arr = new Array();
                for(var i=0;i<=data.data.length;i++)
                {
                       if(i == 0){
                           arr.push({
                               val:"",
                               txt:"全部(共"+data.data.length+"个)",
                           });
                       }else{
                           arr.push({
                               val:data.data[i-1].StationName2,
                               txt:data.data[i-1].StationName2,
                           });
                       }
                for(var i=0;i<data.data.length;i++)
                {
                       arr.push({
                           val:data.data[i].StationName2,
                           txt:data.data[i].StationName2,
                       });
                }
                updataSel($Ostation_name1, arr);
            }
@@ -405,19 +395,12 @@
                   var $Ostation_name1=$("#country");
                $Ostation_name1.text("");
                var arr = new Array();
                for(var i=0;i<=data.data.length;i++)
                for(var i=0;i<data.data.length;i++)
                {
                       if(i == 0){
                           arr.push({
                               val:"",
                               txt:"全部(共"+data.data.length+"个)",
                           });
                       }else{
                           arr.push({
                               val:data.data[i-1].StationName5,
                               txt:data.data[i-1].StationName5,
                           });
                       }
                       arr.push({
                           val:data.data[i].StationName5,
                           txt:data.data[i].StationName5,
                       });
                }
                updataSel($Ostation_name1, arr);
            }        
@@ -455,13 +438,8 @@
    $(function () {
        //setTimes($("#startTestrecord"),'2000-01-01');
        //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
        console.info()
        if(temp[34]!="edit")
        {
        //console.warn("sssss")
            creatgroupid();//如果检测为NEW ,则执行添加ID,如果为修改,则执行为拿到ID
        }else{
        }
        creatgroupid();//如果检测为NEW ,则执行添加ID,如果为修改,则执行为拿到ID;
        installstartdata(temp);
    });
    
@@ -531,8 +509,7 @@
    }
    
    //导入表格默认数据
    function installstartdata(temp){
    function installstartdata(temp){
        var data = {
                StationId: '4011100'
                ,StationName1: '广西省'
@@ -566,10 +543,9 @@
                ,BattModel: ''
                ,productDate: '2018-09-18 00:00:00'
                ,useDate: '2018-09-18 00:00:00'
                ,install_user: '呵呵'
                ,install_user: 'test'
            };
            console.info(data.StationId);
        if(temp[34]!="edit"){
            creatgroupid();
            document.getElementById("StationId").value = data.StationId;
    //        document.getElementById("mainteArea").value = data.StationName1;
@@ -579,7 +555,7 @@
            document.getElementById("StationName4").value = data.StationName4;    //设备名称
            document.getElementById("StationIp").value = data.StationIp;        //设备IP
            //document.getElementById("FBSDeviceId").value = dev_id;    
            document.getElementById("FbsDeviceIp").value = data.FbsDeviceIp;
        //    document.getElementById("FbsDeviceIp").value = data.FbsDeviceIp;
            document.getElementById("FbsDeviceIp_YM").value = data.FbsDeviceIp_YM;
            document.getElementById("FbsDeviceIp_WG").value = data.FbsDeviceIp_WG;
            document.getElementById("FBSDeviceName").value = data.FBSDeviceName;
@@ -587,62 +563,26 @@
            document.getElementById("BattGroupId").value = data.BattGroupId;
            document.getElementById("BattGroupNum").value = data.BattGroupNum;
            //document.getElementById("BattGroupName").value = temp[15];
    //        document.getElementById("FloatVolLevel").value = data.FloatVolLevel;
    //        document.getElementById("OfflineVolLevel").value = data.OfflineVolLevel;
    //        document.getElementById("BattFloatCurrent").value = data.BattFloatCurrent;
    //        document.getElementById("MonCount").value = data.MonCount;
    //        document.getElementById("MonCapStd").value = data.MonCapStd;
    //        document.getElementById("MonVolStd").value = data.MonVolStd;
            document.getElementById("FloatVolLevel").value = data.FloatVolLevel;
            document.getElementById("OfflineVolLevel").value = data.OfflineVolLevel;
            document.getElementById("BattFloatCurrent").value = data.BattFloatCurrent;
            //document.getElementById("MonCount").value = data.MonCount;
            document.getElementById("MonCapStd").value = data.MonCapStd;
            document.getElementById("MonVolStd").value = data.MonVolStd;
            document.getElementById("MonResStd").value = data.MonResStd;
            document.getElementById("MonSerStd").value = data.MonSerStd;
            document.getElementById("MonVolLowToAvg").value = data.MonVolLowToAvg;
    //        document.getElementById("Load_curr").value = data.Load_curr;
            document.getElementById("Load_curr").value = data.Load_curr;
            document.getElementById("DisCurrMax").value = data.DisCurrMax;
    //        document.getElementById("station_phone").value = data.station_phone;
    //        document.getElementById("BattProducer").value = data.BattProducer;
        //    document.getElementById("BattModel").value = data.BattModel;
            //document.getElementById("startTestrecord").value = temp[30];
            //document.getElementById("endTestrecord").value = temp[31];
            document.getElementById("station_phone").value = data.station_phone;
            //document.getElementById("BattProducer").value = data.BattProducer;
            //document.getElementById("BattModel").value = data.BattModel;
            document.getElementById("startTestrecord").value = data.productDate;
            document.getElementById("endTestrecord").value = data.useDate;
            //setTimes($("#startTestrecord"),data.productDate);
            //setTimes($("#endTestrecord"),data.useDate);
    //        document.getElementById("install_user").value = data.install_user;
        }else{
            document.getElementById("StationId").value = temp[0];
            document.getElementById("mainteArea").value = temp[1];
            document.getElementById("city").value = temp[2];            //市
            document.getElementById("county").value = temp[3];            //区县
            document.getElementById("homeName").value = temp[4];   //机房名称
            document.getElementById("StationName4").value = temp[5];    //设备名称
            document.getElementById("StationIp").value = temp[6];        //设备IP
            document.getElementById("FBSDeviceId").value = temp[7];
            document.getElementById("FbsDeviceIp").value = temp[8];
            document.getElementById("FbsDeviceIp_YM").value = temp[9];
            document.getElementById("FbsDeviceIp_WG").value = temp[10];
            document.getElementById("FBSDeviceName").value = temp[11];
            //document.getElementById("GroupIndexInFBSDevice").value = temp[12];
            document.getElementById("BattGroupId").value = temp[13];
            document.getElementById("BattGroupNum").value = suoyin;
            //document.getElementById("BattGroupName").value = temp[15];
            document.getElementById("FloatVolLevel").value = temp[16];
            document.getElementById("OfflineVolLevel").value = temp[17];
            document.getElementById("BattFloatCurrent").value = temp[18];
            document.getElementById("MonCount").value = temp[19];
            document.getElementById("MonCapStd").value = temp[20];
            document.getElementById("MonVolStd").value = temp[21];
            document.getElementById("MonResStd").value = temp[22];
            document.getElementById("MonSerStd").value = temp[23];
            document.getElementById("MonVolLowToAvg").value = temp[24];
            document.getElementById("Load_curr").value = temp[25];
            document.getElementById("DisCurrMax").value = temp[26];
            document.getElementById("station_phone").value = temp[27];
            document.getElementById("BattProducer").value = temp[28];
            document.getElementById("BattModel").value = temp[29];
            //document.getElementById("startTestrecord").value = temp[30];
            //document.getElementById("endTestrecord").value = temp[31];
            setTimes($("#startTestrecord"),temp[30]);
            setTimes($("#endTestrecord"),temp[31]);
            document.getElementById("install_user").value = temp[32];
        }
            document.getElementById("install_user").value = data.install_user;
        setFloatAndoutLine();
    }
    
@@ -651,6 +591,12 @@
            var arr = new Array();
            for(var i=0;i<suoyin;i++){
                var battString = "#battname"+i;
                var battModel = "#batttype"+i;
                var battproducer ="#battproducer"+i;
                var id = $('fieldset input[data-cacheval=\'true\']').val();
                var inputVal = $(id).val();
                //var input =$(four).option()
                console.info(inputVal)
                var index = String(i);
                console.info(battString);
                var obj = {
@@ -687,8 +633,8 @@
                        DisCurrMax : $("#DisCurrMax").val(),                //最大核容电流
                        station_phone : $("#station_phone").val(),            //基站号码
                                        
                        BattProducer : $("#BattProducer").val(),            //电池品牌
                        BattModel : $("#BattModel").val(),                //电池型号
                        BattProducer : battproducer,            //电池品牌
                        BattModel : battModel,                //电池型号
                        BattProductDate :  $("#startTestrecord").val()+" 00:00:00",        //电池生产日期
                        BattInUseDate :  $("#endTestrecord").val()+" 00:00:00",            //电池使用日期
                        install_user : $("#install_user").val(),            //安装人员
@@ -699,71 +645,19 @@
            console.info(arr);
            return arr;
        }
        function getUpdateArredit(){
            var arr = new Array();
            for(var i=0;i<suoyin;i++){
                var battString = "#battname"+i;
                var index = String(i);
                console.info(battString);
                var obj = {
                        StationId : $("#StationId").val(),    // 机房编号
                        StationName : ($("#mainteArea").val()+"-"+$("#city").val()+"-"+$("#homeName").val()+"-"+$("#StationName4").val()),    // 拼接机房名称
                        StationName1 : $("#mainteArea").val(),        // 省
                        StationName2 : $("#city").val(),        // 市
                        StationName5 : $("#county").val(),        // 区/县
                        homeName : $("#homeName").val(),        // 机房名称
                        StationName4 : $("#StationName4").val(),        // 设备名称
                        StationIp : $("#StationIp").val(),                //机房ip
                        FBSDeviceId : $("#FBSDeviceId").val(),                //设备id
                        FbsDeviceIp : $("#FbsDeviceIp").val(),                //设备ip
                        FbsDeviceIp_YM : $("#FbsDeviceIp_YM").val(),            // 设备掩码
                        FbsDeviceIp_WG : $("#FbsDeviceIp_WG").val(),            // 网关
                        FBSDeviceName : $("#FBSDeviceName").val(),            //设备名称
                        GroupIndexInFBSDevice : i,    //fbs设备索引
                        BattGroupId : $("#BattGroupId").val(),                //电池组id
                        BattGroupNum : $("#BattGroupNum").val(),            //机房内电池组编号
                        BattGroupName : $(battString).val(),
                        FloatVolLevel : $("#FloatVolLevel").val(),            //浮充电压阀值
                        OfflineVolLevel : $("#OfflineVolLevel").val(),            //离线电压阀值
                        BattFloatCurrent : $("#BattFloatCurrent").val(),        //浮充电流阀值
                        MonCount : $("#MonCount").val(),                //单体数量
                        MonCapStd : $("#MonCapStd").val(),                //标称容量
                        MonVolStd : $("#MonVolStd").val(),                //标称电压
                        MonResStd : $("#MonResStd").val(),                //标称内阻
                        MonSerStd : $("#MonSerStd").val(),                //标称电导
                        MonVolLowToAvg : $("#MonVolLowToAvg").val(),            //单体电压次低偏移量
                        Load_curr : $("#Load_curr").val(),                //负载电流
                        DisCurrMax : $("#DisCurrMax").val(),                //最大核容电流
                        station_phone : $("#station_phone").val(),            //基站号码
                        BattProducer : $("#BattProducer").val(),            //电池品牌
                        BattModel : $("#BattModel").val(),                //电池型号
                        BattProductDate :  $("#startTestrecord").val()+" 00:00:00",        //电池生产日期
                        BattInUseDate :  $("#endTestrecord").val()+" 00:00:00",            //电池使用日期
                        install_user : $("#install_user").val(),            //安装人员
                }
                arr.push(obj);
            }
            console.info(arr);
            return arr;
        }
</script> 
<script type="text/javascript">  
    $(function(){
        $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
        $(function(){
        alert(333);
       // alert(333);
        })
        $("#sure").click(function(){
            if(nullOrn()){
                if(temp[34]!="edit"){
                    creatgroupid();//提交之前再次验证,创建ID
                    addBattnew();     //提交
                }else{
                    addBattnew();
                }
            if(nullOrn()){
                creatgroupid();//提交之前再次验证,创建ID
                addBattnew();     //提交
            }else{
            }                //验证重要项是否为空,为空则提示;   
               //function backpage(){window.location.href="ele-param1.html";}
@@ -775,18 +669,20 @@
    });
     
     function nullOrn(){
         if($("#BattFloatCurrent").val()&&$("#MonCount").val()&&$("#MonCapStd").val()){
     //    if($("#BattFloatCurrent").val()&&$("#MonCapStd").val()){
             return true;
         }else{
             alert("*项为必填项,不能为空,请重新输入");
             return false;
         }
         //}else{
             //alert("*项为必填项,不能为空,请重新输入");
             //return false;
     //    }
     
     }
     
     function addBattnew(){//新建电池组,添加到申请
     console.info(getUpdateArr());
         var temp = JSON.stringify(getUpdateArr());
         console.info(temp);
         /*
         $.ajax({
             type: 'post',
            async: true,
@@ -804,34 +700,8 @@
                     window.location.href="batt-unapproved.html";
                 }
             }
         });
         });*/
     }
      //修改电池组,添加到BATTINF
    function editBatt(){
           var parm = getUpdateArredit();
           console.info(parm);
           $.ajax({
                type: "post",
                url: "BattInfAction!update",
                async:true,
                dataType:'text',
                data:"json="+JSON.stringify(parm),
                success: function(data){
                    data = eval('('+data+')');
                    var model = eval('('+data.result+')');
                    console.info(model);
                    if(model.code ==1){
                        alert("修改成功");
                    }else{
                        alert("修改失败!");
                    }
                },
                error:function(){
                    alert("修改电池组失败!");
                }
         });
   }
   
   
   $('input:radio[name="battnum"]').click(function(){
gx_tieta/WebRoot/mobil/ele-param2.html
@@ -15,6 +15,41 @@
    <script src="js/jquery-1.8.3.js"></script>
    <script src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
    <style type="text/css">
        /*规定面板的样式*/
        .ui-panel {
            width: 80%;
        }
        .ui-panel-dismiss{
            width: 20%;
        }
        .ui-panel-inner{
            padding:0 !important;
        }
        .ui-collapsible-heading-toggle{
            padding-left: 1em !important;
        }
        .panel-header{
            padding: 8px 0;
            font-size: 1.2em;
            text-indent: 1em;
            background-color: #DFDCDC;
        }
        /*规定开关的位置*/
        .ui-flipswitch {
            margin-left: 0.5em;
        }
        .ui-field-contain{
            padding: 0 0.6em ;
        }
        .ui-field-contain {
            border-bottom-color: #828282;
            border-bottom-color: rgba(0,0,0,.15);
            border-bottom-width: 1px;
            border-bottom-style: none;
        }
        
        
        .checkdata{
@@ -81,9 +116,41 @@
          margin-top:8em;
        } 
    </style>
    <link rel="stylesheet" href="css/fgpanel.css">
</head>
<body >
    <div class="fg-panel">
            <form>
                <div class="fg-panel-header">筛选</div>
                <div class="fg-panel-content">
                    <fieldset data-role="controlgroup">
                         <p>省</p>
                        <select id="mainteArea" data-mini="true">
                          <option value="">全部</option>
                          <option value="">一枢纽</option>
                          <option value="">二枢纽</option>
                          <option value="">枢纽楼</option>
                        </select>
                        <p>市</p>
                        <select id="city" data-mini="true">
                            <option value="">全部</option>
                        </select>
                        <p>区/县</p>
                        <select id="country" data-mini="true">
                            <option value="">全部</option>
                        </select>
                         <p>机房站点</p>
                        <select id="homeName" data-mini="true">
                            <option value="">全部</option>
                        </select>
                    </fieldset>
                </div>
                <div class="fg-panel-btn">
                    <a href="javascript:panel.hide(true);" id="submit" data-role="button" class="ui-btn ui-mini ui-btn-b ui-shadow">确定</a>
                </div>
            </form>
        </div>
    <div class="abs">
        <div class="rel-full">
            <div class="page-header bg-gay3">
@@ -93,7 +160,7 @@
                    </div>
                    <div class="layui-col-xs6 layui-col-md10 full-height line-height40">申请电池组安装</div>
                    <div class="layui-col-xs3 layui-col-md1 full-height line-height40 t-align-right t-align-right">
                        <!-- <button class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="homeInfo"><i class="fa fa fa-bars mrr4"></i>功能</button> -->
                       <button onclick="javascript:panel.show();" class="layui-btn layui-btn-primary layui-btn-sm mrr8" id="screen"><i class="fa fa fa-bars mrr4"></i>筛选</button>
                    </div>
                </div>
            </div>
@@ -163,6 +230,7 @@
    <script src="src/layui.all.js"></script>
    <script type="text/javascript" src="js/tbl.js"></script>
    <script type="text/javascript" src="mobilJs/base.js"></script>
    <script type="text/javascript" src="js/panel.js"></script>
    <script>
           var iframePopup = '';
        function getEditButIndex(t){
@@ -185,6 +253,17 @@
        
        });
 
        $(document).ready(function(){
        //setPage();
        $("#submit").click(function(){
            //newbattnum;
            //Page.pageCurr=1;
            SearchParam();
        });
     });
    
    
        // 搜索机房获取焦点
@@ -246,7 +325,8 @@
        $('#homeLocation').off('click').on('click.cjj', function() {
            var homeInfo = $(this).data('homeInfo');
             console.warn(homeInfo);
                searchBattLife();
                var temp=createSearchParam();
                searchBattLife(temp);
        });
        
    
@@ -370,10 +450,24 @@
           setCookie("eleparm",json);      
    }
    
    function SearchParam(){
            var temp = {
                page:Page,
                binf:{
                    StationName1:$('#mainteArea').val(),
                    StationName2:$('#city').val(),
                    StationName5: $('#country').val(),
                    StationName:$('#homeName').val(),
                },
            };
            console.info(temp);
            searchBattLife(temp)
        }
    // 查询内容
    function searchBattLife(){
         var temp = createSearchParam();
    function searchBattLife(temp){
        //var temp = createSearchParam();
        var json = JSON.stringify(temp);
        var num =new Array();
        var groupId = new Array();
@@ -468,6 +562,187 @@
        
    }    
    
    //页面加载时查询省
    $.post("BattInfAction_serchByStation",null,function(data){
        data = data.result;
        data = eval("("+data+")");
        if(data.code==1&&data.data.length>0){
               var $Ostation_name1=$("#mainteArea");
            $Ostation_name1.text("");
            var arr = new Array();
            for(var i=0;i<=data.data.length;i++)
            {
                   if(i == 0){
                       arr.push({
                           val:"",
                           txt:"全部(共"+data.sum+"个)",
                       });
                   }else{
                       arr.push({
                           val:data.data[i-1].StationName1,
                           txt:data.data[i-1].StationName1,
                       });
                   }
            }
            updataSel($Ostation_name1, arr);
        }
         findCity();
    });
//当省改变时更新市
    function findCity(){
        var data = {
            StationName1: $("#mainteArea").val()
        };
            $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName2",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
            data = data.result;
            data = eval("("+data+")");
            //console.info(data);
            //console.info(data.code);
            if(data.code==1&&data.data.length>0){
                   var $Ostation_name1=$("#city");
                $Ostation_name1.text("");
                var arr = new Array();
                for(var i=0;i<=data.data.length;i++)
                {
                       if(i == 0){
                           arr.push({
                               val:"",
                               txt:"全部(共"+data.data.length+"个)",
                           });
                       }else{
                           arr.push({
                               val:data.data[i-1].StationName2,
                               txt:data.data[i-1].StationName2,
                           });
                       }
                }
                updataSel($Ostation_name1, arr);
            }
             findCounty();
        }
        });
    }
//当市改变时更新区/县
    function findCounty(){
        var data = {
            StationName1: $("#mainteArea").val(),
            StationName2:$("#city").val(),
        };
        //console.info(data);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName5",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
            data = data.result;
            data = eval("("+data+")");
            //console.info(data);
            //console.info(data.code);
            if(data.code==1&&data.data.length>0){
                   var $Ostation_name1=$("#country");
                $Ostation_name1.text("");
                var arr = new Array();
                for(var i=0;i<=data.data.length;i++)
                {
                       if(i == 0){
                           arr.push({
                               val:"",
                               txt:"全部(共"+data.data.length+"个)",
                           });
                       }else{
                           arr.push({
                               val:data.data[i-1].StationName5,
                               txt:data.data[i-1].StationName5,
                           });
                       }
                }
                updataSel($Ostation_name1, arr);
            }
          findStationNamebyStationname1();
        }
        });
    }
 //当区县更新时更新机房
    function findStationNamebyStationname1(){
        var data = {
            StationName1: $("#mainteArea").val(),
            StationName2:$("#city").val(),
            StationName5:$("#country").val()
        };
        //console.info(data);
        $.ajax({
            type: "post",
            url: "BattInfAction!serchStationName3",
            async:true,
            dataType:'json',
            data:"json = "+JSON.stringify(data),
            success: function(data){
            data = data.result;
            data = eval("("+data+")");
            //console.info(data);
            //console.info(data.code);
            if(data.code==1&&data.data.length>0){
                   var $Ostation_name1=$("#homeName");
                $Ostation_name1.text("");
                var arr = new Array();
                for(var i=0;i<=data.data.length;i++)
                {
                       if(i == 0){
                           arr.push({
                               val:"",
                               stationid:"",
                               txt:"全部(共"+data.data.length+"个)",
                           });
                       }else{
                           arr.push({
                               val:data.data[i-1].StationName3,
                               stationid:data.data[i-1].StationId,
                               txt:data.data[i-1].StationName3,
                           });
                       }
                }
                //console.info(111111111111111);
                updataSelStation($Ostation_name1, arr);
            }
        }
        });
    }
   //当省改变时更新市
   $('#mainteArea').change(function(){
           findCity();
   });
   //当市改变时改变区/县
   $('#city').change(function(){
           findCounty();
   });
   //当区/县改变时改变机房
   $('#country').change(function(){
           findStationNamebyStationname1();
   });
        
    $(function() {
        //点击上一页