📄 sheet_stock0120.inc
字号:
<%
'###############################################################################
'#
'# 文件名 : sheet_stock.inc
'#
'# 创建人 : yaoxiaohui
'# 日期 : 2002-11-06
'#
'# 修改历史 : ****年**月**日 ******
'# 修改内容 : *********************************
'#
'# 功能描述 : 进出库物料明细选择时间和仓库
'# 版 本 : v1.0
'#
'# Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'###############################################################################
'*******************************************************************************
Function TableSearch()
'' 进货方式分类,0全部,1为采购入库,2为移交入库,3为归还入库
'' 库存状态分类,0全部,1在库中,2已借出,3已报废,4已退货,5已领用,6已移出, 7待选择
'' 提醒状态分类,0不需提醒,1正常,2已提醒,3采购中,4选中的
'' 出库方式分类,1入库,2移入,3归还,4领用,5退货,6报废,7移出,8借出
TableSearch = _
"<form name=""frmSearch"" method=post action=""" & sFileName & """>" & vbLF & _
"<table cellspacing=0 cellpadding=3 width=""100%"" align=center border=0>" & vbLF & _
"<tr height=20>" & _
"<td colspan=8 bgcolor=""black"" align=center style=""color:white;font-weight:600"">设置物品和设备查询条件</td></tr>" & _
" <tr height=10 bgcolor=white><td colspan=8></td></tr>" & vbLF & _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td align=right>验收仓库:</td>" & vbLF & _
" <td>" & vbLF & _
" <select name=""depot_id"" style=""width:70"">" & vbLF & _
" <option value=-1>全部</option>" & vbLF & _
SelectOptions(conn, "select *from t_depot", "depot_id", "depot_name", pDepotID) & vbLF & _
" </select></td>" & vbLF & _
" <td align=right>起始日期:</td>" & vbLF & _
" <td>"& DrawCal("", pOpdate1, "opdate1", "dateimg1") &"</td>" & vbLF & _
" <td align=right>截至日期:</td>" & vbLF & _
" <td>"& DrawCal("", pOpdate2, "opdate2", "dateimg2") &"</td>" & vbLF & _
" </tr>" & vbLF & _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td align=right colspan=5><span id=btnSearch style=""cursor:hand"" title=""设置查询条件,然后点击查询按钮进行查询""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td></tr>" & vbLF & _
" <tr height=10 bgcolor=white><td colspan=8></td></tr>" & vbLF & _
"</table>" & vbLF
End Function
'*******************************************************************************
Function TableHeader()
TableHeader = _
"<table cellspacing=1 cellpadding=0 width=""100%"" align=center bgcolor=silver style=""table-layout:fixed"">" & vbLF & _
"<tr style=""display:none"">" & vbLF & _
" <td width=40>这一行仅用于控制表格的宽度</td>" & vbLF & _
" <td width=90></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=40></td>" & vbLF & _
" <td width=75></td>" & vbLF & _
" <td width=75></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=70></td>" & vbLF & _
" <td width=""*""></td></tr>" & vbLF & _
"<tr height=20>" & _
"<td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"">物料进出库明细</td></tr>" & _
"<tr bgcolor=white>" & _
"<td class=tdHead align=center>序号</td>" & _
"<td class=tdHead align=center>物品名称</td>" & _
"<td class=tdHead align=center>型号规格</td>" & _
"<td class=tdHead align=center>单位</td>" & _
"<td class=tdHead align=center>出入库数量</td>" & _
"<td class=tdHead align=center>日期</td>" & _
"<td class=tdHead align=center>出入库单类型</td>" & _
"<td class=tdHead align=center>验收仓库</td>" & _
"<td class=tdHead align=center>备注</td>" & _
"</tr>"
End Function
'*******************************************************************************
Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
dim sTemp : sTemp = "" ' 临时字符串变量
dim j ' 临时循环变量
dim sql
'------------------------------------
' 分页所需的变量定义
'------------------------------------
Dim iCounter : iCounter = 1
Dim iPrevPage, iNextPage
Dim rowCount : rowCount = 0
'------------------------------------
' 获取数据库连接
'------------------------------------
dim rs : set rs = Openrs(conn,sSQL)
dim sGoodsID, sGoodsName,sSheetID, sModel, sUnit, sQuantity, sOpdate, sDepotName, sRemark
dim sOptype,sTypeName
''response.write sSQL : response.end
' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
if Not rs.EOF then
rs.move (iCurrentPage - 1) * iRecordsPerPage
end if
while not rs.EOF and iCounter <= iRecordsPerPage
rowCount = rowCount + 1
sGoodsID = rs("goods_id")
sGoodsName = rs("goods_name")
sSheetID = rs("sheet_id")
sModel = rs("model")
sUnit = rs("unit")
sQuantity = rs("quantity")
sOpdate = rs("opdate")
sDepotName = rs("depot_name")
sRemark = rs("remark")
sql = "select optype from t_stock_master where sheet_id =" & sSheetID
sOptype = DLookUp(conn,sql)
sql = "select type_desc from t_op_type where type_id =" & sOptype
sTypeName = DLookUp(conn,sql)
sTemp = sTemp & "<tr bgcolor=white height=20>" & _
"<td class=tdlist align=center nowrap>" & rowCount & "</td>" & _
"<td class=tdlist align=center title=""" & sGoodsName & """ nowrap>" & sGoodsName & " </td>" & _
"<td class=tdlist align=center title=""" & sModel & """ nowrap>" & sModel & " </td>" & _
"<td class=tdlist align=center title=""" & sUnit & """ nowrap>" & sUnit & " </td>" & _
"<td class=tdlist align=center title=""" & sQuantity & """ nowrap>" & sQuantity & " </td>" & _
"<td class=tdlist align=center title=""" & sOpdate & """ nowrap>" & sOpdate & " </td>" & _
"<td class=tdlist align=center title=""" & sTypeName & """ nowrap>" & sTypeName & " </td>" & _
"<td class=tdlist align=center title=""" & sDepotName & """ nowrap>"& sDepotName &" </td>" & _
"<td class=tdlist align=center title=""" & sRemark & """ nowrap>"& sRemark &" </td>" & _
"</tr>"
iCounter = iCounter + 1
rs.movenext
wend
rs.Close()
set rs = nothing
' 填补空白行
sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
' 首页、前页、后页、尾页等分页信息
sTemp = sTemp & "<tr bgcolor=white height=20><td colspan=" & iCols & " align=right>" & _
Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
" </td></tr>"
TableRecords = sTemp
End Function
'*******************************************************************************
Function TableLink()
dim sTemp : sTemp = ""
if hasright(ID_STOCK) < RIGHT_WRITE then
sTemp = _
"<table width=""100%"" cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _
"<tr height=10>" & vbLF & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _
"</tr>" & vbLF & _
"<tr>" & vbLF & _
" <td width=600> " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/goods_query.asp"">库存查询</a>" & vbLF & _
"</tr>" & vbLF & _
"</table>" & vbLF
else
sTemp = _
"<table width=""100%"" cellspacing=0 cellpadding=0 border=0 align=center>" & vbLF & _
"<tr height=10>" & vbLF & _
" <td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & vbLF & _
"</tr>" & vbLF & _
"<tr>" & vbLF & _
" <td width=600> " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/goods_query.asp"">库存查询</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/goods_input.asp"">物品入库</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/output.asp"">物品出库</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/goods_move.asp"">物品移动</a></td>" & vbLF & _
"</tr>" & vbLF & _
"</table>" & vbLF
end if
TableLink = sTemp
End Function
'*******************************************************************************
function TableAction(pSQL)
dim sTemp : sTemp = ""
TableAction = _
"<input type=""hidden"" name=""FormAction"">" & vbLF & _
"<table width=600 cellspacing=0 cellpadding=5 height=30 align=center>" & vbLF & _
" <tr>" & vbLF & _
" <td align=center>" & _
" <a style=""color:blue"" href=""sheet_stock_print.asp?opdate1=" & pOpdate1 & "&opdate2=" & pOpdate2 &"&depot_id="& pDepotID &"""><img border=0 src=""../images/arrowr.gif""> 进入打印页面</a>" & vbLF & _
" " & vbLF & _
" <a style=""color:blue"" href=""sheet_mgr.asp""><img border=0 src=""../images/property.gif""> 出入库单管理</a>" & vbLF & _
sTemp & vbLF & _
"</td>" & vbLF & _
" </tr>" & vbLF & _
"</table>" & vbLF & _
"</form>"
end function
'*******************************************************************************
Function Toexcel()
dim rs,sql,filename,fs,myfile
set fs = server.CreateObject("scripting.filesystemobject")
filename = "c:\online.xls"
if fs.FileExists(filename) then
fs.DeleteFile(filename)
end if
set myfile = nothing
set fs = nothing
response.redirect "sheet_stock.asp"
response.end
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -