var commonGridObj_muliple; var commonGridObj_total; var sortName = ""; var sortIndex = ""; var newHeaderArgs; var newWidthArgs; var newColAlignArgs; var newColSortArgs; var newColTypeArgs; var s0=""; var comboOperator; var comboVessel; var comboVoyno; var comboCustomer; function $(id){ return document.getElementById(id); } function createGrid(type) { //获取自定义列表样式 //if(document.getElementById("origmultiplebusinessgrid") == null){ var url = "../UserSettings/UserGridSource/OrigMultipleBusinessGrid.js?uid="+newGuid(); var loader = dhtmlxAjax.getSync(url); var jsVal = loader.xmlDoc.responseText; var oHead = document.getElementsByTagName('head').item(0); var oScript = document.createElement( "script" ); oScript.language = "javascript"; oScript.type = "text/javascript"; oScript.id = "origmultiplebusiness"; oScript.defer = true; oScript.text = jsVal; oHead.appendChild(oScript); //} // var searchJson = ""; if(type == 2){ var _begintime = $("txt_beginetd").value.trim(); if(_begintime.trim() != ""){ if(!validateDateTime(_begintime)){ alert("起始时间格式错误"); return; } } var _endtime = $("txt_endetd").value.trim(); if(_endtime.trim() != ""){ if(!validateDateTime(_endtime)){ alert("结束时间格式错误"); return; } } var _customer = $("h_customer").value.trim(); var _vessel = $("h_vessel").value.trim(); var _voyno = $("h_voyno").value.trim(); var _op = $("h_operator").value.trim(); var _checkno = $("txt_no").value.trim(); var _bstype = comboBsType.getSelectedValue();//业务类型 //begin searchJson +="{"; searchJson += "["; //如果查询条件设置了起始时间和结束时间则判断结束时间是否大于起始时间 if(_begintime != "" && _endtime != ""){ if(_begintime.length > 9 && _endtime.length > 9){ var status = DateTimeEqual(_begintime,_endtime); if(status == 0){ searchJson += "\"btime\":\""+_begintime+"\"," searchJson += "\"etime\":\""+_endtime+"\"," }else if(status == -1){ alert("时间设置错误,起始时间不能大于结束时间,请修改!"); return; } // else if(status == -2){ // alert("时间设置错误,起始时间不能等于结束时间,请修改!"); // return; // } } else{ alert("时间格式有问题,长度应大于9个字符,请修改!"); return; } }else{ searchJson += "\"btime\":\""+_begintime+"\"," searchJson += "\"etime\":\""+_endtime+"\"," } searchJson += "\"cus\":\""+_customer+"\","; searchJson += "\"vessel\":\""+_vessel+"\","; searchJson += "\"voyno\":\""+_voyno+"\","; searchJson += "\"op\":\""+_op+"\","; searchJson += "\"bty\":\""+_bstype+"\","; searchJson += "\"no\":\""+_checkno+"\""; searchJson += "]"; searchJson +="}"; } commonGridObj_muliple = new TGridCommon("mygrid_container_report","form1",headerArgs_orderlist,widthArgs_orderlist,colAlignArgs_orderlist,colSortArgs_orderlist,colTypeArgs_orderlist); commonGridObj_muliple.setResponseUrl("ReportGridSource.aspx"); commonGridObj_muliple.setSortValue("etd","desc"); var searchcacheName = $("h_searchcache").value;//alert(searchcacheName); if(commonGridObj_muliple.sortValue.length > 1 && commonGridObj_muliple.sortType.length > 1){ if(searchcacheName != ""){ commonGridObj_muliple.setRequest("ReportGridSource.aspx?handle=multiplebusiness&show_page=15&cur_page=1&uid="+commonGridObj_muliple.newGuid()+"&sort="+commonGridObj_muliple.sortValue+"&sortindex="+commonGridObj_muliple.sortType+"&cntr="+s0+"&searchcachename="+searchcacheName); }else{ if(searchJson.trim() != ""){ commonGridObj_muliple.setRequest("ReportGridSource.aspx?handle=multiplebusiness&show_page=15&cur_page=1&search="+escape(searchJson)+"&uid="+commonGridObj_muliple.newGuid()+"&sort=etd&sortindex=desc"+"&cntr="+s0); }else{ commonGridObj_muliple.setRequest("ReportGridSource.aspx?handle=multiplebusiness&show_page=15&cur_page=1&uid="+commonGridObj_muliple.newGuid()+"&sort="+commonGridObj_muliple.sortValue+"&sortindex="+commonGridObj_muliple.sortType+"&cntr="+s0); } } }else{ if(searchcacheName != ""){ commonGridObj_muliple.setRequest("ReportGridSource.aspx?handle=multiplebusiness&show_page=15&cur_page=1&uid="+commonGridObj_muliple.newGuid()+"&sort=etd&sortindex=desc"+"&cntr="+s0+"&searchcachename="+searchcacheName); }else{ if(searchJson.trim() != ""){ commonGridObj_muliple.setRequest("ReportGridSource.aspx?handle=multiplebusiness&show_page=15&cur_page=1&search="+escape(searchJson)+"&uid="+commonGridObj_muliple.newGuid()+"&sort=etd&sortindex=desc"+"&cntr="+s0); }else{ commonGridObj_muliple.setRequest("ReportGridSource.aspx?handle=multiplebusiness&show_page=15&cur_page=1&uid="+commonGridObj_muliple.newGuid()+"&sort=etd&sortindex=desc"+"&cntr="+s0); } } } if(searchcacheName != ""){ commonGridObj_muliple.setMultiple("&searchcachename="+searchcacheName); } if(searchJson.trim() != ""){ commonGridObj_muliple.setSearch(searchJson); } commonGridObj_muliple.setSourceType("json"); commonGridObj_muliple.setSkin("xp"); commonGridObj_muliple.setImageUrl("../images/"); commonGridObj_muliple.loadafter = true; commonGridObj_muliple.after = function () { var url = "../UserSettings/UserGridSource/OrigMultipleBusinessGrid.js?uid=" + newGuid(); var loader = dhtmlxAjax.getSync(url); var jsVal = loader.xmlDoc.responseText; var oHead = document.getElementsByTagName('head').item(0); var oScript = document.createElement("script"); oScript.language = "javascript"; oScript.type = "text/javascript"; oScript.id = "origmultiplebusiness"; oScript.defer = true; oScript.text = jsVal; oHead.appendChild(oScript); // var arg = new Array(); if(newColSortArgs.length == colSortArgs_orderlist.length){ for(var i=0;i"); } var tempWidth = widthArgs_orderlist[nIndex]; commonGridObj_muliple.getGridObj().setColWidth(nIndex,tempWidth); iCount++;//alert(headerArgs_orderlist); break; } } }else{ if(headerArgs_orderlist[i] == "checkboxs"){ commonGridObj_muliple.getGridObj().setColLabel(i,""); } var tempWidth = newWidthArgs[i]; commonGridObj_muliple.getGridObj().setColWidth(i,tempWidth); } } } }; commonGridObj_muliple.initGrid(); commonGridObj_muliple.bind(); commonGridObj_muliple.isSort = true; commonGridObj_muliple.initPageByHandle("multiplebusiness"); commonGridObj_muliple.sortEventFun = function(){ commonGridObj_muliple.getGridObj().attachEvent("onBeforeSorting", function(ind,type,direction){ if(type == "na" || type == "checkboxs"){ return false; }else{ //alert(type);alert(direction);alert(ind); commonGridObj_muliple.setSortValue(type,direction); commonGridObj_muliple.getGridObj().clearAll(); commonGridObj_muliple.setRequest("SeaExportGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_muliple.newGuid()+"&sort="+type+"&sortindex="+direction+"&cntr="+s0); if(commonGridObj_muliple.loadafter){ commonGridObj_muliple.loadafter = false; commonGridObj_muliple.after = function(){ } } commonGridObj_muliple.bind(); return true; } }); } commonGridObj_muliple.getGridObj().attachEvent("onBeforeSorting", function(ind,type,direction){ if(type == "na" || type == "checkboxs"){ return false; }else{ //alert(type);alert(direction);alert(ind); commonGridObj_muliple.setSortValue(type,direction); commonGridObj_muliple.getGridObj().clearAll(); commonGridObj_muliple.setRequest("SeaExportGridSource.aspx?handle=list&show_page=15&cur_page=1&uid="+commonGridObj_muliple.newGuid()+"&sort="+type+"&sortindex="+direction+"&cntr="+s0); if(commonGridObj_muliple.loadafter){ commonGridObj_muliple.loadafter = false; commonGridObj_muliple.after = function(){ } } commonGridObj_muliple.bind(); return true; } }); } function createTotalGrid(){ //header var headerArgs_total = new Array("业务类型","票数","应收USD","已收USD","未收USD","应收RMB","已收RMB","未收RMB","合计应收","合计已收","合计未收","应付USD","已付USD","未付USD","应付RMB","已付RMB","未付RMB","合计应付","合计已付","合计为付","利润USD","利润RMB","毛利润"); //width var widthArgs_total = new Array("120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120","120"); //column align var colAlignArgs_total = new Array("center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center","center"); //column sort var colSortArgs_total = new Array("str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str","str"); //column type var colTypeArgs_total = new Array("ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro","ro"); commonGridObj_total = new TGridCommon("mygrid_container_total","form1",headerArgs_total,widthArgs_total,colAlignArgs_total,colSortArgs_total,colTypeArgs_total); commonGridObj_total.setResponseUrl("ReportGridSource.aspx"); var searchcacheName = $("h_searchcache").value; var searchStr = ""; if(searchcacheName.trim() != ""){ searchStr = "&searchcachename="+searchcacheName; } commonGridObj_total.setRequest("ReportGridSource.aspx?handle=opseaemultipletotal"+searchStr+"&uid="+commonGridObj_total.newGuid()); commonGridObj_total.setSourceType("json"); commonGridObj_total.setSkin("xp"); commonGridObj_total.setImageUrl("../images/"); commonGridObj_total.initGrid(); commonGridObj_total.bind(); } var isIe=(document.all)?true:false; //设置select的可见状态 function setSelectState(state){ var objl=document.getElementsByTagName('select'); for(var i=0;i" + "" + "
"+content+"
"; var v_top=(document.body.clientHeight-mesW.clientHeight)/2; v_top+=document.documentElement.scrollTop; styleStr="top:"+(v_top-180)+"px;left:"+(document.body.clientWidth/2-mesW.clientWidth/2)+"px;position:absolute;width:700px;margin-left:-300px;left:50%;z-index:9999;"; mesW.style.cssText=styleStr; document.body.appendChild(mesW); } //让背景渐渐变暗 function showBackground(obj,endInt){ if(isIe){ obj.filters.alpha.opacity+=5; if(obj.filters.alpha.opacity" // +"
" //// +" " // +"
" // +"
" // +" " // +" " // +"
" // +" "; messContent += "
" + "