New file |
| | |
| | | <!DOCTYPE html>
|
| | | <html lang="en">
|
| | | <head>
|
| | | <meta charset="UTF-8">
|
| | | <title>已审批通过电机房详情</title>
|
| | | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=0">
|
| | | <meta name="apple-mobile-web-app-capable" content="yes">
|
| | | <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
| | | <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css"/>
|
| | | <link rel="stylesheet" type="text/css" href="css/tbl.css">
|
| | | <script type="text/javascript" src="mobilJs/jquery-1.8.2.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="mobilJs/jquery.mobile-1.4.5.min.js"></script>
|
| | | <style type="text/css"> |
| | | input{-webkit-appearance: none;}
|
| | | table {
|
| | | margin-top:.5em;
|
| | | border-collapse:separate; |
| | | border-spacing:0 .5em;
|
| | | }
|
| | | |
| | | tbody tr td{
|
| | | overflow: hidden;
|
| | | text-overflow:ellipsis;
|
| | | white-space: nowrap;
|
| | | }
|
| | | .uncheck{
|
| | | background-color: #dddddd38!important;
|
| | | color: #bdbdbdc4!important;
|
| | | }
|
| | | .ui-btn-icon-right {
|
| | | padding-right: 8.5em;
|
| | | }
|
| | | .hbg{
|
| | | background-color:#ddd9;
|
| | | }
|
| | | #battdata {
|
| | | background-color:#dddddd54
|
| | | }
|
| | | .ui-select .ui-btn select{
|
| | | width:77%;
|
| | | }
|
| | | .ptr0{
|
| | | position: absolute;
|
| | | top: 0;
|
| | | right: 0;
|
| | | margin:0!important; |
| | | }
|
| | | |
| | | </style>
|
| | | <link rel="stylesheet" href="css/fgpanel.css">
|
| | | </head>
|
| | | <body>
|
| | | <div data-role="page">
|
| | | |
| | | <!-- 头部内容 -->
|
| | | <div data-role="header" data-position="fixed">
|
| | | <a href="batt-unapproved-index.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" >
|
| | | |
| | | |
| | | |
| | | |
| | | </fieldset>
|
| | | |
| | | </div>
|
| | | <!-- 主体内容 -->
|
| | | <div data-role="main">
|
| | | <!-- <div class="set-option"> -->
|
| | | <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>
|
| | | <td>省</td>
|
| | | <td>
|
| | | <input type="text" id="mainteArea" class="unable" data-mini="true" onfocus="this.blur()"/>
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>城市</td>
|
| | | <td>
|
| | | <input type="text" id="city" class="unable" data-mini="true" onfocus="this.blur()"/> |
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>区县</td>
|
| | | <td>
|
| | | <input type="text" id="country" class="unable" data-mini="true" onfocus="this.blur()"/> |
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>机房名称</td>
|
| | | <td>
|
| | | <input type="text" id="homeName" data-mini="true">
|
| | | |
| | | </td>
|
| | | </tr>
|
| | | |
| | | |
| | | <input type="hidden" id="StationName4" data-mini="true" />
|
| | | |
| | | |
| | | <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" />
|
| | | |
| | | |
| | | |
| | | |
| | | <input type="hidden" id="MonResStd" data-mini="true" /> |
| | | <input type="hidden" id="MonSerStd" data-mini="true" />
|
| | | <input type="hidden" id="MonVolLowToAvg" data-mini="true" />
|
| | | |
| | | <tr>
|
| | | <td>*负载电流(A)</td>
|
| | | <td>
|
| | | <input type="text" id="Load_curr" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | |
| | | <input type="hidden" id="DisCurrMax" data-mini="true" />
|
| | | |
| | | |
| | | <tr>
|
| | | <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" />
|
| | | |
| | | <tr>
|
| | | <td>*安装人员</td>
|
| | | <td>
|
| | | <input type="text" id="install_user" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | |
| | | <tr>
|
| | | <td>*通讯计数</td>
|
| | | <td>
|
| | | <input type="text" id="tongxunnumber" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | |
| | | <tr>
|
| | | <td>*丢包率</td>
|
| | | <td>
|
| | | <input type="text" id="diubaonumber" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | |
| | | <tr>
|
| | | <td>*是否验收</td>
|
| | | <td>
|
| | | <input type="text" id="check_en" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | <!-- </div> -->
|
| | | <div id="battdata">
|
| | | <!-- <div>
|
| | | <h1 class="hbg">电池组1</h1>
|
| | | <table class="layout-set"> |
| | | <tbody>
|
| | | <tr>
|
| | | <td>设备索引</td>
|
| | | <td>
|
| | | <fieldset data-role="controlgroup" data-type="horizontal"> |
| | | <select>
|
| | | <option value="">0</option>
|
| | | <option value="mon">1</option>
|
| | | <option value="mon">2</option>
|
| | | <option value="mon">3</option>
|
| | | |
| | | </select>
|
| | | </fieldset> |
| | | </td> |
| | | </tr>
|
| | | <tr>
|
| | | <td>电池组名称</td>
|
| | | <td><input type="text" id="" data-mini="true" /></td>
|
| | | </tr>
|
| | | </tbody>
|
| | | </table>
|
| | | </div> -->
|
| | | </div> |
| | | |
| | | |
| | | </div>
|
| | | |
| | | <div data-role="footer" data-position="fixed" data-theme="a"> |
| | | <div data-role="navbar">
|
| | | <ul>
|
| | | <li><a href="" id="applyyanshou"class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="check" data-role="button">申请验收</a></li>
|
| | | <li><a href="" id="shishishuju" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-check" data-position-to="window" data-icon="delete" data-role="button">实时数据</a></li>
|
| | | </ul>
|
| | | </div> |
| | | </div> |
| | | <div data-role="popup" id="yourPopup" class="ui-content" data-overlay-theme="b">
|
| | | <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn ui-icon-delete ui-btn-icon-notext ui-btn-right">关闭</a>
|
| | | <a href="" data-rel="back" id="sure" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-check" >提交</a>
|
| | | <a href="" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-icon-left ui-icon-delete" >放弃</a>
|
| | | </div> |
| | | </div>
|
| | | </body>
|
| | |
|
| | |
|
| | | <script type="text/javascript"> |
| | | function creatAllView(num){
|
| | | var allString=''
|
| | | ,i=0;
|
| | | if(num>4){return false}
|
| | | for(i=0;i<num;i++){
|
| | | allString+=creatBattView(i);
|
| | | }
|
| | | return $("#battdata").html(allString); |
| | | } |
| | | |
| | | $("#applyyanshou").on('click',function(){
|
| | |
|
| | | })
|
| | | |
| | | $("#shishishuju").on('click',function(){
|
| | |
|
| | | })
|
| | | |
| | | 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 '+'id='+'battproducer'+index+'>'
|
| | | ,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>'+'<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(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>';
|
| | | return battTitle+battBrand+battType+battNum+battNumOpt+MonVolStd+nomCap+battIndex+battName; |
| | | } |
| | | function selectedNum(index){
|
| | | var selected='';
|
| | | if(temp[index].binf.MonCount==4){ |
| | | return selected='<option '+'value='+4+' selected=selected' +'>'+'4 个'+'</option>'+'<option '+'value='+24 +'>'+'24个'+'</option>';
|
| | | }else{
|
| | | return selected='<option '+'value='+24+' selected=selected' +'>'+'24 个'+'</option>'+'<option '+'value='+4 +'>'+'4个'+'</option>';
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | function selectedIndex(index){
|
| | | var selected='',
|
| | | i=0;
|
| | | var battproducer = ["理士","圣阳","双登","SENRY","南都","爱默生","科士达","银泰","丰日","中兴能派","光宇",
|
| | | "艾诺斯华达","雄韬","风帆","文隆","中山"];
|
| | | selected+= '<option '+'value='+temp[index].binf.BattProducer+'>'+temp[index].binf.BattProducer+'</option>';
|
| | | for(var i=0;i<battproducer.length;i++){
|
| | | if(temp[index].binf.BattProducer!=battproducer[i]){
|
| | | selected+= '<option '+'value='+battproducer[i]+'>'+battproducer[i]+'</option>'; |
| | | } |
| | | }
|
| | | return selected; |
| | | } |
| | | var temp = getCookie("eleparm");
|
| | | //console.info(temp);
|
| | | temp=JSON.parse(temp);
|
| | | console.info(temp);
|
| | | var tempgroupid = new Array() ;
|
| | | for(var i=0;i<temp.length;i++){
|
| | | tempgroupid.push(temp[i].binf.BattGroupId);
|
| | | }
|
| | | console.info(tempgroupid);//电池组 ID 数组,(若添加,则需要新建);
|
| | | var addbattnum = temp.length;//添加电池组数目计数
|
| | | var moncount = 0;
|
| | | var fuchongfazhi = [0,0,0,0];
|
| | | var lixiandianyafazhi = [0,0,0,0];
|
| | | $(function(){
|
| | | creatAllView(temp.length).trigger('create');
|
| | | setMonVolStd(temp.length);
|
| | | });
|
| | |
|
| | | $(function () {
|
| | | //setTimes($("#startTestrecord"),'2000-01-01');
|
| | | //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
|
| | | |
| | | installstartdata(temp);
|
| | | });
|
| | | |
| | | function creatgroupid(){
|
| | | var dev_id ='';
|
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: true
|
| | | ,url: 'BattInfAction!searchmaxdev_id'
|
| | | ,data: null
|
| | | ,dataType: 'json'
|
| | | ,success:function(res) {
|
| | | console.info(res);
|
| | | var data = JSON.parse(res.result);
|
| | | console.info(data);
|
| | | if(data.length!=0){
|
| | | data = data.data;
|
| | | dev_id = data;
|
| | | //console.info(dev_id);
|
| | | document.getElementById("FBSDeviceId").value = dev_id;
|
| | | var ip = getDevIp(dev_id);
|
| | | //console.info(ip);
|
| | | document.getElementById("FbsDeviceIp").value = ip;
|
| | | }else{
|
| | | alert("groupid生成失败");
|
| | | }
|
| | | } |
| | | |
| | | }); |
| | | }
|
| | | // 根据设备id计算设备ip
|
| | | function getDevIp(dev_id) {
|
| | | var ptn = /^91([0-9]{7})$/;
|
| | | var ip = '';
|
| | | console.info(dev_id);
|
| | | if(ptn.test(dev_id)) {
|
| | | var value = Number(RegExp.$1);
|
| | | // console.log(value);
|
| | | var intNum = prefixInteger(Math.floor(value/256), 3);
|
| | | var resNum = prefixInteger(value%256, 3);
|
| | | ip = '127.000.'+intNum+'.'+resNum;
|
| | | }else {
|
| | | ip = '设备ID格式不正确';
|
| | | }
|
| | | console.info(ip);
|
| | | return ip;
|
| | | }
|
| | | |
| | | function applyendyanshou(arr){ //申请验收
|
| | | var temp = JSON.stringify(arr);
|
| | | $.ajax({ //申请验收
|
| | | type: 'post',
|
| | | async: true,
|
| | | url: 'Battinf_applyAction!checkPro',
|
| | | data: "json="+temp,
|
| | | dataType: 'json',
|
| | | success:function(data) {
|
| | | console.info(data);
|
| | | data = JSON.parse(data.result);
|
| | | if(data.code==1){
|
| | | alert("申请验收成功"); |
| | | }
|
| | | }
|
| | | });
|
| | | |
| | | }
|
| | | // 设置浮充电压阀值/设置离线电压阀值 //
|
| | | function setFloatAndoutLine(index) {
|
| | | var monvolstd = "#MonVolStd"+index;
|
| | | var MonCount = "#MonCount" +index;
|
| | | var vol = $(monvolstd).val();
|
| | | var monnum = $(MonCount).val();
|
| | | var chargeVol = (vol*1.117*monnum).toFixed(1); // 浮充电压阀值
|
| | | var outlineVol = (vol*1.073*monnum).toFixed(1); // 离线电压阀值
|
| | | |
| | | //$('#BattFloatCurrent').val(chargeVol); // 浮充电压阀值
|
| | | //$('#OfflineVolLevel').val(outlineVol); // 离线电压阀值
|
| | | fuchongfazhi[index] = chargeVol;
|
| | | lixiandianyafazhi[index] = outlineVol;
|
| | | console.info(vol);
|
| | | }
|
| | | |
| | | |
| | | function prefixInteger(num, length) {
|
| | | return (num/Math.pow(3,length)).toFixed(length).substr(2);
|
| | | }
|
| | | |
| | | //导入表格默认数据
|
| | | function installstartdata(temp){
|
| | | data=temp[0].binf;
|
| | | setMonVolStd(temp.length);
|
| | | document.getElementById("StationId").value = data.StationId;
|
| | | document.getElementById("mainteArea").value = data.StationName1;
|
| | | document.getElementById("city").value = data.StationName2; //市
|
| | | document.getElementById("country").value = data.StationName5; //区县
|
| | | document.getElementById("homeName").value = data.StationName3; //机房名称
|
| | | document.getElementById("StationName4").value = data.StationName4; //设备名称
|
| | | document.getElementById("StationIp").value = data.StationIp; //设备IP
|
| | | document.getElementById("FBSDeviceId").value = data.FBSDeviceId; |
| | | 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;
|
| | | //document.getElementById("GroupIndexInFBSDevice").value = temp[12];
|
| | | 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("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("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 = data.BattProductDate;
|
| | | document.getElementById("endTestrecord").value = data.BattInUseDate;
|
| | | //setTimes($("#startTestrecord"),data.productDate);
|
| | | //setTimes($("#endTestrecord"),data.useDate);
|
| | | document.getElementById("install_user").value = data.install_user;
|
| | | document.getElementById("tongxunnumber").value = getCookienumber(data.StationId);
|
| | | document.getElementById("diubaonumber").value = getCookiediubao(data.StationId)
|
| | | |
| | | for(var i=0;i<temp.length;i++){
|
| | | data=temp[i]; |
| | | document.getElementById("check_en").value = yanshou(data.check_en);
|
| | | document.getElementById("MonCapStd"+i).value = data.binf.MonCapStd;
|
| | | document.getElementById("MonVolStd"+i).value = data.binf.MonVolStd;
|
| | | //console.info(data.MonCount);
|
| | | $("#MonCount"+i).find("option:selected").val(data.binf.MonCount);
|
| | | var battString = "#battname"+i;
|
| | | var battModel = "#batttype"+i;
|
| | | var battproducer = "#battproducer"+i
|
| | | //var battproducer ="#battproducer"+i; |
| | | $(battString).val(data.binf.BattGroupName);
|
| | | $(battModel).val(data.binf.BattModel);
|
| | | $(battproducer).val(data.binf.BattProducer);
|
| | | console.info($(battproducer).val());
|
| | | }
|
| | | }
|
| | | |
| | | function getCookienumber(id){//输入ID,返回通讯计数。数据从缓存获取。
|
| | | //var a = getnumber();
|
| | | //console.info(a);
|
| | | if(getCookie("numberget")){
|
| | | var number = getCookie("numberget");
|
| | | number = JSON.parse(number);
|
| | | console.info(number);
|
| | | if(number[0]){
|
| | | for(var i =0; i<number.length;i++){
|
| | | if(id == number[i].dev_id){
|
| | | return number[i].dev_commcount;
|
| | | }
|
| | | } |
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | function getCookiediubao(id){ //丢包率
|
| | | if(getCookie("numberget")){
|
| | | var number = getCookie("numberget");
|
| | | number = JSON.parse(number);
|
| | | console.info(number);
|
| | | if(number[0]){
|
| | | for(var i =0; i<number.length;i++){
|
| | | if(id == number[i].dev_id){
|
| | | var errorCount = number[i].dev_errcommcount;
|
| | | var allCount = number[i].dev_commcount+errorCount;
|
| | | var parcent = (allCount==0?0:errCount/allCount*100)
|
| | | return parcent;
|
| | | }
|
| | | } |
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | // 格式化提交后台信息的对象数组并返回 单个修改,手机方式不修改多个电池组
|
| | | function getUpdateArr(){
|
| | | mon=$('#MonVolStd').val();
|
| | | //moncount = ;
|
| | | var arr = new Array();
|
| | | |
| | | for(var i=0;i<temp.length;i++){
|
| | | setFloatAndoutLine(i);
|
| | | |
| | | var battString = "#battname"+i;
|
| | | var battModel = "#batttype"+i;
|
| | | var battproducer ="#battproducer"+i; |
| | | var nomCap = "#nomCap"+i;
|
| | | //var id = $('fieldset div div 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 = {
|
| | | apply_date : new Date().format("yyyy-MM-dd hh:mm:ss"),
|
| | | num : temp[i].num,
|
| | | binf:{
|
| | | StationId : $("#StationId").val(), // 机房编号
|
| | | StationName : ($("#mainteArea").val()+"-"+$("#city").val()+"-"+$("#homeName").val()+"-"+$("#StationName4").val()), // 拼接机房名称
|
| | | StationName1 : $("#mainteArea").val(), // 省
|
| | | StationName2 : $("#city").val(), // 市
|
| | | StationName5 : $("#country").val(), // 区/县
|
| | | StationName3 : $("#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 : tempgroupid[i], //电池组id
|
| | | BattGroupNum : $("#BattGroupNum").val(), //机房内电池组编号
|
| | | BattGroupName : $(battString).val(),
|
| | | FloatVolLevel : fuchongfazhi[i], //浮充电压阀值
|
| | | OfflineVolLevel : lixiandianyafazhi[i], //离线电压阀值
|
| | | BattFloatCurrent : $("#BattFloatCurrent").val(), //浮充电流阀值
|
| | | MonCount :$("#MonCount"+i).val(), //单体数量
|
| | | MonCapStd : $("#MonCapStd"+i).val(), //标称容量
|
| | | MonVolStd : $("#MonVolStd"+i).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"+i).find("option:selected").val(), //电池品牌
|
| | | BattModel : $(battModel).val(), //电池型号
|
| | | BattProductDate : $("#startTestrecord").val(), //电池生产日期
|
| | | BattInUseDate : $("#endTestrecord").val(), //电池使用日期
|
| | | 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(){
|
| | | |
| | | })
|
| | | $("#sure").click(function(){
|
| | | if(nullOrn()){
|
| | | editBatt();
|
| | | }else{
|
| | | } //验证重要项是否为空,为空则提示; |
| | | //function backpage(){window.location.href="ele-param1.html";}
|
| | | // setTimeout(backpage,500); |
| | | });
|
| | | $("#cancel").click(function(){
|
| | | window.location.href="ele-param2.html";
|
| | | });
|
| | | });
|
| | | |
| | | function nullOrn(){
|
| | | |
| | | return true;
|
| | | |
| | | |
| | | }
|
| | | |
| | | function editBatt(){//
|
| | | console.info(getUpdateArr());
|
| | | var temp = JSON.stringify(getUpdateArr());
|
| | | console.info(temp);
|
| | | $.ajax({
|
| | | type: "post", |
| | | url: "Battinf_applyAction!updatePro", |
| | | async:true, |
| | | dataType:'json',
|
| | | data:"json="+temp, |
| | | success: function(data){ |
| | | var model = JSON.parse(data.result);
|
| | | //var model = eval('('+data.result+')');
|
| | | 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"
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | function yanshou(check_en){
|
| | | if(check_en==0){
|
| | | return "未验收";
|
| | | }else if(check_en==2){
|
| | | return "已申请验收";
|
| | | }else if(check_en==1){
|
| | | return"已完成验收";s
|
| | | }
|
| | | } |
| | | |
| | | $('input:radio[name="battnum"]').click(function(){
|
| | | var $this=$(this)
|
| | | , $mon=$('#MonVolStd') ;
|
| | | if ($this.attr("checked")) { |
| | | if($this.val()==4){
|
| | | $mon.val("12");
|
| | | moncount =4;
|
| | | };
|
| | | if($this.val()==24){
|
| | | $mon.val("2");
|
| | | moncount = 24;
|
| | | } |
| | | }
|
| | | });
|
| | | |
| | | /*function creatMonCapOpt(){
|
| | | var k,optionStr='',allString;
|
| | | for(var i=1;i<11;i++){
|
| | | k=i*50;
|
| | | optionStr+='<option'+' value='+k+'>'+k+'</option>'; |
| | | }
|
| | | allString=optionStr+'<option'+' value='+1000+'>'+1000+'</option>'
|
| | | $("#MonCapStd").html(allString);
|
| | | }
|
| | | creatMonCapOpt();
|
| | | */
|
| | | function creatMonCapOpt(index){
|
| | | var selected='',
|
| | | i=0;
|
| | | //console.info(temp[index.binf.MonCapStd]);
|
| | | 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 getSelected(id){
|
| | | /* var s;
|
| | | $(id).change(function(){
|
| | | |
| | | var g=$(this).find("option:selected").val();
|
| | | console.warn(g);
|
| | | s=g
|
| | | });
|
| | | if(!s){s=$(id).find("option:selected").val()} */
|
| | | var s=$(id).find("option:selected").val();
|
| | | return s;
|
| | | }
|
| | | /* function creatMonCapOpt(suoyin){
|
| | | var optionStr,allString;
|
| | | |
| | | for(var i=1;i<11;i++){
|
| | | |
| | | k=i*50;
|
| | | |
| | | //optionStr+='<option'+' value='+k+'>'+k+'</option>';
|
| | | optionStr+='<option'+' value='+k+'>'+k+'</option>';
|
| | | |
| | | |
| | | |
| | | }
|
| | | allString=optionStr+'<option'+' selected=selected '+' value='+1000+'>'+1000+'</option>'
|
| | | return allString;
|
| | | |
| | | |
| | | }*/
|
| | | function setMonVolStd(suoyin){
|
| | | for(var u=0;u<suoyin;u++){ |
| | | var id=''; |
| | | id='#MonCount'+u; |
| | | (function(u){
|
| | | var vol='#MonVolStd'+u;
|
| | | $(document).on("change", id, function () {
|
| | | if($(this).find("option:selected").val()==4){$(vol).val(12);}
|
| | | if($(this).find("option:selected").val()==24){$(vol).val(2);} |
| | | })
|
| | | })(u)
|
| | | |
| | | } |
| | | }
|
| | | function setMonVolStd(index){
|
| | | for(var i=0;i<index;i++){
|
| | | var s='#MonVolStd'+i;
|
| | | $(s).val(12);
|
| | | }
|
| | | |
| | | }
|
| | | |
| | | /* 操作成功 |
| | | $('#changeSuc').popup('open');
|
| | | 操作失败
|
| | | $('#changeErr').popup('open'); */
|
| | | </script>
|
| | | </html>
|