| | |
| | | <tr>
|
| | | <td>离线电压阀值(V)</td>
|
| | | <td>
|
| | | <input type="text" id="OfflineVolLevel" data-mini="true" />
|
| | | <input type="text" id="OfflineVolLevel" class="unable" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>浮充电流阀值(A)</td>
|
| | | <td>
|
| | | <input type="text" id="BattFloatCurrent" data-mini="true" />
|
| | | <input type="text" id="BattFloatCurrent" class="unable" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>单体数量</td>
|
| | | <td>*单体数量</td>
|
| | | <td>
|
| | | <input type="text" id="MonCount" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>标称容量(AH)</td>
|
| | | <td>*标称容量(AH)</td>
|
| | | <td>
|
| | | <input type="text" id="MonCapStd" data-mini="true" />
|
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>标称单体电压(V)</td>
|
| | | <td>*标称单体电压(V)</td>
|
| | | <td>
|
| | | <input type="text" id="MonVolStd" data-mini="true" />
|
| | | </td>
|
| | |
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>负载电流(A)</td>
|
| | | <td>*负载电流(A)</td>
|
| | | <td>
|
| | | <input type="text" id="Load_curr" data-mini="true" />
|
| | | </td>
|
| | |
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>基站号码</td>
|
| | | <td>基站电话号码</td>
|
| | | <td>
|
| | | <input type="text" id="station_phone" data-mini="true" />
|
| | | </td>
|
| | |
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>电池型号</td>
|
| | | <td>*电池型号</td>
|
| | | <td>
|
| | | <input type="text" id="BattModel" data-mini="true" />
|
| | | </td>
|
| | |
| | | </td>
|
| | | </tr>
|
| | | <tr>
|
| | | <td>安装人员</td>
|
| | | <td>*安装人员</td>
|
| | | <td>
|
| | | <input type="text" id="install_user" data-mini="true" />
|
| | | </td>
|
| | |
| | | $(function () {
|
| | | //setTimes($("#startTestrecord"),'2000-01-01');
|
| | | //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
|
| | | creatgroupid();
|
| | | creatgroupid();//如果检测为NEW ,则执行添加ID,如果为修改,则执行为拿到ID
|
| | | installstartdata(temp);
|
| | | });
|
| | |
|
| | |
| | | $('#OfflineVolLevel').val(outlineVol); // 离线电压阀值
|
| | | }
|
| | |
|
| | | $('#MonVolStd').change(function(){
|
| | | setFloatAndoutLine();
|
| | | });
|
| | | $('#MonCount').change(function(){
|
| | | setFloatAndoutLine();
|
| | | })
|
| | | function prefixInteger(num, length) {
|
| | | return (num/Math.pow(3,length)).toFixed(length).substr(2);
|
| | | }
|
| | |
| | | //导入表格默认数据
|
| | | function installstartdata(temp){
|
| | | creatgroupid();
|
| | | 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 = dev_id; |
| | | 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];
|
| | | var data = {
|
| | | StationId: '4011100'
|
| | | ,StationName1: '广西省'
|
| | | ,StationName2: '白色市'
|
| | | ,StationName5: '乐业县'
|
| | | ,StationName3: 'GX百色乐业县立新小区WF'
|
| | | ,StationName4: 'BTS设备'
|
| | | ,StationIp: '192.168.0.1'
|
| | | ,FBSDeviceId: '960000111'
|
| | | ,FbsDeviceIp: '127.0.0.1'
|
| | | ,FbsDeviceIp_YM: '255.255.255.0'
|
| | | ,FbsDeviceIp_WG: '127.0.0.1'
|
| | | ,FBSDeviceName: 'BTS'
|
| | | ,GroupIndexInFBSDevice: 1 |
| | | ,BattGroupId: 1000005
|
| | | ,BattGroupNum: 2
|
| | | ,BattGroupName: '电池组1'
|
| | | ,FloatVolLevel: 54
|
| | | ,OfflineVolLevel: 42.9 |
| | | ,BattFloatCurrent: 10
|
| | | ,MonCount: 24
|
| | | ,MonCapStd: 300
|
| | | ,MonVolStd: 2
|
| | | ,MonResStd: 0.2
|
| | | ,MonSerStd: 5000
|
| | | ,MonVolLowToAvg: 0.05 |
| | | ,Load_curr: 15
|
| | | ,DisCurrMax: '0'
|
| | | ,station_phone: 12345678912
|
| | | ,BattProducer: '升阳'
|
| | | ,BattModel: ''
|
| | | ,productDate: '2018-09-18 00:00:00'
|
| | | ,useDate: '2018-09-18 00:00:00'
|
| | | ,install_user: '呵呵'
|
| | | };
|
| | | console.info(data.StationId);
|
| | | if(temp.length>0){
|
| | | document.getElementById("StationId").value = data.StationId;
|
| | | // document.getElementById("station_name1").value = data.StationName1;
|
| | | // document.getElementById("city").value = data.StationName2; //市
|
| | | // document.getElementById("county").value = data.StationName5; //区县
|
| | | // document.getElementById("StationName3").value = data.StationName3; //机房名称
|
| | | 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_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("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("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];
|
| | | 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("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 = dev_id; |
| | | 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];
|
| | | }
|
| | | setFloatAndoutLine();
|
| | | }
|
| | |
|
| | |
| | | <script type="text/javascript">
|
| | | $(function(){
|
| | | $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
|
| | | $("#sure").click(function(){ |
| | | addBatt(); |
| | | $("#sure").click(function(){
|
| | | if(nullOrn()){
|
| | | //if(tem[35]=="new"){
|
| | | creatgroupid();//提交之前再次验证,创建ID
|
| | | addBattnew(); //提交
|
| | | //}else{editBatt();
|
| | | //} |
| | | }else{
|
| | | } //验证重要项是否为空,为空则提示; |
| | | //function backpage(){window.location.href="ele-param1.html";}
|
| | | // setTimeout(backpage,500);
|
| | | });
|
| | |
| | | });
|
| | | });
|
| | |
|
| | | function addBatt(){
|
| | | function nullOrn(){
|
| | | if($("#BattFloatCurrent").val()&&$("#MonCount").val()&&$("#MonCapStd").val()){
|
| | | return true;
|
| | | }else{
|
| | | alert("*项为必填项,不能为空,请重新输入");
|
| | | return false;
|
| | | } |
| | | |
| | | }
|
| | | |
| | | function addBattnew(){//新建电池组,添加到申请
|
| | | var temp = JSON.stringify(getUpdateArr());
|
| | | console.info(temp);
|
| | | $.ajax({
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | |
| | | //修改电池组,添加到BATTINF
|
| | | 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("修改电池组失败!");
|
| | | }
|
| | | });
|
| | | } |
| | | /* 操作成功
|
| | | $('#changeSuc').popup('open');
|
| | | 操作失败
|