From 00ee1e49cac2ec8a8a1f476b48dd7e60166bccbe Mon Sep 17 00:00:00 2001 From: chenjingjing <chenjingjing@LAPTOP-E51P2139> Date: 星期五, 28 十二月 2018 11:24:41 +0800 Subject: [PATCH] 未审批详情添加删除,修改界面 --- gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html | 80 ++++++++++++++++++--------------------- 1 files changed, 37 insertions(+), 43 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html index 14ef5dd..b528e22 100644 --- a/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html +++ b/gx_tieta/WebRoot/mobil/batt-infor-conf-temp1.html @@ -58,30 +58,15 @@ <!-- <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" /> - </td> - </tr> - <tr> - <td>FBS璁惧IP(閲嶈)</td> - <td> - <input type="text" id="FbsDeviceIp" class="unable" data-mini="true" /> - </td> - </tr> - <tr> - <td>鐢垫睜缁処D</td> - <td> - <input type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" /> - </td> - </tr> + + <input type="hidden" type="text" id="StationId" class="unable" data-mini="true" onfocus="this.blur()"/> + + <input type="hidden" type="text" id="FBSDeviceId" class="unable" data-mini="true" /> + + <input type="hidden" type="text" id="FbsDeviceIp" class="unable" data-mini="true" /> + + <input type="hidden" type="text" readonly unselectable="on" value="123"class="unable" id="BattGroupId" class="uncheck" data-mini="true" /> + <tr> <td>*鐪�</td> <td> @@ -104,7 +89,7 @@ <tr> <td>*鍖哄幙</td> <td> - <select id="county" data-mini="true"> + <select id="county" data-mini="true"> <option value="">鍏ㄩ儴</option> </select> </td> @@ -247,7 +232,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 id="battproducer"'+index+'>' + '<table class="layout-set">'+'<tbody>'+'<tr>'+'<td>'+'鐢垫睜鍝佺墝'+'</td>'+'<td>'+'<fieldset data-role="controlgroup" data-type="horizontal">'+'<select '+'id='+'battproducer'+index+'>' ,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>' @@ -478,8 +463,10 @@ console.info(dev_id); if(ptn.test(dev_id)) { var value = Number(RegExp.$1); - // console.log(value); + console.info(value); + console.info(Math.floor(value/256)); var intNum = prefixInteger(Math.floor(value/256), 3); + console.info(intNum); var resNum = prefixInteger(value%256, 3); ip = '127.000.'+intNum+'.'+resNum; }else { @@ -510,10 +497,12 @@ $('#MonCount').change(function(){ setFloatAndoutLine(); })*/ - function prefixInteger(num, length) { + /* function prefixInteger(num, length) { return (num/Math.pow(3,length)).toFixed(length).substr(2); + }*/ + function prefixInteger(num, length) { + return (Array(length).join('0') + num).slice(-length); } - //瀵煎叆琛ㄦ牸榛樿鏁版嵁 function installstartdata(temp){ var data = { @@ -552,6 +541,7 @@ ,install_user: 'test' }; console.info(data.StationId); + setMonVolStd(temp.length); creatgroupid(); document.getElementById("StationId").value = data.StationId; // document.getElementById("mainteArea").value = data.StationName1; @@ -607,7 +597,7 @@ setFloatAndoutLine(i); var battString = "#battname"+i; var battModel = "#batttype"+i; - var battproducer ="#battproducer"+i; + //var battproducer ="#battproducer"+i; var id = $('fieldset div div input[data-cacheval=\'true\']').val(); var inputVal = $(id).val(); //var input =$(four).option() @@ -637,9 +627,9 @@ FloatVolLevel : fuchongfazhi[i], //娴厖鐢靛帇闃�鍊� OfflineVolLevel : lixiandianyafazhi[i], //绂荤嚎鐢靛帇闃�鍊� BattFloatCurrent : $("#BattFloatCurrent").val(), //娴厖鐢垫祦闃�鍊� - MonCount : moncount, //鍗曚綋鏁伴噺 - MonCapStd : $("#MonCapStd").val(), //鏍囩О瀹归噺 - MonVolStd : $("#MonVolStd").val(), //鏍囩О鐢靛帇 + MonCount :$("#MonCount"+i).val(), //鍗曚綋鏁伴噺 + MonCapStd : $("#MonCapStd"+i).val(), //鏍囩О瀹归噺 + MonVolStd : $("#MonVolStd"+i).val(), //鏍囩О鐢靛帇 MonResStd : $("#MonResStd").val(), //鏍囩О鍐呴樆 MonSerStd : $("#MonSerStd").val(), //鏍囩О鐢靛 MonVolLowToAvg : $("#MonVolLowToAvg").val(), //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲� @@ -648,10 +638,10 @@ DisCurrMax : $("#DisCurrMax").val(), //鏈�澶ф牳瀹圭數娴� station_phone : $("#station_phone").val(), //鍩虹珯鍙风爜 - BattProducer : $(battproducer).find("option:selected").val(), //鐢垫睜鍝佺墝 + BattProducer : $("#battproducer"+i).find("option:selected").val(), //鐢垫睜鍝佺墝 BattModel : $(battModel).val(), //鐢垫睜鍨嬪彿 - BattProductDate : $("#startTestrecord").val()+" 00:00:00", //鐢垫睜鐢熶骇鏃ユ湡 - BattInUseDate : $("#endTestrecord").val()+" 00:00:00", //鐢垫睜浣跨敤鏃ユ湡 + BattProductDate : $("#startTestrecord").val(), //鐢垫睜鐢熶骇鏃ユ湡 + BattInUseDate : $("#endTestrecord").val(), //鐢垫睜浣跨敤鏃ユ湡 install_user : $("#install_user").val(), //瀹夎浜哄憳 } } @@ -708,17 +698,14 @@ console.info(data); if(data.code==1){ alert("娣诲姞鎴愬姛"); - //window.location.href="batt-unapproved.html"; + window.location.href="batt-unapproved-index.html" }else{ alert("娣诲姞澶辫触"); - //window.location.href="batt-unapproved.html"; + window.location.href="batt-unapproved-index.html"; } } }); } - - - @@ -751,7 +738,7 @@ return $(str).attr('checked','true'); } - function setMonVolStd(suoyin){ + function setchangedMonVolStd(suoyin){ for(var u=0;u<suoyin;u++){ var id=''; id='#MonCount'+u; @@ -765,7 +752,14 @@ } } - setMonVolStd(suoyin); + setchangedMonVolStd(suoyin); + function setMonVolStd(index){ + for(var i=0;i<index;i++){ + var s='#MonVolStd'+i; + $(s).val(12); + } + + } /* 鎿嶄綔鎴愬姛 $('#changeSuc').popup('open'); -- Gitblit v1.9.1