From 2fe250ece8de95b3f70172fe5b45793ab6a3084a Mon Sep 17 00:00:00 2001 From: D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore <chenjingjing@LAPTOP-E51P2139> Date: 星期五, 18 一月 2019 17:30:50 +0800 Subject: [PATCH] 未审批可更改 --- gx_tieta/WebRoot/mobil/elegroup-batt-add.html | 285 +++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 209 insertions(+), 76 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/elegroup-batt-add.html b/gx_tieta/WebRoot/mobil/elegroup-batt-add.html index 8d79ada..fa92420 100644 --- a/gx_tieta/WebRoot/mobil/elegroup-batt-add.html +++ b/gx_tieta/WebRoot/mobil/elegroup-batt-add.html @@ -142,49 +142,7 @@ setPageTurning(false, false); } //鍙湁涓�椤�,闅愯棌涓よ竟 } - - - //鏋勯�犳煡璇㈡潯浠跺璞� - function createSearchForm(){ - var temp={ - page:{ - pageCurr:Page.pageCurr, - pageSize:Page.pageSize, - }, - binf:{ - StationName1:$('#privince').val(), - StationName2:$('#city').val(), - StationName5: $('#country').val(), - StationName:$('#homeName').val(), - BattGroupId:$('#battgroup_name').val(), - BattProducer:battProducer, - MonVolStd:"0", - MonCapStd:$('#moncap_std2').val(), - BattGroupName1:"", - BattProductDate:startTime, - BattProductDate1:endTime, - BattInUseDate:startTime, - BattInUseDate1:endTime, - }, - uinf:{ - UId:"0", - }, - tdata:{ - test_type:"0", - record_time:startTime, - record_time1:endTime, - test_starttype:"0", - }, - mainf:{ - /* - remark:"100", - maint_done_time:startTime, - maint_done_time1:endTime, - */ - } - }; - return temp; - } + //椤甸潰鍔犺浇鏃舵煡璇㈢渷 $.post("BattInfAction_serchByStation",null,function(data){ @@ -309,7 +267,6 @@ StationName2:$("#city").val(), StationName5:$("#country").val() }; - //console.info(data); $.ajax({ type: "post", url: "BattInfAction!serchStationName3", @@ -341,7 +298,6 @@ }); } } - //console.info(111111111111111); updataSelStation($Ostation_name1, arr); } @@ -416,36 +372,7 @@ $('#homeName').change(function(){ findserchByBattGroupNamebystationname(); }); - - //鏌ヨ鐢垫睜瀹归噺 - $.post("BattInfAction_serchByMonCapStd",null,function(data){ - data=data.result; - data=eval("("+data+")"); - if(data.code==1 && data.data.length>0){ - var $Omoncap_std2=$("#moncap_std2"); - $Omoncap_std2.text=(""); - console.info(data.data[1].MonCapStd); - var arr = new Array(); - for(var i=0;i <= data.data.length;i++){ - if(i == 0){ - arr.push({ - val:0, - txt:"鍏ㄩ儴(鍏�"+data.sum+")绉�" - }); - }else{ - arr.push({ - val:data.data[i-1].MonCapStd, - txt:data.data[i-1].MonCapStd - }); - } - } - updataSel($('#moncap_std2'),arr); - }; - }); - - - - + $(function() { $('.pre-page').on('click', 'a', function() { var isShowPre = true; @@ -473,7 +400,213 @@ }); }); - + + // 娣诲姞鏁翠釜鐪佺殑鏈烘埧 + $('#tb-right-menu .add-province').click(function() { + //鑾峰彇鍖呮満鎴垮悕绉板拰鏂板鐢垫睜缁勫悕绉� + var myRoom=new Array(); + var myRoomVal=new Array(); + var singleELeGroup=new Array(); + var singleEleVal=new Array(); + var province=$('#station_name1').attr('value'); + if(province.length>0 && $('#lbottom .li-con li.b8cfe5').text().length>0){ + var binf=new Object(); + binf={ + BattGroupId: 0, // 鐢垫睜缁刬d + StationName: '', // 鏈烘埧鍚嶇О + StationName5: '', // 鍖�/鍘� + StationName2: '', // 甯� + StationName1: province, // 鐪� + }; + var json=window.JSON.stringify(binf); + $.post('BattInfAction!serchBatt','result='+json,function(data){ + var model=eval("("+data.result+")"); + //console.info(model); + if(model.code==1 && model.data.length>0){ + //var stationid=0; + for(var i=0;i<model.data.length;i++){ + var batt=model.data[i]; + //console.info(batt); + myRoom.push(batt.StationName); + myRoomVal.push(batt.StationId); + singleELeGroup.push(batt.StationName); + singleELeGroup.push(batt.BattGroupName); + singleEleVal.push(batt.StationId); + singleEleVal.push(batt.BattGroupId); + } + //console.info(singleELeGroup); + addRedLi(myRoom,myRoomVal,singleELeGroup,singleEleVal); + } + }); + }else{ + layer.msg('璇烽�夋嫨鐪�!'); //璇峰厛閫夋嫨鐪� + } + }); + + // 娣诲姞鏁翠釜甯傜殑鏈烘埧 + $('#tb-right-menu .add-city').click(function() { + //鑾峰彇鍖呮満鎴垮悕绉板拰鏂板鐢垫睜缁勫悕绉� + var myRoom=new Array(); + var myRoomVal=new Array(); + var singleELeGroup=new Array(); + var singleEleVal=new Array(); + var city = $('#city').attr('value'); + if(city.length>0 && $('#lbottom .li-con li.b8cfe5').text().length>0){ + var binf=new Object(); + binf={ + BattGroupId: 0, // 鐢垫睜缁刬d + StationName: '', // 鏈烘埧鍚嶇О + StationName5: '', // 鍖�/鍘� + StationName2: city, // 甯� + StationName1: '', // 鐪� + }; + //console.log(binf); + var json=window.JSON.stringify(binf); + $.post('BattInfAction!serchBatt','result='+json,function(data){ + var model=eval("("+data.result+")"); + //console.info(model); + if(model.code==1 && model.data.length>0){ + //var stationid=0; + for(var i=0;i<model.data.length;i++){ + var batt=model.data[i]; + //console.info(batt); + myRoom.push(batt.StationName); + myRoomVal.push(batt.StationId); + singleELeGroup.push(batt.StationName); + singleELeGroup.push(batt.BattGroupName); + singleEleVal.push(batt.StationId); + singleEleVal.push(batt.BattGroupId); + } + //console.info(singleELeGroup); + addRedLi(myRoom,myRoomVal,singleELeGroup,singleEleVal); + } + }); + }else{ + layer.msg('璇烽�夋嫨甯�!'); //璇峰厛閫夋嫨甯� + } + }); + + // 娣诲姞鏁翠釜鍖�/鍘跨殑鏈烘埧 + $('#tb-right-menu .add-county').click(function() { + //鑾峰彇鍖呮満鎴垮悕绉板拰鏂板鐢垫睜缁勫悕绉� + var myRoom=new Array(); + var myRoomVal=new Array(); + var singleELeGroup=new Array(); + var singleEleVal=new Array(); + var county = $('#county').attr('value'); + if(county.length>0 && $('#lbottom .li-con li.b8cfe5').text().length>0){ + var binf=new Object(); + binf={ + BattGroupId: 0, // 鐢垫睜缁刬d + StationName: '', // 鏈烘埧鍚嶇О + StationName5: county, // 鍖�/鍘� + StationName2: '', // 甯� + StationName1: '', // 鐪� + }; + //console.log(binf); + var json=window.JSON.stringify(binf); + $.post('BattInfAction!serchBatt','result='+json,function(data){ + var model=eval("("+data.result+")"); + console.info(model); + if(model.code==1 && model.data.length>0){ + //var stationid=0; + for(var i=0;i<model.data.length;i++){ + var batt=model.data[i]; + //console.info(batt); + myRoom.push(batt.StationName); + myRoomVal.push(batt.StationId); + singleELeGroup.push(batt.StationName); + singleELeGroup.push(batt.BattGroupName); + singleEleVal.push(batt.StationId); + singleEleVal.push(batt.BattGroupId); + } + //console.info(singleELeGroup); + addRedLi(myRoom,myRoomVal,singleELeGroup,singleEleVal); + } + }); + }else{ + layer.msg('璇烽�夋嫨鍖�/鍘�!'); //璇峰厛閫夋嫨鍖�/鍘� + } + }); + + //娣诲姞鍗曚釜鐢垫睜缁� + $('#tb-right-menu .add-batt').click(function(){ + var battgrouid= $('#battgroup_name').attr('value'); + if(battgrouid!=0 && $('#lbottom .li-con li.b8cfe5').text().length>0){ + var binf=new Object(); + binf={ + BattGroupId: battgrouid, // 鐢垫睜缁刬d + StationName: '', // 鏈烘埧鍚嶇О + StationName5: '', // 鍖�/鍘� + StationName2: '', // 甯� + StationName1: '', // 鐪� + }; + var json=window.JSON.stringify(binf); + $.post('BattInfAction!serchBatt','result='+json,function(data){ + var model=eval("("+data.result+")"); + //console.info(model); + var myRoom=new Array(); + var myRoomVal=new Array(); + var singleELeGroup=new Array(); + var singleEleVal=new Array(); + if(model.code==1){ + var data=model.data[0]; + myRoom.push(data.StationName); + myRoomVal.push(data.StationId); + singleELeGroup.push(data.StationName); + singleELeGroup.push(data.BattGroupName); + singleEleVal.push(data.StationId); + singleEleVal.push(data.BattGroupId); + //console.info(myRoom); + addRedLi(myRoom,myRoomVal,singleELeGroup,singleEleVal); + } + }); + }else{ + layer.msg('<s:text name="Please_choose_a_group_of_battery_pack!"/>'); + } + }); + //娣诲姞鏁翠釜鏈烘埧鐨勭數姹犵粍 + $('#tb-right-menu .add-station').click(function(){ + //鑾峰彇鍖呮満鎴垮悕绉板拰鏂板鐢垫睜缁勫悕绉� + var myRoom=new Array(); + var myRoomVal=new Array(); + var singleELeGroup=new Array(); + var singleEleVal=new Array(); + var stationname=$('#station_name').attr('value'); + if(stationname.length>0 && $('#lbottom .li-con li.b8cfe5').text().length>0){ + var binf=new Object(); + binf={ + BattGroupId: 0, // 鐢垫睜缁刬d + StationName: stationname, // 鏈烘埧鍚嶇О + StationName5: '', // 鍖�/鍘� + StationName2: '', // 甯� + StationName1: '', // 鐪� + }; + var json=window.JSON.stringify(binf); + $.post('BattInfAction!serchBatt','result='+json,function(data){ + var model=eval("("+data.result+")"); + //console.info(model); + if(model.code==1 && model.data.length>0){ + var stationid=0; + for(var i=0;i<model.data.length;i++){ + var batt=model.data[i]; + //console.info(batt); + myRoom.push(batt.StationName); + myRoomVal.push(batt.StationId); + singleELeGroup.push(batt.StationName); + singleELeGroup.push(batt.BattGroupName); + singleEleVal.push(batt.StationId); + singleEleVal.push(batt.BattGroupId); + } + //console.info(singleELeGroup); + addRedLi(myRoom,myRoomVal,singleELeGroup,singleEleVal); + } + }); + }else{ + layer.msg('<s:text name="Please_select_a_set_of_Computer_room"/>!'); //璇峰厛閫夋嫨涓�缁勬満鎴� + } + }); + // 鍒ゆ柇鏄惁鏄剧ず缈婚〉鎸夐挳 function setPageTurning(isShowPre, isShowNext) { if(isShowPre) { // 鍒ゆ柇鏄惁鏄剧ず鍚戜笂缈婚〉鎸夐挳 -- Gitblit v1.9.1