D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore
2018-12-29 f0bb5c3c5b95ec825e4e444b7688c595d5ebebc7
gx_tieta/WebRoot/mobil/batt-edit2.html
@@ -26,17 +26,17 @@
         white-space: nowrap;
      }
      .uncheck{
          background-color: #dddddd38!important;
            color: #bdbdbdc4!important;
          background-color: #ddd!important;
            color: #000!important;
      }
      .ui-btn-icon-right {
            padding-right: 8.5em;
        }
        .hbg{
            background-color:#ddd9;
            background-color:#ddd;
        }
        #battdata {
            background-color:#dddddd54
            background-color:#eee;
        }
        .ui-select .ui-btn select{
            width:77%;
@@ -47,9 +47,7 @@
          right: 0;
          margin:0!important; 
        }
         #newbattnum-button{
            padding: 1em 1.9em;
         }
   </style>
   <link rel="stylesheet" href="css/fgpanel.css">
</head>
@@ -60,16 +58,7 @@
      <div data-role="header" data-position="fixed">
         <a href="ele-param2.html" target="_top" class="ui-btn ui-corner-all ui-shadow ui-icon-back ui-btn-icon-left" style="padding-top: 0.7em; padding-bottom: 0.7em;">返回</a>
         <h1>修改电池组信息配置</h1>
         <fieldset data-role="controlgroup" class="ptr0" >
                     <select id="newbattnum" data-mini="true">
                       <option value=0>新建电池组</option>
                     </select>
                 </fieldset>
         
      </div>
      <!-- 主体内容 -->
@@ -78,30 +67,14 @@
                        <table class="layout-set">
                           <tbody>
                              <tr>
                                 <td>机房编号</td>
                                 <td>
                                    <input type="text" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/>
                                 </td>
                              </tr>
                              <tr>
                                 <td>FBS设备ID(重要)</td>
                                 <td>
                                    <input type="text" id="FBSDeviceId" class="unable" data-mini="true" onfocus="this.blur()"/>
                                 </td>
                              </tr>
                              <tr>
                                 <td>FBS设备IP(重要)</td>
                                 <td>
                                    <input type="text" id="FbsDeviceIp" class="unable" data-mini="true" onfocus="this.blur()" />
                                 </td>
                              </tr>
                              <tr>
                                 <td>电池组ID</td>
                                 <td>
                                    <input type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" onfocus="this.blur()" />
                                 </td>
                              </tr>
                              <tr>
                                    <input type="hidden" type="text" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/>
                                    <input type="hidden" type="text" id="FBSDeviceId" class="unable" data-mini="true" />
                                    <input type="hidden" type="text" id="FbsDeviceIp" class="unable" data-mini="true" />
                                    <input type="hidden" type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" />
                                 <td>省</td>
                                 <td>
                                       <input type="text" id="mainteArea" class="unable" data-mini="true" onfocus="this.blur()"/>
@@ -122,8 +95,7 @@
                              <tr>
                                 <td>机房名称</td>
                                 <td>
                                    <input type="text" id="homeName"  data-mini="true">
                                    <textarea id="homeName" class="unable" data-mini="true"></textarea>
                                 </td>
                              </tr>
                              
@@ -132,30 +104,18 @@
                                 
                              
                                    <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" />
                                    <input type="hidden" id="FloatVolLevel" data-mini="true" />
                                    <input type="hidden" id="OfflineVolLevel" class="unable" data-mini="true" />
                                 
                                    <input type="hidden" id="BattFloatCurrent" class="unable" data-mini="true" />
                                 
@@ -171,9 +131,7 @@
                                         <label for="twentyfour">24个</label>
                                         <input type="radio" name="battnum" id="twentyfour" value="24"> 
                                       </fieldset>
                                 </td>
                              </tr>
                              <tr>
@@ -208,7 +166,7 @@
                                 
                              
                              <tr>
                                 <td>基站电话号码</td>
                                 <td>*基站电话号码</td>
                                 <td>
                                    <input type="text" id="station_phone" data-mini="true" />
                                 </td>
