| | |
| | | console.info(temp);
|
| | | console.info(temp[30]);
|
| | | console.info(temp[33]);
|
| | | console.info(temp[34]);
|
| | | var suoyin = temp[33];
|
| | |
|
| | | $(function(){creatAllView(suoyin)});
|
| | |
| | |
|
| | | <!-- 头部内容 -->
|
| | | <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>
|
| | | <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>
|
| | |
|
| | | </div>
|
| | |
| | | $(function () {
|
| | | //setTimes($("#startTestrecord"),'2000-01-01');
|
| | | //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd'));
|
| | | creatgroupid();//如果检测为NEW ,则执行添加ID,如果为修改,则执行为拿到ID
|
| | | console.info()
|
| | | if(temp[34]!="edit")
|
| | | {
|
| | | console.warn("sssss")
|
| | | creatgroupid();//如果检测为NEW ,则执行添加ID,如果为修改,则执行为拿到ID
|
| | | }else{
|
| | | }
|
| | | installstartdata(temp);
|
| | | });
|
| | |
|
| | |
| | |
|
| | | //导入表格默认数据
|
| | | function installstartdata(temp){
|
| | | creatgroupid();
|
| | | |
| | | var data = {
|
| | | StationId: '4011100'
|
| | | ,StationName1: '广西省'
|
| | |
| | | ,install_user: '呵呵'
|
| | | };
|
| | | console.info(data.StationId);
|
| | | if(temp.length>0){
|
| | | if(temp[34]!="edit"){
|
| | | creatgroupid();
|
| | | document.getElementById("StationId").value = data.StationId;
|
| | | // document.getElementById("station_name1").value = data.StationName1;
|
| | | // document.getElementById("city").value = data.StationName2; //市
|
| | |
| | | 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("FBSDeviceId").value = temp[7]; |
| | | document.getElementById("FbsDeviceIp").value = temp[8];
|
| | | document.getElementById("FbsDeviceIp_YM").value = temp[9];
|
| | | document.getElementById("FbsDeviceIp_WG").value = temp[10];
|
| | |
| | | $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck");
|
| | | $("#sure").click(function(){
|
| | | if(nullOrn()){
|
| | | creatgroupid();//提交之前再次验证,创建ID
|
| | | addBattnew(); //提交
|
| | | if(temp[34]=="edit"){
|
| | | creatgroupid();//提交之前再次验证,创建ID
|
| | | addBattnew(); //提交
|
| | | }else{
|
| | | editBatt();
|
| | | } |
| | | }else{
|
| | | } //验证重要项是否为空,为空则提示;
|
| | | //function backpage(){window.location.href="ele-param1.html";}
|
| | | // setTimeout(backpage,500);
|
| | | });
|
| | | $("#cancel").click(function(){
|
| | | window.location.href="ele-param1.html";
|
| | | window.location.href="ele-param2.html";
|
| | | });
|
| | | });
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | function addBattnew(){
|
| | | 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');
|
| | | 操作失败
|