<!DOCTYPE html>
|
<html lang="en">
|
<head>
|
<meta charset="UTF-8">
|
<title>电池组安装提交申请</title>
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<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 href="mobilCss/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css" />
|
<link href="mobilCss/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css" />
|
<link rel="stylesheet" type="text/css" href="css/tbl.css">
|
<script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script>
|
<script src="mobilJs/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
|
<script src="mobilJs/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
|
<script src="mobilJs/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
|
<script src="mobilJs/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
|
<script type="text/javascript" src="js/tbl.js"></script>
|
<script type="text/javascript" src="mobilJs/base.js"></script>
|
<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);
|
}
|
$("#battdata").html(allString);
|
}
|
|
|
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>'
|
,allOption=selectedIndex(index)+'</select>'+'</fieldset>'+'</td>'+'</tr>'
|
,battName='<tr>'+'<td>'+'电池组名称'+'</td>'+'<td>'+'<input type="text" '+'id='+'battname'+index+' data-mini="true"'+'value='+'电池组'+count+' />'+'</td>'+'</tr>'+'</tbody>'+'</table>'+'</div>';
|
return battTitle+allOption+battName;
|
|
}
|
|
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>';
|
|
}
|
|
return selected;
|
}
|
var temp = getCookie("eleparm");
|
//console.info(temp);
|
temp=JSON.parse(temp);
|
console.info(temp);
|
console.info(temp[30]);
|
console.info(temp[33]);
|
var suoyin = temp[33];
|
|
$(function(){creatAllView(suoyin)});
|
</script>
|
<script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script>
|
<style type="text/css">
|
|
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%;
|
}
|
</style>
|
<link rel="stylesheet" href="css/fgpanel.css">
|
</head>
|
<body>
|
<div data-role="page">
|
|
<!-- 头部内容 -->
|
<div data-role="header" data-position="fixed">
|
<a href="ele-param1.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>
|
|
</div>
|
<!-- 主体内容 -->
|
<div data-role="main">
|
<!-- <div class="set-option"> -->
|
<table class="layout-set">
|
<tbody>
|
<tr>
|
<td>机房编号</td>
|
<td>
|
<input type="text" id="StationId" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>省</td>
|
<td>
|
<input type="text" id="station_name1" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>城市</td>
|
<td>
|
<input type="text" id="city" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>区县</td>
|
<td>
|
<input type="text" id="county" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>机房名称</td>
|
<td>
|
<input type="text" id="StationName3" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>设备名称</td>
|
<td>
|
<input type="text" id="StationName4" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>机房IP</td>
|
<td>
|
<input type="text" id="StationIp" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>FBS设备ID(重要)</td>
|
<td>
|
<input type="text" id="FBSDeviceId" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>FBS设备IP(重要)</td>
|
<td>
|
<input type="text" id="FbsDeviceIp" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>子网掩码</td>
|
<td>
|
<input type="text" id="FbsDeviceIp_YM" class="unable" data-mini="true" value="456"/>
|
</td>
|
</tr>
|
<tr>
|
<td>网关</td>
|
<td>
|
<input type="text" id="FbsDeviceIp_WG" class="unable" data-mini="true" value="456"/>
|
</td>
|
</tr>
|
<tr>
|
<td>FBS设备名称</td>
|
<td>
|
<input type="text" id="FBSDeviceName" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>FBS电池索引(0-3)</td>
|
<td>
|
<input type="text" id="GroupIndexInFBSDevice" 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" />
|
</td>
|
</tr>
|
<tr>
|
<td>电池组名称</td>
|
<td>
|
<input type="text" id="BattGroupName" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>浮充电压阀值(V)</td>
|
<td>
|
<input type="text" id="FloatVolLevel" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>离线电压阀值(V)</td>
|
<td>
|
<input type="text" id="OfflineVolLevel" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>浮充电流阀值(A)</td>
|
<td>
|
<input type="text" id="BattFloatCurrent" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>单体数量</td>
|
<td>
|
<input type="text" id="MonCount" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>标称容量(AH)</td>
|
<td>
|
<input type="text" id="MonCapStd" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>标称单体电压(V)</td>
|
<td>
|
<input type="text" id="MonVolStd" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>标称单体内阻(mΩ)</td>
|
<td>
|
<input type="text" id="MonResStd" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>标称单体电导</td>
|
<td>
|
<input type="text" id="MonSerStd" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>单体电压次低偏移量(V)</td>
|
<td>
|
<input type="text" id="MonVolLowToAvg" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>负载电流(A)</td>
|
<td>
|
<input type="text" id="Load_curr" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>最大核容电流(A)</td>
|
<td>
|
<input type="text" id="DisCurrMax" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>基站号码</td>
|
<td>
|
<input type="text" id="station_phone" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>电池品牌</td>
|
<td>
|
<input type="text" id="BattProducer" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>电池型号</td>
|
<td>
|
<input type="text" id="BattModel" data-mini="true" />
|
</td>
|
</tr>
|
<tr>
|
<td>电池生产日期</td>
|
<td>
|
<input id="startTestrecord" type="text" name="appDate" class="appDatefir" value="2000-01-01" />
|
</td>
|
</tr>
|
<tr>
|
<td>投入使用日期 </td>
|
<td>
|
<input id="endTestrecord" type="text" name="appDate" class="appDatesec" value="2017-01-01" />
|
</td>
|
</tr>
|
<tr>
|
<td>安装人员</td>
|
<td>
|
<input type="text" id="install_user" 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="#yourPopup" data-rel="popup" 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="cancel" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but ui-btn-icon-delete" 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 () {
|
//setTimes($("#startTestrecord"),'2000-01-01');
|
//setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
|
installstartdata(temp);
|
|
});
|
|
function installstartdata(temp){
|
//$("#StationId").value=temp[0];
|
//var t=document.getElementById("station_name1");
|
document.getElementById("StationId").value = temp[0];
|
document.getElementById("station_name1").value = temp[1];
|
document.getElementById("city").value = temp[2]; //市
|
document.getElementById("county").value = temp[3]; //区县
|
document.getElementById("StationName3").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 = temp[14];
|
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];
|
}
|
|
|
// 格式化提交后台信息的对象数组并返回 单个修改,手机方式不修改多个电池组
|
function getUpdateArr(){
|
var arr = new Array();
|
var obj = new Object();
|
obj.StationId = $("#StationId").val(); // 机房编号
|
obj.StationName = ($("#station_name1").val()+"-"+$("#city").val()+"-"+$("#StationName3").val()+"-"+$("#StationName4").val()); // 拼接机房名称
|
obj.StationName1 = $("#station_name1").val(); // 省
|
obj.StationName2 = $("#city").val(); // 市
|
obj.StationName5 = $("#county").val(); // 区/县
|
obj.StationName3 = $("#StationName3").val(); // 机房名称
|
obj.StationName4 = $("#StationName4").val(); // 设备名称
|
obj.StationIp = $("#StationIp").val(); //机房ip
|
obj.FBSDeviceId = $("#FBSDeviceId").val(); //设备id
|
obj.FbsDeviceIp = $("#FbsDeviceIp").val(); //设备ip
|
obj.FbsDeviceIp_YM = $("#FbsDeviceIp_YM").val(); // 设备掩码
|
obj.FbsDeviceIp_WG = $("#FbsDeviceIp_WG").val(); // 网关
|
obj.FBSDeviceName = $("#FBSDeviceName").val(); //设备名称
|
obj.GroupIndexInFBSDevice = $("#GroupIndexInFBSDevice").val(); //fbs设备索引
|
obj.BattGroupId = $("#BattGroupId").val(); //电池组id
|
obj.BattGroupNum = $("#BattGroupNum").val(); //机房内电池组编号
|
obj.BattGroupName = $("#BattGroupName").val(); //电池组名称
|
obj.FloatVolLevel = $("#FloatVolLevel").val(); //浮充电压阀值
|
obj.OfflineVolLevel = $("#OfflineVolLevel").val(); //离线电压阀值
|
obj.BattFloatCurrent = $("#BattFloatCurrent").val(); //浮充电流阀值
|
obj.MonCount = $("#MonCount").val(); //单体数量
|
obj.MonCapStd = $("#MonCapStd").val(); //标称容量
|
obj.MonVolStd = $("#MonVolStd").val(); //标称电压
|
obj.MonResStd = $("#MonResStd").val(); //标称内阻
|
obj.MonSerStd = $("#MonSerStd").val(); //标称电导
|
obj.MonVolLowToAvg = $("#MonVolLowToAvg").val(); //单体电压次低偏移量
|
|
|
obj.Load_curr = $("#Load_curr").val(); //负载电流
|
obj.DisCurrMax = $("#DisCurrMax").val(); //最大核容电流
|
obj.station_phone = $("#station_phone").val(); //基站号码
|
|
obj.BattProducer = $("#BattProducer").val(); //电池品牌
|
obj.BattModel = $("#BattModel").val(); //电池型号
|
obj.BattProductDate = $("#startTestrecord").val(); //电池生产日期
|
obj.BattInUseDate = $("#endTestrecord").val(); //电池使用日期
|
obj.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");
|
$("#sure").click(function(){
|
if(temp[33]&&temp[33]=="new"){
|
addBatt();
|
}else{
|
editParm();
|
}
|
function backpage(){window.location.href="ele-param1.html";}
|
setTimeout(backpage,500);
|
});
|
$("#cancel").click(function(){
|
window.location.href="ele-param1.html";
|
});
|
});
|
function editParm(){
|
var parm = getUpdateArr();
|
$.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("修改电池组失败!");
|
}
|
});
|
}
|
function addBatt(){
|
var parm = getUpdateArr();
|
$.ajax({
|
type: "post",
|
url: "BattInfAction!add",
|
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("添加电池组发生错误!");
|
}
|
});
|
}
|
|
|
|
|
/* 操作成功
|
$('#changeSuc').popup('open');
|
操作失败
|
$('#changeErr').popup('open'); */
|
</script>
|
</html>
|