?? default.asp
字號:
<!-- #include virtual="/eB3KTransaction.asp" -->
<!-- #include virtual="/Server/ebo.asp" -->
<!-- #include virtual="/Server/cblib.asp" -->
<!-- #include virtual="/Server/SqlReport.asp" -->
<!-- #include virtual="/Server/ReportBD.asp" -->
<!-- #include virtual="/Server/rawdata.asp" -->
<!-- #include virtual="/Server/common.asp" -->
<HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script src="/Client/ebComm.js"></script><title></title></HEAD>
<script src="/client/ebo.js"></script>
<script src="/client/Request.js"></script>
<script src="/client/IClient.js"></script>
<script src="/client/grid.js"></script>
<script src="/client/cblib.js"></script>
<script src="/client/print.js"></script>
<%
dim eBP,y
Set eBP = Server.CreateObject("NaFine.Privilege")
y=eBP.PrivilegeTest(0,Clng(1011),8,me)
if CStr(y)<>"0" then err.raise 10000,"InStock.Open", eBP.GetLastError()
dim defaultPrintRows
defaultPrintRows = 40
function GetPrintRows(iRows,defaultPrintRows)
if iRows > defaultPrintRows then
GetPrintRows = defaultPrintRows
else
GetPrintRows = iRows
end if
end function
dim szSQL,iListWidth,szSelect,szFrom,szWhere,szGroupBy,TableName
dim s1c,s2c,so1c,so2c,pc,oc,s1iCount,s2iCount,piCount,so1iCount,so2iCount,oiCount,s,p,datefrom,dateto,memo,memotext,eboRegiCount
eboRegiCount=0
TableName="bdMoveStock"
s1c=CLng(GetForm("stockoutCheck"))
s2c=CLng(GetForm("stockinCheck"))
pc=CLng(GetForm("productCheck"))
s1iCount=CLng(GetForm("s1Detail_rows"))
s2iCount=CLng(GetForm("s2Detail_rows"))
piCount=CLng(GetForm("pDetail_rows"))
datefrom=GetForm("DateFrom")
dateto=GetForm("DateTo")
if len(datefrom)>0 then datefrom = DateSerial(year(datefrom), month(datefrom), day(datefrom))
if len(dateto)=0 then
dateto=now()
end if
dateto = DateSerial(year(dateto), month(dateto), day(dateto))
dateto = DateAdd("d", 1, dateto)
dim SQLString
function SQLWhereOR(szField,szServerSideName,iTotalCount)
dim i, szWhere
szWhere = "("
for i = 0 to iTotalCount-1
if i > 0 then szWhere = szWhere & " OR "
szWhere = szWhere & szField & "=" & GetForm(szServerSideName & i)
next
szWhere = szWhere & ")"
SQLWhereOR=szWhere
end function
szFrom = " FROM ["&TableName&"] AS [vt], ["&TableName&"List] AS [vl]"
szWhere = " WHERE [vt].[BillType]=7 AND [vt].[ID]=[vl].[ID] AND [vt].[IsDeleted]=0 AND [vt].[AuditID]>0 "
if s1c=1 or s1iCount>0 then
if s1c=0 then
RptMoveStock1 nothing, szFrom, szWhere, nothing
else
RptMoveStock1 szSelect, szFrom, szWhere, szGroupBy
end if
if s1iCount>0 then SqlWhereAdd szWhere, SQLWhereOR("[vt].[Stock]","s1Detail_0_",s1iCount)
end if
if s2c=1 or s2iCount>0 then
if s2c=0 then
RptMoveStock2 nothing, szFrom, szWhere, nothing
else
RptMoveStock2 szSelect, szFrom, szWhere, szGroupBy
end if
if s2iCount>0 then SqlWhereAdd szWhere, SQLWhereOR("[vt].[Organization]","s2Detail_0_",s2iCount)
end if
if pc=1 or piCount>0 then
if pc=0 then
RptMoveProduct nothing, szFrom, szWhere, nothing
else
RptMoveProduct szSelect, szFrom, szWhere, szGroupBy
end if
if piCount>0 then SqlWhereAdd szWhere, SQLWhereOR ("[vl].[ProductID]","pDetail_0_",piCount)
end if
SqlSelectAdd szSelect, "SUM([vl].[Quantity]) AS 數(shù)量, SUM([vl].[TaxAmount]) AS 金額"
if isDate(datefrom) then SqlWhereAdd szWhere, "[vt].[UpdateDate] >='"&GetDateString(datefrom)&"'"
if isDate(dateto) then SqlWhereAdd szWhere, "[vt].[UpdateDate] <='"&GetDateString(dateto)&"'"
szSQL="SELECT DISTINCT " & szSelect & szFrom & szWhere
if len(szGroupBy)>0 then szSQL=szSQL & " GROUP BY " & szGroupBy
eboReg 1, "gridCols", "iCols", "", "cbLocalVariable"
eboReg 1, "gridRows", "iRows", "", "cbLocalVariable"
eboReg 2, "gridTilte_", "szTitle", "", "cbLocalVariable"
dim iCols,iRows, szTitle, szValue
dim i,rs
Response.Write "<script>" & VBCrLf
Set rs = Server.CreateObject("ADODB.RecordSet")rs.open szSQL,Conn,1,1
IData2d 0,1iCols=rs.Fields.CountiRows=rs.RecordCount defaultPrintRows = GetPrintRows(iRows,defaultPrintRows)
eboGet 1, nothing, nothingIData2d 1,2for i=0 to rs.Fields.Count-1
szTitle=rs.Fields.Item(i).Name eboGet 2, nothing, nothing
next
rawGet rs
Set rs = NothingResponse.Write "</script>" & VBCrLf
%>
<LINK REL=stylesheet HREF="/Client/All.css" TYPE="text/css"><script src="/Client/ebComm.js"></script><BODY>
<div id=sTitle align=center><font size=5><b><u>調(diào) 撥 報 表</u></b></font></div>
<div id=sTime>查詢時間:<%if len(datefrom)=0 then Response.Write "系統(tǒng)啟用" else Response.Write FormatDateTime(datefrom,1)%>—<%=FormatDateTime(DateAdd("d",-1,dateto),1)%></div>
<div id=SelectArea></div>
<div id=PageCtrlArea></div>
<div> <input type=button value="預(yù)覽" onClick=displayPrint(sTitle,sTime,<%=defaultPrintRows%>,1)> <input type=button value="打印" onClick=displayPrint(sTitle,sTime,<%=defaultPrintRows%>,0)></div>
</BODY>
<script title=User>
function ecbDetail(eo,szEvent,x,y){
if (szEvent=='MOUSECLICK'){
}
}
</script>
<script>
function getGridWidth(titleText){
switch(titleText){
case '編號':
return 170;
break;
case '品名':
return 130;
break;
case '規(guī)格':
return 100;
break;
default:
return 80;
}
}
function getGridNumeric(titleText){
switch(titleText){
case '數(shù)量':
return 1;
break;
case '金額':
return 1;
break;
default:
return 0;
}
}
function getGridAlign(titleText){
switch(titleText){
case '數(shù)量':
return 'right';
break;
case '金額':
return 'right';
break;
default:
return '';
}
}
function getGridTotal(titleText){
switch(titleText){
case '數(shù)量':
return 1;
break;
case '金額':
return 1;
break;
default:
return 0;
}
}
function makeGrid(indata){
var gridCols=parseInt(indata.item('gridCols'));
var gDetail = new ZYDGRID(new ZYDGRIDFORIEBUG(),SelectArea,40,gridCols,'100%','',1,testUndefine,IRAWDataEnd(),ecbDetail);
gDetail.title[0].text='№';
for (var i=0;i<gridCols;i++){
gDetail.title[i+1].text=indata.item('gridTilte_'+i);
gDetail.title[i+1].width=getGridWidth(indata.item('gridTilte_'+i));
gDetail.title[i+1].isNumeric=getGridNumeric(indata.item('gridTilte_'+i));
gDetail.title[i+1].formAlign=getGridAlign(indata.item('gridTilte_'+i));
gDetail.title[i+1].isTotal=getGridTotal(indata.item('gridTilte_'+i));
}
gDetail.calcTotal();
gDetail.refreshAll();
return gDetail
}
var gDetail=makeGrid(IDataEnd());
</script>
</HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -