From 94e5b0bddf2b83e1591de425d3e30030fcbb1d23 Mon Sep 17 00:00:00 2001 From: CJJ <Administrator@USER-20180117QL> Date: 星期二, 25 十二月 2018 11:50:53 +0800 Subject: [PATCH] 新建修改到APPLY --- gx_tieta/WebRoot/mobil/batt-approved.html | 139 +++++++++++++++------------------------------- 1 files changed, 46 insertions(+), 93 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/batt-approved.html b/gx_tieta/WebRoot/mobil/batt-approved.html index 05f3e7e..2616b63 100644 --- a/gx_tieta/WebRoot/mobil/batt-approved.html +++ b/gx_tieta/WebRoot/mobil/batt-approved.html @@ -87,11 +87,14 @@ margin: 0; padding-top: 0.1em; padding-bottom: 0.1em; - margin-left:7em; + } .ui-table-reflow td .ui-table-cell-label, .ui-table-reflow th .ui-table-cell-label{ width:35%; } + .fr{ + float:right; + } </style> <link rel="stylesheet" href="css/fgpanel.css"> </head> @@ -138,7 +141,7 @@ <script type="text/javascript"> /* 鑾峰彇鐐瑰嚮鐨勬槸鍝釜鎸夐挳 */ - function getButIndex(t){ + function getButIndex(t){ //鏌ョ湅瀹炴椂鏁版嵁 var index = $(t).attr("but-index"); // index=(index/33-1); console.info(index); @@ -149,11 +152,18 @@ function getApplyYanshouIndex(t){ var index = $(t).attr("but-index"); console.info(index); - setApplyYanshou(index); - + var arr=setApplyYanshou(index); + //鏂规硶涓�锛�1鎸夐挳鎼炲畾鎵�鏈夈�傝鍦ㄦ瀵规帴鍔犲叆寮瑰嚭妗嗭紝涓婁紶瑙嗛缁忕含搴︾瓑 + + applyendyanshou(arr); return ; } - + function getApplyYanshoupicture(t){ + var index = $(t).attr("but-index"); + console.info(index);//鏂规硶2 + var arr=setApplyYanshou(index); + //璇峰湪姝ゅ鎺ュ姞鍏ュ脊鍑烘 + } var arrTd = new Array(); //褰撳墠琛ㄦ牸td鏁版嵁 var tblCon = $('.tbl-container'); var Page = { @@ -223,8 +233,10 @@ function yanshou(check_en){ if(check_en==0){ return "鏈獙鏀�"; - }else{ - return "宸查獙鏀�"; + }else if(check_en==2){ + return "宸茬敵璇烽獙鏀�"; + }else if(check==1){ + return"宸插畬鎴愰獙鏀�";s } } // 鏌ヨ鍐呭 @@ -247,6 +259,7 @@ if(data.code!=0&&data.data.length>0){ data=data.data console.info(data); + Page.pageAll=data[data.length-1].num; for(var i=0;i<data.length;i++){ arrdata.push(data[i]);//瀛樺偍鏁版嵁 arrTd[index++] = data[i].binf.StationId; @@ -286,10 +299,15 @@ arrTd[index++] = yanshou(data[i].check_en); arrTd[index++]='<a onclick="getButIndex(this)" class="ui-btn ui-btn-inline ui-corner-all operat-but" data-position-to="window"'+'but-index='+i+'>鐢垫睜缁勫疄鏃舵暟鎹�</a>'+ '<a onclick="getApplyYanshouIndex(this)" href="#myPopup" id="apply_yanshou" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but fr" data-position-to="window"'+'but-index='+i+'>鐢宠楠屾敹</a>'; + //鏂规硶2 2鎸夐挳瑙e紑浠ヤ笅涓�鏉℃敞閲婃寜閽� + //'<a onclick="getApplyYanshoupicture(this)" href="#myPopup" id="apply_yanshou" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all operat-but fr" data-position-to="window"'+'but-index='+i+'>缁忕含搴﹀浘鐗囦笂浼�</a>' } } console.info(arrTd); console.info(arrdata); + //Page.pageCurr=Math.ceil(Page.pageAll/Page.pageSize); + //console.info(Page.pageCurr); + setPage(); createTbl(tblCon, arrTh, arrTd); /*timeer = window.setTimeout(function() { searchBattLife(); @@ -299,10 +317,10 @@ } function setApplyYanshou(index){ - //var value = Math.floor(34*index); console.info(arrdata); - if(arrdata.length>0){ //瀛樺叆鐨勪负鎵�鏈夊凡鏌ュ嚭鏁版嵁 - creatYanshouObj(arrdata,index); + if(arrdata.length>0){ //瀛樺叆鐨勪负鎵�鏈夊凡鏌ュ嚭鏁版嵁 + var arr= creatYanshouObj(arrdata,index);//鐢宠楠屾敹鏂规硶銆� + return arr; }else{ alert("璇风瓑寰呭嚑绉掑悗鍐嶆彁浜ょ敵璇�"); } @@ -310,11 +328,10 @@ function creatYanshouObj(arrdata,index){ var StationId = arrdata[index].binf.StationId; - console.info(StationId); + //console.info(StationId); var arr = new Array(); //鍒濆鍖栦紶鍙傛暟缁� - for(var i=0;i<arrdata.length;i++){ - if(StationId == arrdata[i].binf.StationId){ - + for(var i=0;i<arrdata.length;i++){//涓�娆¢獙鏀惰鏈烘埧涓嬬殑鎵�鏈夌數姹犵粍鏋勫缓瀵硅薄 銆� + if(StationId == arrdata[i].binf.StationId){ var obj = { binf:{ StationId : arrdata[i].binf.StationId, // 鏈烘埧缂栧彿 @@ -356,12 +373,18 @@ } } arr.push(obj); - //console.info(obj) } } - console.info(obj); - var temp = JSON.stringify(arr); - $.ajax({ + console.info(arr); + + + return arr; + //applyendyanshou(arr);//鐢宠楠屾敹鏂规硶銆� + } + + function applyendyanshou(arr){ + var temp = JSON.stringify(arr); + $.ajax({ //鐢宠楠屾敹 type: 'post', async: true, url: 'Battinf_applyAction!checkPro', @@ -375,11 +398,12 @@ } } }); + } function setcookiedit(index){ var arrcookie = new Array(); - for(var i=0;i<33;i++){//鍏�34椤癸紝鏈�鍚庝竴椤逛负鎸夐挳锛屼笉蹇匰ET杩涙暟鎹� - var value = Math.floor(34*index); + for(var i=0;i<33;i++){//鍏盿rrTh.length椤癸紝鏈�鍚庡嚑椤逛负鎸夐挳锛屼笉蹇匰ET杩涙暟鎹� + var value = Math.floor(arrTh.length*index); value = Math.floor(value+i); arrcookie.push(arrTd[value]); } @@ -429,78 +453,8 @@ setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗� setCookie("batt",json1); } - - function setcookieCreat(index){ - var arrcookie = new Array(); - for(var i=0;i<33;i++){//鍏�34椤癸紝鏈�鍚庝竴椤逛负鎸夐挳锛屼笉蹇匰ET杩涙暟鎹� - var value = Math.floor(34*index); - //console.info(value); - value = Math.floor(value+i); - if(i==13){//鏂板缓鍔熻兘锛岀數姹犵粍ID榛樿涓哄綋椤垫渶鍚庝竴涓數姹犵粍ID鍙峰姞1 - var groupid = Math.floor(arrTd[value]+1); - console.info(groupid); - arrcookie.push(groupid); - }else{ - //console.info(value); - arrcookie.push(arrTd[value]); - } - } - arrcookie.push("new"); - //console.info(arrcookie); - var json=window.JSON.stringify(arrcookie); - setCookie("eleparm",json); //杩欓噷setcookie,鑻ユ湁涓婁竴鏉ookie鍒欐竻绌轰笂涓�绗� - } - // 鏌ヨ鍐呭 - - function getUpdateArr(temp){ - var arr = new Array(); - var obj = new Object(); - obj.StationId = temp[0]; // 鏈烘埧缂栧彿 - obj.StationName = (temp[1]+"-"+temp[2]+"-"+temp[4]+"-"+temp[5]); // 鎷兼帴鏈烘埧鍚嶇О - obj.StationName1 = temp[1]; // 鐪� - obj.StationName2 = temp[2]; // 甯� - obj.StationName5 = temp[3]; // 鍖�/鍘� - obj.StationName3 = temp[4]; // 鏈烘埧鍚嶇О - obj.StationName4 = temp[5]; // 璁惧鍚嶇О - obj.StationIp = temp[6]; //鏈烘埧ip - obj.FBSDeviceId = temp[7]; //璁惧id - obj.FbsDeviceIp = temp[8]; //璁惧ip - obj.FbsDeviceIp_YM = temp[9]; // 璁惧鎺╃爜 - obj.FbsDeviceIp_WG = temp[10]; // 缃戝叧 - obj.FBSDeviceName = temp[11]; //璁惧鍚嶇О - obj.GroupIndexInFBSDevice = temp[12]; //fbs璁惧绱㈠紩 - obj.BattGroupId = temp[13]; //鐢垫睜缁刬d - obj.BattGroupNum = temp[14]; //鏈烘埧鍐呯數姹犵粍缂栧彿 - obj.BattGroupName = temp[15]; //鐢垫睜缁勫悕绉� - obj.FloatVolLevel = temp[16]; //娴厖鐢靛帇闃�鍊� - obj.OfflineVolLevel = temp[17]; //绂荤嚎鐢靛帇闃�鍊� - obj.BattFloatCurrent = temp[18]; //娴厖鐢垫祦闃�鍊� - obj.MonCount = temp[19]; //鍗曚綋鏁伴噺 - obj.MonCapStd = temp[20]; //鏍囩О瀹归噺 - obj.MonVolStd = temp[21]; //鏍囩О鐢靛帇 - obj.MonResStd = temp[22]; //鏍囩О鍐呴樆 - obj.MonSerStd = temp[23]; //鏍囩О鐢靛 - obj.MonVolLowToAvg = temp[24]; //鍗曚綋鐢靛帇娆′綆鍋忕Щ閲� - - - obj.Load_curr = temp[25]; //璐熻浇鐢垫祦 - obj.DisCurrMax = temp[26]; //鏈�澶ф牳瀹圭數娴� - obj.station_phone = temp[27]; //鍩虹珯鍙风爜 - - obj.BattProducer = temp[28]; //鐢垫睜鍝佺墝 - obj.BattModel = temp[29]; //鐢垫睜鍨嬪彿 - obj.BattProductDate = temp[30]; //鐢垫睜鐢熶骇鏃ユ湡 - obj.BattInUseDate = temp[31]; //鐢垫睜浣跨敤鏃ユ湡 - obj.install_user = temp[32]; //瀹夎浜哄憳 - arr.push(obj); - console.info(arr); - return arr; - } - - - - function createSearchForm(){ + function createSearchForm(){//鏌ヨ宸插鏍镐紶鍙傘�� var temp={ page:Page, StationName1:$('#mainteArea').val(), @@ -525,8 +479,7 @@ }, }; console.info(temp); - return temp; - + return temp; } $(function() { -- Gitblit v1.9.1