@@ -287,6 +245,7 @@
  } 
   
   
  function creatBattView(index){
         var count=index+1
            ,battTitle='<div>'+'<h1 class="hbg">'+'电池组'+count+'</h1>'+
@@ -296,7 +255,7 @@
            ,battNum='<tr>'+'<td>'+'*单体数量'+'</td>'+'<td>'+'<fieldset data-role="controlgroup"  data-type="horizontal">'+'<select '+ 'id='+'MonCount'+index+'>'
            ,battNumOpt=selectedNum(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'     
            ,MonVolStd='<tr>'+'<td>'+'*标称单体电压(V)'+'</td>'+'<td>'+'<input type="text" '+'id='+'MonVolStd'+index+' data-mini="true"'+' class="unable" '+'/>'+'</td>'+'</tr>'
            ,nomCap='<tr>'+'<td>'+'*标称容量(AH)'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" >'+'<select '+'id='+'MonCapStd'+index+' data-mini="true"'+'>'+creatMonCapOpt()+'</select>'
            ,nomCap='<tr>'+'<td>'+'*标称容量(AH)'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" >'+'<select '+'id='+'MonCapStd'+index+' data-mini="true"'+'>'+creatMonCapOpt(index)+'</select>'
             +'</fieldset>'+'</td>'+'</tr>'
            ,battIndex='<tr>'+'<input type="hidden" '+'id='+'battindex'+index+' data-mini="true"'+'value='+count+' />'+'</tr>' 
            ,battName='<tr>'+'<input type="hidden" '+'id='+'battname'+index+' data-mini="true"'+'value='+'电池组'+count+' />'+'</tr>'+'</tbody>'+'</table>'+'</div>';
@@ -313,18 +272,7 @@
     
     }
  }
  function creatBa(a){
        var battnum=4-a,
            opstring='';
        if(a>4&&battnum<=0){return false;}
        for(var i=0;i<=battnum;i++){
           opstring+='<option value='+i+'>新建'+i+'个电池组</option>';
        }
         console.warn(opstring+'ttt');
         return $('#newbattnum').html(opstring);
   }
 
  function selectedIndex(index){
       var selected='',
@@ -356,15 +304,10 @@
   $(function(){
   creatAllView(temp.length).trigger('create');
   //creatMonCapOpt(temp.length);
   setMonVolStd(temp.length);
   creatBa(temp.length).trigger('create');
   setchangedMonVolStd(temp.length);
   
   });
 
   $(function () {
      //setTimes($("#startTestrecord"),'2000-01-01');
      //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
@@ -390,7 +333,7 @@
                  //console.info(dev_id);
                  document.getElementById("FBSDeviceId").value = dev_id;
                  var ip = getDevIp(dev_id);
                  //console.info(ip);
                  console.info(ip);
                  document.getElementById("FbsDeviceIp").value = ip;
               }else{
                  alert("groupid生成失败");
@@ -434,19 +377,10 @@
    }
 
    function prefixInteger(num, length) {
       return (num/Math.pow(3,length)).toFixed(length).substr(2);
       return (Array(length).join('0') + num).slice(-length);
   }
   function creatBa(a){
        var battnum=4-a,
            opstring='';
        if(a>4&&battnum<=0){return false;}
        for(var i=0;i<=battnum;i++){
           opstring+='<option value='+i+'>新建'+i+'个电池组</option>';
        }
         console.warn(opstring+'ttt');
         return $('#newbattnum').html(opstring);
   }
   //导入表格默认数据
   function installstartdata(temp){
         data=temp[0].binf;
@@ -471,8 +405,7 @@
         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("MonCapStd").value = data.MonCapStd;
         document.getElementById("MonResStd").value = data.MonResStd;
         document.getElementById("MonSerStd").value = data.MonSerStd;
         document.getElementById("MonVolLowToAvg").value = data.MonVolLowToAvg;
@@ -507,7 +440,6 @@
      function getUpdateArr(){
         mon=$('#MonVolStd').val();
      
         var arr = new Array();
         
         for(var i=0;i<temp.length;i++){
@@ -590,10 +522,13 @@
   });
    
    function nullOrn(){
          return true;
       console.info($("#homeName").val());
       console.info($("#station_phone").val());
       if($("#homeName").val!=""&&$("#station_phone").val()!=""&&$("#install_user").val()!=""){
          return true;
       }else{
          alert("请填写*内容");
       }
    }
    
    function editBatt(){//
@@ -615,15 +550,15 @@
               var model =data;
               if(model.code ==1){
                  alert("修改成功");
                  window.location.href="batt-unapproved.html"
                  window.location.href="batt-unapproved-index.html"
               }else{
                  alert("修改失败!");
                  window.location.href="batt-unapproved.html"
                  window.location.href="batt-unapproved-index.html"
               }      
              },
              error:function(){
                 alert("修改电池组失败!");
                 //window.location.href="batt-unapproved.html"
                 //window.location.href="batt-unapproved.html"  详情列表
              }
       });
    }
@@ -647,15 +582,8 @@
   
   
   
   $('#newbattnum').change(function(){
       var numbattnum = parseInt($('#newbattnum').val());
       var index =parseInt(tempindex.length);
       addbattnum=Math.floor((numbattnum)+(tempindex.length));
       console.warn(addbattnum);
       creatAllView(addbattnum).trigger('create');
       creatBattGroupId(addbattnum);
   });
   function creatMonCapOpt(suoyin){
   /*function creatMonCapOpt(suoyin){
        var optionStr,allString;
       
        for(var i=1;i<11;i++){
@@ -672,8 +600,21 @@
          return allString;
      
          
   }
   function setMonVolStd(suoyin){
   }*/
     function creatMonCapOpt(index){
       var selected='',
           i=0;
       var battproducer = ["50","100","150","200","250","300","350","400","450","500","1000"];
       selected+= '<option '+'value='+temp[index].binf.MonCapStd+'>'+temp[index].binf.MonCapStd+'</option>';
       for(var i=0;i<battproducer.length;i++){
             if(temp[index].binf.MonCapStd!=battproducer[i]){
                 selected+= '<option '+'value='+battproducer[i]+'>'+battproducer[i]+'</option>';
             }
       }
       return selected;
  }
   function setchangedMonVolStd(suoyin){
         for(var u=0;u<suoyin;u++){  
           var id='';  
          id='#MonCount'+u;