CJJ
2018-12-14 ff26de8e5fe1acfbbe30e92164fd565c3911b561
gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit.html
@@ -52,14 +52,17 @@
  }   
     var temp = getCookie("eleparm");
     var tempindex = getCookie("eleparmindex");
   var tempnum = getCookie("eleparmnum");
   //var temp
   //console.info(temp);
   var tempgroupid = getCookie("elegroupid");
   console.info(tempgroupid);
   tempgroupid = JSON.parse(tempgroupid);
   console.info(tempindex);
   console.info(tempnum);
   temp=JSON.parse(temp);
   tempindex = JSON.parse(tempindex);
   console.info(temp);
   console.info(temp[30]);
   console.info(temp[33]);
   console.info(tempindex);
   tempnum =JSON.parse(tempnum);
   var suoyin = temp[33];
   
   $(function(){creatAllView(tempindex.length)});
@@ -114,7 +117,7 @@
                              <tr>
                                 <td>机房编号</td>
                                 <td>
                                    <input type="text" id="StationId" data-mini="true" />
                                    <input type="text" id="StationId" class="unable" data-mini="true" />
                                 </td>
                              </tr>
                              <tr>
@@ -156,13 +159,13 @@
                              <tr>
                                 <td>FBS设备ID(重要)</td>
                                 <td>
                                    <input type="text" id="FBSDeviceId" data-mini="true" />
                                    <input type="text" id="FBSDeviceId" class="unable" data-mini="true" />
                                 </td>
                              </tr>
                              <tr>
                                 <td>FBS设备IP(重要)</td>
                                 <td>
                                    <input type="text" id="FbsDeviceIp" data-mini="true" />
                                    <input type="text" id="FbsDeviceIp" class="unable" data-mini="true" />
                                 </td>
                              </tr>
                              <tr>
@@ -183,16 +186,11 @@
                                    <input type="text" id="FBSDeviceName" data-mini="true" />
                                 </td>
                              </tr>
                              <tr>
                                 <td>电池组ID</td>
                                 <td>
                                    <input type="text" readonly unselectable="on" value="123" id="BattGroupId" class="uncheck" data-mini="true" />
                                 </td>
                              </tr>
                              <tr>
                                 <td>机房内电池组编号</td>
                                 <td>
                                    <input type="text" readonly unselectable="on" value="123" id="BattGroupNum" class="uncheck" data-mini="true" />
                                    <input type="text" readonly unselectable="on" value="123" id="BattGroupNum" class="unable" class="uncheck" data-mini="true" />
                                 </td>
                              </tr>
                              
@@ -349,7 +347,7 @@
      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("BattGroupId").value = temp[13];
      document.getElementById("BattGroupNum").value = temp[14];
      //document.getElementById("BattGroupName").value = temp[15];
      document.getElementById("FloatVolLevel").value = temp[16];
@@ -380,12 +378,15 @@
   // 格式化提交后台信息的对象数组修改
   function getUpdateArr(){
         var arr = new Array();
         for(var i=0;i<tempindex.length;i++){
            var battString = "#battname"+i;
            var index = String(i);
            console.info(battString);
            var obj = {
               //apply_date : new Date().format("yyyy-MM-dd hh:mm:ss"),
               apply_date : new Date().format("yyyy-MM-dd hh:mm:ss"),
               num : tempnum[i],
               binf:{
                  StationId : $("#StationId").val(),   // 机房编号
                  StationName : ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val()),   // 拼接机房名称
@@ -401,7 +402,7 @@
                  FbsDeviceIp_WG : $("#FbsDeviceIp_WG").val(),         // 网关
                  FBSDeviceName : $("#FBSDeviceName").val(),         //设备名称
                  GroupIndexInFBSDevice : i,   //fbs设备索引
                  BattGroupId : $("#BattGroupId").val(),            //电池组id
                  BattGroupId : tempgroupid[i],            //电池组id
                  BattGroupNum : $("#BattGroupNum").val(),         //机房内电池组编号
                  BattGroupName : $(battString).val(),
                  FloatVolLevel : $("#FloatVolLevel").val(),         //浮充电压阀值
@@ -423,6 +424,7 @@
                  BattProductDate :  $("#startTestrecord").val()+" 00:00:00",      //电池生产日期
                  BattInUseDate :  $("#endTestrecord").val()+" 00:00:00",         //电池使用日期
                  install_user : $("#install_user").val(),         //安装人员
               }
            }
            arr.push(obj);
@@ -437,12 +439,7 @@
    $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
    $("#sure").click(function(){
         editParm();    
      /*   function backpage(){window.location.href="ele-param1.html";}
              setTimeout(backpage,500);
           });
       $("#cancel").click(function(){
        window.location.href="ele-param1.html";
       */
       });
   });
   function editParm(){
@@ -460,12 +457,15 @@
               console.info(model);
               if(model.code ==1){
                  alert("修改成功");
                  window.location.href="batt-unapproved.html"
               }else{
                  alert("修改失败!");
                  window.location.href="batt-unapproved.html"
               }      
              },
              error:function(){
                 alert("修改电池组失败!");
                 window.location.href="batt-unapproved.html"
              }
       });
   }