| | |
| | | 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){
|
| | |
| | | StationName2:$("#city").val(),
|
| | | StationName5:$("#country").val()
|
| | | };
|
| | | //console.info(data);
|
| | | $.ajax({
|
| | | type: "post",
|
| | | url: "BattInfAction!serchStationName3",
|
| | |
| | | });
|
| | | }
|
| | | }
|
| | | //console.info(111111111111111);
|
| | | updataSelStation($Ostation_name1, arr);
|
| | | }
|
| | |
|
| | |
| | | $('#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;
|
| | |
| | | });
|
| | | });
|
| | |
|
| | | |
| | | |
| | | // 添加整个省的机房
|
| | | $('#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, // 电池组id
|
| | | 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, // 电池组id
|
| | | 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, // 电池组id
|
| | | 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, // 电池组id
|
| | | 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, // 电池组id
|
| | | 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) { // 判断是否显示向上翻页按钮
|