From 866a6facb439b93b7d693bb84730714200c7f85a Mon Sep 17 00:00:00 2001 From: CJJ <Administrator@USER-20180117QL> Date: 星期四, 20 十二月 2018 16:22:22 +0800 Subject: [PATCH] 申请添加 --- gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html | 108 +++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 82 insertions(+), 26 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html index de28ba3..415fbda 100644 --- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html +++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html @@ -57,6 +57,7 @@ console.info(temp); console.info(temp[30]); console.info(temp[33]); + console.info(temp[34]); var suoyin = temp[33]; $(function(){creatAllView(suoyin)}); @@ -99,7 +100,7 @@ <!-- 澶撮儴鍐呭 --> <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> @@ -202,29 +203,29 @@ <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> @@ -248,7 +249,7 @@ </td> </tr> <tr> - <td>璐熻浇鐢垫祦(A)</td> + <td>*璐熻浇鐢垫祦(A)</td> <td> <input type="text" id="Load_curr" data-mini="true" /> </td> @@ -260,7 +261,7 @@ </td> </tr> <tr> - <td>鍩虹珯鍙风爜</td> + <td>鍩虹珯鐢佃瘽鍙风爜</td> <td> <input type="text" id="station_phone" data-mini="true" /> </td> @@ -272,7 +273,7 @@ </td> </tr> <tr> - <td>鐢垫睜鍨嬪彿</td> + <td>*鐢垫睜鍨嬪彿</td> <td> <input type="text" id="BattModel" data-mini="true" /> </td> @@ -290,7 +291,7 @@ </td> </tr> <tr> - <td>瀹夎浜哄憳</td> + <td>*瀹夎浜哄憳</td> <td> <input type="text" id="install_user" data-mini="true" /> </td> @@ -350,7 +351,13 @@ $(function () { //setTimes($("#startTestrecord"),'2000-01-01'); //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd')); - creatgroupid(); + console.info() + if(temp[34]!="edit") + { + console.warn("sssss") + creatgroupid();//濡傛灉妫�娴嬩负NEW ,鍒欐墽琛屾坊鍔營D锛屽鏋滀负淇敼锛屽垯鎵ц涓烘嬁鍒癐D + }else{ + } installstartdata(temp); }); @@ -409,13 +416,19 @@ $('#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(); + var data = { StationId: '4011100' ,StationName1: '骞胯タ鐪�' @@ -428,7 +441,7 @@ ,FbsDeviceIp: '127.0.0.1' ,FbsDeviceIp_YM: '255.255.255.0' ,FbsDeviceIp_WG: '127.0.0.1' - ,FBSDeviceName: '璁惧鍚嶇О' + ,FBSDeviceName: 'BTS' ,GroupIndexInFBSDevice: 1 ,BattGroupId: 1000005 ,BattGroupNum: 2 @@ -452,19 +465,20 @@ ,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("county").value = data.StationName5; //鍖哄幙 // document.getElementById("StationName3").value = data.StationName3; //鏈烘埧鍚嶇О - // document.getElementById("StationName4").value = data.StationName4; //璁惧鍚嶇О + 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("FBSDeviceName").value = data.FBSDeviceName; //document.getElementById("GroupIndexInFBSDevice").value = temp[12]; document.getElementById("BattGroupId").value = data.BattGroupId; document.getElementById("BattGroupNum").value = data.BattGroupNum; @@ -475,11 +489,11 @@ // 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("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("DisCurrMax").value = data.DisCurrMax; // document.getElementById("station_phone").value = data.station_phone; // document.getElementById("BattProducer").value = data.BattProducer; document.getElementById("BattModel").value = data.BattModel; @@ -496,7 +510,7 @@ 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]; @@ -586,17 +600,35 @@ <script type="text/javascript"> $(function(){ $(".unable").prop("readonly","readonly").attr("unselectable","on").addClass("uncheck"); - $("#sure").click(function(){ - addBatt(); + $("#sure").click(function(){ + if(nullOrn()){ + if(temp[34]=="edit"){ + creatgroupid();//鎻愪氦涔嬪墠鍐嶆楠岃瘉锛屽垱寤篒D + 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 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({ @@ -618,7 +650,31 @@ } }); } - + + //淇敼鐢垫睜缁勶紝娣诲姞鍒癇ATTINF + 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'); 鎿嶄綔澶辫触 -- Gitblit v1.9.1