📄 default.asp
字号:
<!-- #include virtual="/eB3KTransaction.asp" --><!-- #include virtual="/Server/ebo.asp" --><!-- #include virtual="/Server/cblib.asp" --><!-- #include file="../Common.asp" --><HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK REL=stylesheet HREF="/Client/All.css" TYPE="text/css"><script src="/Client/ebComm.js"></script></HEAD><script src="/client/ebo.js"></script><script src="/client/Request.js"></script><script src="/client/IClient.js"></script>
<script src="/client/IServer.js"></script><script src="/client/grid.js"></script><BODY><div id=SelectArea></div><div id=PageCtrlArea></div>
<iframe id=bdSelectArea width=500 height=500 style="DISPLAY: none" border=0 frameborder=0 framespacing=0 marginheight=0 marginwidth=0></iframe><div id=bdPanel width="100" height="60" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; DISPLAY: none; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; POSITION: absolute"><div id=bdPanelProduct><input type=button value="删除" onclick="panelDelete()"></div></BODY><script title=User>
var iPanelx=0,iPanely=0,detailName;bdPanel.style.left=0;bdPanel.style.top=0;bdPanel.style.backgroundColor=document.bgColor;function panelShow(idCtrl,idPanel,idChild,dir){ var coll=idPanel.all.tags('div'); for (i=0;i<coll.length;i++){ if (coll(i)==idChild) coll(i).style.display='block'; else coll(i).style.display='none'; } idPanel.style.display='block'; var rect=idCtrl.getBoundingClientRect(); var rectPanel=idPanel.getBoundingClientRect(); idPanel.style.left=rect.right-(rectPanel.right-rectPanel.left); idPanel.style.top=idCtrl.getBoundingClientRect().top-1; idPanel.style.left=parseInt(idPanel.style.left)+document.body.scrollLeft; idPanel.style.top=parseInt(idPanel.style.top)+document.body.scrollTop;}function cbDelete(ifrid, fun, data){ if (fun=='data'){ if (isNaN(parseInt(data[0]))||parseInt(data[0])==0) alert('删除失败!'); else{ alert('删除成功!'); window.location.reload(); } return; }}function panelHide(){bdPanel.style.display='none';}function panelDelete(){ panelHide(); IServer(bdSelectArea,'SaleOrder.Delete','ID='+detailName.data[iPanelx][0],cbDelete);}function gridInit(t){ t[0].text='№'; t[1].text='序号'; t[1].width=60; t[2].text='时间'; t[2].width=90; t[3].text='客户'; t[3].width=220; t[4].text='金额'; t[4].width=60; t[4].formAlign='right'; t[5].text='审核'; t[5].width=50; t[5].formAlign='center';}function ecbDetail(eo,szEvent,x,y){ if (szEvent=='MOUSECLICK'){ var data=new Array(); if (isNaN(x)) return; if (x<0||x>gDetail.data.length) return; data[0]=eo.data[x][0]; //Add your code here //data[1]=eo.data[x][2]; //End IClient('data',data); IClient('end',''); }
if (szEvent=='RIGHTCLICK'){ iPanelx=eo.showpos+x; detailName=eo; panelShow(eo.grid.rows(x+1).cells(y+1),bdPanel,bdPanelProduct,1); return true; }}</script><%
dim eBP,y Set eBP = Server.CreateObject("ZZ.Privilege") y=eBP.PrivilegeTest(0,Clng(bdType),8,me) if CStr(y)<>"0" then err.raise 10000,"PrivilegeGroup.Open", eBP.GetLastError() dim szSQL,szFind,iListWidth,SQLSelect,SQLFrom,SQLWhere,SQLOrderSQLSelect=""SQLFrom=""SQLWhere=""SQLOrder=""iListWidth = 5 'ListWidth
szFind = Request("Find") SQLFrom= SQLFrom&" FROM [BillDocument] "SQLWhere=SQLWhere&"WHERE AccountID=" & AccountID & " AND IsDeleted=0 AND BillType=" & bdType & ""if len(szFind)<>0 then SQLWhere = SQLWhere & " AND ID="& SQLInputParam(szFind) SQLOrder=SQLOrder&" ORDER BY ID DESC"end if'eboRegeboReg 1, "List_0_", "ID", "", "cbRSDirect"eboReg 1, "List_1_", "BillDate", "", "cbRSDateToText"eboReg 1, "List_2_", "Organization", "", "cbRSCustomToText"eboReg 1, "List_3_", "Currency1", "", "cbRSDirect"eboReg 1, "List_4_", "AuditID", "", "cbRSDirect"eboReg 2, "List_rows", "i", "", "cbLocalVariable"eboReg 2, "List_cols", "iListWidth", "", "cbLocalVariable"eboReg 2, "MaxPage", "iMaxPage", "", "cbLocalVariable"'Enddim iPage,iRows,iMaxPageiMaxPage = 0iPage = GetLong(Request("Page"),1) 'default page posiRows = GetLong(Request("Rows"),10) 'default rowsdim eBD,rsdim i,x,szTableNameSet eBD = Server.CreateObject("eB3KCommon.BillDocument")x = eBD.bdGetDetailByType(Conn, CLng(bdType), rs)set eBD = Nothingif x=0 then szSQl = ""else szTableName = CStr(rs("TableName"))end ifset rs = nothingi = 0dim iRecordCount ,tRcSQLSelect="SELECT COUNT(*) AS rc "szSQL=SQLSelect & SQLFrom & SQLWhereszSQL=replace(szSQL,"[BillDocument]","["&szTableName&"]")tRc=Conn.Execute(szSQL)iRecordCount=tRc("rc")SQLSelect=" SELECT TOP "& iPage*iRows & " [ID],[BillDate],[Organization],[Currency1],[AuditID] "szSQL=SQLSelect & SQLFrom & SQLWhere & SQLOrderResponse.Write "<script>" & VBCrLfif szSQL <> "" then szSQL=replace(szSQL,"[BaseInfo]","["&szTableName&"]") Set rs = Server.CreateObject("ADODB.RecordSet") rs.open szSQL,Conn,1,1 iMaxPage = Int((iRecordCount+iRows-1)/iRows) if iRecordCount > 0 then rs.move iPage*iRows-iRows IData2d 1,1 Do While Not rs.EOF And i < iRows eboGet 1, rs, nothing i = i + 1 rs.MoveNext Loop Set rs = Nothingend ifIData2d 0,2eboGet 2, nothing, nothingResponse.Write "</script>" & VBCrLf%><script>requestSet('Page','<%=iPage%>');requestSet('Rows','<%=iRows%>');var indata = IDataEnd();var gDetail = new ZYDGRID(new ZYDGRIDFORIEBUG(),SelectArea,indata.item('List_rows'),indata.item('List_cols'),'100%','',0,testUndefine,testUndefine,ecbDetail);gridInit(gDetail.title);var gPageCtrl = new ZYDPAGECTRL(new ZYDPAGECTRLFORIEBUG(),PageCtrlArea,request('Page'),indata.item('MaxPage'));function mydetailproc(method,ebo){ if (method==EBO_SET){ var i,j; var rows=parseInt(indata.item(ebo.serversidename+'_rows')); var cols=parseInt(indata.item(ebo.serversidename+'_cols')); ebo.id.data.length=0; for (i=0;i<rows;i++){ ebo.id.data[i]=new Array(); for (j=0;j<cols;j++) ebo.id.data[i][j]=indata.item(ebo.serversidename+'_'+j+'_'+i); } } return (true);}eboReg('List',gDetail,'',mydetailproc);eboSet();gDetail.refreshAll();function IClientSetSize(){ document.body.style.borderWidth=1; document.body.style.borderColor='#000000'; document.body.style.borderStyle='solid'; IClient('setSize',new Array(document.body.scrollWidth+2,document.body.scrollHeight+2));}IClientSetSize();</script></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -