From f7a134dde9670122afc458dc95b5e3ab735d304a Mon Sep 17 00:00:00 2001 From: CJJ <Administrator@USER-20180117QL> Date: 星期三, 26 十二月 2018 07:31:44 +0800 Subject: [PATCH] xiugai --- gx_tieta/WebRoot/mobil/batt-edit2.html | 336 ++++++------------- gx_tieta/WebRoot/mobil/ele-param2.html | 4 gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html | 653 ++++++++++++++++++++++++++++++++++++++ gx_tieta/WebRoot/mobil/batt-unapproved.html | 6 4 files changed, 772 insertions(+), 227 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/batt-edit2.html b/gx_tieta/WebRoot/mobil/batt-edit2.html index 50786cd..a3b10e8 100644 --- a/gx_tieta/WebRoot/mobil/batt-edit2.html +++ b/gx_tieta/WebRoot/mobil/batt-edit2.html @@ -290,7 +290,7 @@ 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>' + '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal"id="battproducer'+index+'">'+'<select>' ,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>'+'<input type="text" '+'id='+'battnum'+index+' data-mini="true"'+'value='+'鐢垫睜鏁伴噺'+count+' />'+'</td>'+'</tr>' @@ -316,26 +316,40 @@ 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>'; - - } - + selected+= '<option '+'value='+'鐞嗗+'+'>'+'鐞嗗+'+'</option>'; + selected+= '<option '+'value='+'鍦i槼'+'>'+'鍦i槼'+'</option>'; + selected+= '<option '+'value='+'鍙岀櫥'+'>'+'鍙岀櫥'+'</option>'; + selected+= '<option '+'value='+'SENRY'+'>'+'SENRY'+'</option>'; + selected+= '<option '+'value='+'鍗楅兘'+'>'+'鍗楅兘'+'</option>'; + selected+= '<option '+'value='+'鐖遍粯鐢�'+'>'+'鐖遍粯鐢�'+'</option>'; + selected+= '<option '+'value='+'绉戝+杈�'+'>'+'绉戝+杈�'+'</option>'; + selected+= '<option '+'value='+'閾舵嘲'+'>'+' 閾舵嘲'+'</option>'; + selected+= '<option '+'value='+'涓版棩'+'>'+' 涓版棩'+'</option>'; + selected+= '<option '+'value='+'涓叴鑳芥淳'+'>'+' 涓叴鑳芥淳'+'</option>'; + selected+= '<option '+'value='+'鍏夊畤'+'>'+' 鍏夊畤'+'</option>'; + selected+= '<option '+'value='+'鑹捐鏂崕杈�'+'>'+'鑹捐鏂崕杈�'+'</option>'; + selected+= '<option '+'value='+'闆勯煬'+'>'+' 闆勯煬'+'</option>'; + selected+= '<option '+'value='+'椋庡竼'+'>'+' 椋庡竼'+'</option>'; + selected+= '<option '+'value='+'鏂囬殕'+'>'+' 鏂囬殕'+'</option>'; + selected+= '<option '+'value='+'椋庡竼'+'>'+' 椋庡竼'+'</option>'; + selected+= '<option '+'value='+'涓北'+'>'+' 涓北'+'</option>'; + selected+= '<option '+'value='+'缇庣殑'+'>'+' 缇庣殑'+'</option>'; + selected+= '<option '+'value='+'鏈楄揪'+'>'+' 鏈楄揪'+'</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]); - console.info(temp[34]); - var suoyin = temp[33]; - + 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;//娣诲姞鐢垫睜缁勬暟鐩鏁� $(function(){ - creatAllView(suoyin).trigger('create'); - creatBa(suoyin).trigger('create'); + creatAllView(temp.length).trigger('create'); + creatBa(temp.length).trigger('create'); }); @@ -345,13 +359,7 @@ $(function () { //setTimes($("#startTestrecord"),'2000-01-01'); //setTimes($("#endTestrecord"),new Date().format('yyyy-MM-dd')); - console.info() - if(temp[34]!="edit") - { - //console.warn("sssss") - creatgroupid();//濡傛灉妫�娴嬩负NEW ,鍒欐墽琛屾坊鍔營D锛屽鏋滀负淇敼锛屽垯鎵ц涓烘嬁鍒癐D - }else{ - } + installstartdata(temp); }); @@ -399,10 +407,11 @@ console.info(ip); return ip; } - // 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊� // - function setFloatAndoutLine() { + + // 璁剧疆娴厖鐢靛帇闃�鍊�/璁剧疆绂荤嚎鐢靛帇闃�鍊� // + function setFloatAndoutLine(monnum) { var vol = $('#MonVolStd').val(); - var monnum = $('#MonCount').val(); + //var monnum = $('#MonCount').val(); var chargeVol = (vol*1.117*monnum).toFixed(1); // 娴厖鐢靛帇闃�鍊� var outlineVol = (vol*1.073*monnum).toFixed(1); // 绂荤嚎鐢靛帇闃�鍊� @@ -410,65 +419,32 @@ $('#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 creatBa(a){ + var battnum=4-a, + opstring=''; + if(a>4&&battnum<=0){return false;} + for(var i=0;i<=battnum;i++){ + + opstring+='<option value='+i+'>鏂板缓'+i+'涓數姹犵粍</option>'; + } + console.warn(opstring+'ttt'); + return $('#newbattnum').html(opstring); + } //瀵煎叆琛ㄦ牸榛樿鏁版嵁 function installstartdata(temp){ - - var data = { - StationId: '4011100' - ,StationName1: '骞胯タ鐪�' - ,StationName2: '鐧借壊甯�' - ,StationName5: '涔愪笟鍘�' - ,homeName: 'GX鐧捐壊涔愪笟鍘跨珛鏂板皬鍖篧F' - ,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[34]!="edit"){ - creatgroupid(); + data=temp[0].binf; document.getElementById("StationId").value = data.StationId; - // document.getElementById("mainteArea").value = data.StationName1; - // document.getElementById("city").value = data.StationName2; //甯� - // document.getElementById("county").value = data.StationName5; //鍖哄幙 - // document.getElementById("homeName").value = data.homeName; //鏈烘埧鍚嶇О + 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 = dev_id; + 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; @@ -477,70 +453,59 @@ 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("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("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]; + 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; - }else{ - document.getElementById("StationId").value = temp[0]; - document.getElementById("mainteArea").value = temp[1]; - document.getElementById("city").value = temp[2]; //甯� - document.getElementById("county").value = temp[3]; //鍖哄幙 - document.getElementById("homeName").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 = 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(); + document.getElementById("install_user").value = data.install_user; + for(var i=0;i<temp.length;i++){ + data=temp[i].binf; + var battString = "#battname"+i; + var battModel = "#batttype"+i; + var battproducer = "#battproducer"+i + //var battproducer ="#battproducer"+i; + $(battString).val(data.BattGroupName); + $(battModel).val(data.BattModel); + $(battproducer).val(data.BattProducer); + console.info($(battproducer).val()); + } } // 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁� function getUpdateArr(){ + mon=$('#MonVolStd').val(); + var moncount = 0; + if(mon==12){ + console.info("aa"); + moncount=4; + }else if(mon==2){ + moncount==24; + } var arr = new Array(); - for(var i=0;i<suoyin;i++){ + + for(var i=0;i<temp.length;i++){ + setFloatAndoutLine(moncount); var battString = "#battname"+i; + var battModel = "#batttype"+i; + var battproducer ="#battproducer"+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 = { @@ -550,7 +515,7 @@ StationName : ($("#mainteArea").val()+"-"+$("#city").val()+"-"+$("#homeName").val()+"-"+$("#StationName4").val()), // 鎷兼帴鏈烘埧鍚嶇О StationName1 : $("#mainteArea").val(), // 鐪� StationName2 : $("#city").val(), // 甯� - StationName5 : $("#county").val(), // 鍖�/鍘� + StationName5 : $("#country").val(), // 鍖�/鍘� homeName : $("#homeName").val(), // 鏈烘埧鍚嶇О StationName4 : $("#StationName4").val(), // 璁惧鍚嶇О StationIp : $("#StationIp").val(), //鏈烘埧ip @@ -566,7 +531,7 @@ FloatVolLevel : $("#FloatVolLevel").val(), //娴厖鐢靛帇闃�鍊� OfflineVolLevel : $("#OfflineVolLevel").val(), //绂荤嚎鐢靛帇闃�鍊� BattFloatCurrent : $("#BattFloatCurrent").val(), //娴厖鐢垫祦闃�鍊� - MonCount : $("#MonCount").val(), //鍗曚綋鏁伴噺 + MonCount : moncount, //鍗曚綋鏁伴噺 MonCapStd : $("#MonCapStd").val(), //鏍囩О瀹归噺 MonVolStd : $("#MonVolStd").val(), //鏍囩О鐢靛帇 MonResStd : $("#MonResStd").val(), //鏍囩О鍐呴樆 @@ -577,10 +542,10 @@ DisCurrMax : $("#DisCurrMax").val(), //鏈�澶ф牳瀹圭數娴� station_phone : $("#station_phone").val(), //鍩虹珯鍙风爜 - BattProducer : $("#BattProducer").val(), //鐢垫睜鍝佺墝 - BattModel : $("#BattModel").val(), //鐢垫睜鍨嬪彿 - BattProductDate : $("#startTestrecord").val()+" 00:00:00", //鐢垫睜鐢熶骇鏃ユ湡 - BattInUseDate : $("#endTestrecord").val()+" 00:00:00", //鐢垫睜浣跨敤鏃ユ湡 + BattProducer : $(battproducer).val(), //鐢垫睜鍝佺墝 + BattModel : $(battModel).val(), //鐢垫睜鍨嬪彿 + BattProductDate : $("#startTestrecord").val(), //鐢垫睜鐢熶骇鏃ユ湡 + BattInUseDate : $("#endTestrecord").val(), //鐢垫睜浣跨敤鏃ユ湡 install_user : $("#install_user").val(), //瀹夎浜哄憳 } } @@ -590,70 +555,17 @@ return arr; } - function getUpdateArredit(){ - var arr = new Array(); - for(var i=0;i<suoyin;i++){ - var battString = "#battname"+i; - var index = String(i); - console.info(battString); - var obj = { - StationId : $("#StationId").val(), // 鏈烘埧缂栧彿 - StationName : ($("#mainteArea").val()+"-"+$("#city").val()+"-"+$("#homeName").val()+"-"+$("#StationName4").val()), // 鎷兼帴鏈烘埧鍚嶇О - StationName1 : $("#mainteArea").val(), // 鐪� - StationName2 : $("#city").val(), // 甯� - StationName5 : $("#county").val(), // 鍖�/鍘� - homeName : $("#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 : $("#BattGroupId").val(), //鐢垫睜缁刬d - BattGroupNum : $("#BattGroupNum").val(), //鏈烘埧鍐呯數姹犵粍缂栧彿 - BattGroupName : $(battString).val(), - FloatVolLevel : $("#FloatVolLevel").val(), //娴厖鐢靛帇闃�鍊� - OfflineVolLevel : $("#OfflineVolLevel").val(), //绂荤嚎鐢靛帇闃�鍊� - BattFloatCurrent : $("#BattFloatCurrent").val(), //娴厖鐢垫祦闃�鍊� - MonCount : $("#MonCount").val(), //鍗曚綋鏁伴噺 - MonCapStd : $("#MonCapStd").val(), //鏍囩О瀹归噺 - MonVolStd : $("#MonVolStd").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").val(), //鐢垫睜鍝佺墝 - BattModel : $("#BattModel").val(), //鐢垫睜鍨嬪彿 - BattProductDate : $("#startTestrecord").val()+" 00:00:00", //鐢垫睜鐢熶骇鏃ユ湡 - BattInUseDate : $("#endTestrecord").val()+" 00:00:00", //鐢垫睜浣跨敤鏃ユ湡 - 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(){ - alert(333); + }) $("#sure").click(function(){ if(nullOrn()){ - if(temp[34]!="edit"){ - creatgroupid();//鎻愪氦涔嬪墠鍐嶆楠岃瘉锛屽垱寤篒D - addBattnew(); //鎻愪氦 - }else{ - addBattnew(); - } + editBatt(); }else{ } //楠岃瘉閲嶈椤规槸鍚︿负绌猴紝涓虹┖鍒欐彁绀猴紱 //function backpage(){window.location.href="ele-param1.html";} @@ -665,64 +577,42 @@ }); function nullOrn(){ - if($("#BattFloatCurrent").val()&&$("#MonCount").val()&&$("#MonCapStd").val()){ + return true; - }else{ - alert("*椤逛负蹇呭~椤癸紝涓嶈兘涓虹┖锛岃閲嶆柊杈撳叆"); - return false; - } + } - function addBattnew(){//鏂板缓鐢垫睜缁勶紝娣诲姞鍒扮敵璇� + function editBatt(){// + console.info(getUpdateArr()); var temp = JSON.stringify(getUpdateArr()); console.info(temp); $.ajax({ - type: 'post', - async: true, - url: 'Battinf_applyAction!add', - data: "json="+temp, - dataType: 'json', - success:function(data) { - data = JSON.parse(data.result); - console.info(data); - if(data.code==1){ - alert("娣诲姞鎴愬姛"); - window.location.href="batt-unapproved.html"; - }else{ - alert("娣诲姞澶辫触"); - window.location.href="batt-unapproved.html"; - } - } - }); - } - - //淇敼鐢垫睜缁勶紝娣诲姞鍒癇ATTINF - function editBatt(){ - var parm = getUpdateArredit(); - console.info(parm); - $.ajax({ type: "post", - url: "BattInfAction!update", + url: "Battinf_applyAction!addPro", async:true, dataType:'text', - data:"json="+JSON.stringify(parm), + data:"json="+JSON.stringify(temp), success: function(data){ data = eval('('+data+')'); 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" } }); - } - + } + + $('input:radio[name="battnum"]').click(function(){ var $this=$(this) diff --git a/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html new file mode 100644 index 0000000..616f3b3 --- /dev/null +++ b/gx_tieta/WebRoot/mobil/batt-infor-unapproved-edit2.html @@ -0,0 +1,653 @@ +<!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; + } + #newbattnum-button{ + padding: 1em 1.9em; + } + </style> + <link rel="stylesheet" href="css/fgpanel.css"> +</head> +<body> + <div data-role="page"> + + <!-- 澶撮儴鍐呭 --> + <div data-role="header" data-position="fixed"> + <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> + <fieldset data-role="controlgroup" class="ptr0" > + + + <select id="newbattnum" data-mini="true"> + <option value=0>鏂板缓鐢垫睜缁�</option> + + </select> + + + </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>鐢垫睜缁処D</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" /> + + + <tr> + <td>*鍗曚綋鏁伴噺</td> + <td> + <!-- <input type="text" id="MonCount" data-mini="true" /> --> + + <fieldset data-role="controlgroup" data-type="horizontal"> + <label for="four">4 涓�</label> + <input type="radio" name="battnum" id="four" value="4"> + <label for="twentyfour">24涓�</label> + <input type="radio" name="battnum" id="twentyfour" value="24"> + </fieldset> + + + + </td> + </tr> + <tr> + <td>鏍囩О鍗曚綋鐢靛帇(V)</td> + <td> + <input type="text" id="MonVolStd" class="unable" data-mini="true" /> + </td> + </tr> + <tr> + <td>*鏍囩О瀹归噺(AH)</td> + <td> + <fieldset data-role="controlgroup" > + <select id="MonCapStd" data-mini="true"> + + </select> + </fieldset> + </td> + </tr> + + <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> + </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 creatAllView(num){ + var allString='' + ,i=0; + if(num>4){return false} + for(i=0;i<num;i++){ + allString+=creatBattView(i); + } + return $("#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"id="battproducer'+index+'">'+'<select>' + ,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>'+'<input type="text" '+'id='+'battnum'+index+' data-mini="true"'+'value='+'鐢垫睜鏁伴噺'+count+' />'+'</td>'+'</tr>' + ,nomCap='<tr>'+'<td>'+'鏍囩О瀹归噺'+'</td>'+'<td>'+'<input type="text" '+'id='+'nomCap'+index+' data-mini="true"'+'value='+'鏍囩О瀹归噺'+count+' />'+'</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+nomCap+battIndex+battName; + + } + function creatBa(a){ + var battnum=4-a, + opstring=''; + if(a>4&&battnum<=0){return false;} + for(var i=0;i<=battnum;i++){ + + opstring+='<option value='+i+'>鏂板缓'+i+'涓數姹犵粍</option>'; + } + console.warn(opstring+'ttt'); + return $('#newbattnum').html(opstring); + } + + + function selectedIndex(index){ + var selected='', + i=0; + selected+= '<option '+'value='+'鐞嗗+'+'>'+'鐞嗗+'+'</option>'; + selected+= '<option '+'value='+'鍦i槼'+'>'+'鍦i槼'+'</option>'; + selected+= '<option '+'value='+'鍙岀櫥'+'>'+'鍙岀櫥'+'</option>'; + selected+= '<option '+'value='+'SENRY'+'>'+'SENRY'+'</option>'; + selected+= '<option '+'value='+'鍗楅兘'+'>'+'鍗楅兘'+'</option>'; + selected+= '<option '+'value='+'鐖遍粯鐢�'+'>'+'鐖遍粯鐢�'+'</option>'; + selected+= '<option '+'value='+'绉戝+杈�'+'>'+'绉戝+杈�'+'</option>'; + selected+= '<option '+'value='+'閾舵嘲'+'>'+' 閾舵嘲'+'</option>'; + selected+= '<option '+'value='+'涓版棩'+'>'+' 涓版棩'+'</option>'; + selected+= '<option '+'value='+'涓叴鑳芥淳'+'>'+' 涓叴鑳芥淳'+'</option>'; + selected+= '<option '+'value='+'鍏夊畤'+'>'+' 鍏夊畤'+'</option>'; + selected+= '<option '+'value='+'鑹捐鏂崕杈�'+'>'+'鑹捐鏂崕杈�'+'</option>'; + selected+= '<option '+'value='+'闆勯煬'+'>'+' 闆勯煬'+'</option>'; + selected+= '<option '+'value='+'椋庡竼'+'>'+' 椋庡竼'+'</option>'; + selected+= '<option '+'value='+'鏂囬殕'+'>'+' 鏂囬殕'+'</option>'; + selected+= '<option '+'value='+'椋庡竼'+'>'+' 椋庡竼'+'</option>'; + selected+= '<option '+'value='+'涓北'+'>'+' 涓北'+'</option>'; + selected+= '<option '+'value='+'缇庣殑'+'>'+' 缇庣殑'+'</option>'; + selected+= '<option '+'value='+'鏈楄揪'+'>'+' 鏈楄揪'+'</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;//娣诲姞鐢垫睜缁勬暟鐩鏁� + $(function(){ + creatAllView(temp.length).trigger('create'); + creatBa(temp.length).trigger('create'); + }); + + + + + + $(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 setFloatAndoutLine(monnum) { + 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); // 绂荤嚎鐢靛帇闃�鍊� + } + + + function prefixInteger(num, length) { + return (num/Math.pow(3,length)).toFixed(length).substr(2); + } + function creatBa(a){ + var battnum=4-a, + opstring=''; + if(a>4&&battnum<=0){return false;} + for(var i=0;i<=battnum;i++){ + + opstring+='<option value='+i+'>鏂板缓'+i+'涓數姹犵粍</option>'; + } + console.warn(opstring+'ttt'); + return $('#newbattnum').html(opstring); + } + //瀵煎叆琛ㄦ牸榛樿鏁版嵁 + function installstartdata(temp){ + data=temp[0].binf; + 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("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 = data.BattProductDate; + document.getElementById("endTestrecord").value = data.BattInUseDate; + //setTimes($("#startTestrecord"),data.productDate); + //setTimes($("#endTestrecord"),data.useDate); + document.getElementById("install_user").value = data.install_user; + for(var i=0;i<temp.length;i++){ + data=temp[i].binf; + var battString = "#battname"+i; + var battModel = "#batttype"+i; + var battproducer = "#battproducer"+i + //var battproducer ="#battproducer"+i; + $(battString).val(data.BattGroupName); + $(battModel).val(data.BattModel); + $(battproducer).val(data.BattProducer); + console.info($(battproducer).val()); + } + } + + // 鏍煎紡鍖栨彁浜ゅ悗鍙颁俊鎭殑瀵硅薄鏁扮粍骞惰繑鍥� 鍗曚釜淇敼锛屾墜鏈烘柟寮忎笉淇敼澶氫釜鐢垫睜缁� + function getUpdateArr(){ + mon=$('#MonVolStd').val(); + var moncount = 0; + if(mon==12){ + moncount=4; + }else if(mon==2){ + moncount==24; + } + var arr = new Array(); + + for(var i=0;i<temp.length;i++){ + setFloatAndoutLine(moncount); + var battString = "#battname"+i; + var battModel = "#batttype"+i; + var battproducer ="#battproducer"+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(), // 鍖�/鍘� + homeName : $("#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 : $("#BattGroupId").val(), //鐢垫睜缁刬d + BattGroupNum : $("#BattGroupNum").val(), //鏈烘埧鍐呯數姹犵粍缂栧彿 + BattGroupName : $(battString).val(), + FloatVolLevel : $("#FloatVolLevel").val(), //娴厖鐢靛帇闃�鍊� + OfflineVolLevel : $("#OfflineVolLevel").val(), //绂荤嚎鐢靛帇闃�鍊� + BattFloatCurrent : $("#BattFloatCurrent").val(), //娴厖鐢垫祦闃�鍊� + MonCount : moncount, //鍗曚綋鏁伴噺 + MonCapStd : $("#MonCapStd").val(), //鏍囩О瀹归噺 + MonVolStd : $("#MonVolStd").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).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:'text', + data:"json="+JSON.stringify(temp), + success: function(data){ + data = eval('('+data+')'); + 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" + } + }); + } + + + + $('input:radio[name="battnum"]').click(function(){ + var $this=$(this) + , $mon=$('#MonVolStd') ; + if ($this.attr("checked")) { +銆�銆�銆�銆�銆�銆� if($this.val()==4){ + $mon.val("12"); + + }; + if($this.val()==24){$mon.val("2");} +銆�銆�銆�銆�} + }); + + 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(); + + $('#newbattnum').change(function(){ + var numbattnum = parseInt($('#newbattnum').val()); + var index =parseInt(tempindex.length); + addbattnum=Math.floor((numbattnum)+(tempindex.length)); + console.warn(addbattnum); + creatAllView(addbattnum).trigger('create'); + creatBattGroupId(addbattnum); + }); + /* 鎿嶄綔鎴愬姛 + $('#changeSuc').popup('open'); + 鎿嶄綔澶辫触 + $('#changeErr').popup('open'); */ + </script> +</html> diff --git a/gx_tieta/WebRoot/mobil/batt-unapproved.html b/gx_tieta/WebRoot/mobil/batt-unapproved.html index 7be611a..c58b9aa 100644 --- a/gx_tieta/WebRoot/mobil/batt-unapproved.html +++ b/gx_tieta/WebRoot/mobil/batt-unapproved.html @@ -160,7 +160,7 @@ console.warn($(t).attr("but-index")+' 淇敼'); var index = $(t).attr("but-index"); var parm = seteditparm(index); - window.location.href="batt-infor-unapproved-edit.html"; + window.location.href="batt-infor-unapproved-edit2.html"; return ; } @@ -279,6 +279,7 @@ for(var i=0;i<arrdata.length;i++){//涓�娆¢獙鏀惰鏈烘埧涓嬬殑鎵�鏈夌數姹犵粍鏋勫缓瀵硅薄 銆� if(StationId == arrdata[i].binf.StationId){ var obj = { + num :arrdata[i].num, binf:{ StationId : arrdata[i].binf.StationId, // 鏈烘埧缂栧彿 StationName : (arrdata[i].binf.StationName1+"-"+ arrdata[i].binf.StationName2+"-"+arrdata[i].binf.StationName5+"-"+arrdata[i].binf.StationName3), // 鎷兼帴鏈烘埧鍚嶇О @@ -286,7 +287,7 @@ StationName2 : arrdata[i].binf.StationName2, // 甯� StationName5 : arrdata[i].binf.StationName5, // 鍖�/鍘� StationName3 : arrdata[i].binf.StationName3, // 鏈烘埧鍚嶇О - StationName4 : arrdata[i].binf.StationName5, // 璁惧鍚嶇О + StationName4 : arrdata[i].binf.StationName4, // 璁惧鍚嶇О StationIp :arrdata[i].binf.StationIp, //鏈烘埧ip FBSDeviceId : arrdata[i].binf.FBSDeviceId, //璁惧id FbsDeviceIp : arrdata[i].binf.FbsDeviceIp, //璁惧ip @@ -317,6 +318,7 @@ BattInUseDate : arrdata[i].binf.BattInUseDate+" 00:00:00", //鐢垫睜浣跨敤鏃ユ湡 install_user : arrdata[i].binf.install_user, //瀹夎浜哄憳 } + } arr.push(obj); } diff --git a/gx_tieta/WebRoot/mobil/ele-param2.html b/gx_tieta/WebRoot/mobil/ele-param2.html index 20179bf..5564a6b 100644 --- a/gx_tieta/WebRoot/mobil/ele-param2.html +++ b/gx_tieta/WebRoot/mobil/ele-param2.html @@ -238,7 +238,7 @@ var index = $(t).attr("but-index"); var parm = seteditparm(index); // console.info(getCookie("eleparm")); - window.location.href="batt-edit.html"; + window.location.href="batt-edit2.html"; return ; } @@ -394,7 +394,7 @@ StationName2 : arrdata[i].StationName2, // 甯� StationName5 : arrdata[i].StationName5, // 鍖�/鍘� StationName3 : arrdata[i].StationName3, // 鏈烘埧鍚嶇О - StationName4 : arrdata[i].StationName5, // 璁惧鍚嶇О + StationName4 : arrdata[i].StationName4, // 璁惧鍚嶇О StationIp :arrdata[i].StationIp, //鏈烘埧ip FBSDeviceId : arrdata[i].FBSDeviceId, //璁惧id FbsDeviceIp : arrdata[i].FbsDeviceIp, //璁惧ip -- Gitblit v1.9.1