📄 buildexcelfile.inc
字号:
<%
'###############################################################################
'#
'# 文件名 : buildexcelfile.inc
'#
'# 创建人 : yaoxiaohui
'# 日期 : 2002-11-06
'#
'# 修改历史 : ****年**月**日 ******
'# 修改内容 : *********************************
'#
'# 功能描述 : 生成Excel文件函数文件
'# 版 本 : v1.0
'#
'# Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'###############################################################################
'*******************************************************************************
Function SheetTop()
SheetTop = _
"<table cellspacing=0 cellpadding=3 width=""700"" align=center border=0>" & vbLF & _
" <tr height=100 bgcolor=white>" & vbLF & _
" <td align=center colspan=9 style=""color:black;font-size:16pt;font-weight:600;"">物料进出库明细表</td>" & vbLF & _
" </tr>"
End Function
'*******************************************************************************
Function SheetMasterUp()
SheetMasterUp = _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td align=left colspan=1> 类别:</td>" & vbLF & _
" <td colspan=2 > " & sGoodsDesc & "</td>" & vbLF & _
" <td align=left colspan=1>日期:</td>" & vbLF & _
" <td colspan=2 > " & pOpdate1 & " — " & pOpdate2 & "</td>" & vbLF & _
" <td align=left colspan=1>编号:</td>" & vbLF & _
" <td colspan=2 > </td>" & vbLF & _
" </tr></table>" & vbLF
End Function
'*******************************************************************************
'*******************************************************************************
Function TableHeader()
TableHeader = _
"<table cellspacing=0 cellpadding=1 width=""700"" align=center border=1>" & vbLF & _
"<tr style=""display:none"">" & vbLF & _
" <td>这一行仅用于控制表格的宽度</td>" & vbLF & _
" <td></td>" & vbLF & _
" <td></td>" & vbLF & _
" <td></td>" & vbLF & _
" <td></td>" & vbLF & _
" <td></td>" & vbLF & _
" <td></td>" & vbLF & _
" <td></td>" & vbLF & _
" <td></td></tr>" & vbLF & _
"<tr height=25 bgcolor=white>" & _
"<td align=center>序号</td>" & _
"<td align=center>物品名称</td>" & _
"<td align=center>型号规格</td>" & _
"<td align=center>单位</td>" & _
"<td align=center>出入库数量</td>" & _
"<td align=center>日期</td>" & _
"<td align=center>出入库单类型</td>" & _
"<td align=center>验收仓库</td>" & _
"<td align=center>备注</td>" & _
"</tr>"
End Function
'*******************************************************************************
Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
dim sTemp : sTemp = "" ' 临时字符串变量
dim j ' 临时循环变量
'------------------------------------
' 分页所需的变量定义
'------------------------------------
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
iTotalRecords = iTotalRecords
while not rs.EOF
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=25>" & _
"<td align=center nowrap>" & rowCount & "</td>" & _
"<td align=center title=""" & sGoodsName & """ nowrap>" & sGoodsName & " </td>" & _
"<td align=center title=""" & sModel & """ nowrap>" & sModel & " </td>" & _
"<td align=center title=""" & sUnit & """ nowrap>" & sUnit & " </td>" & _
"<td align=center title=""" & sQuantity & """ nowrap>" & sQuantity & " </td>" & _
"<td align=center title=""" & sOpdate & """ nowrap>" & sOpdate & " </td>" & _
"<td align=center title=""" & sTypeName & """ nowrap>" & sTypeName & " </td>" & _
"<td align=center title=""" & sDepotName & """ nowrap>"& sDepotName &" </td>" & _
"<td align=center title=""" & sRemark & """ nowrap>"& sRemark &" </td>" & _
"</tr>"
iCounter = iCounter + 1
rs.movenext
wend
rs.Close()
set rs = nothing
TableRecords = _
sTemp & _
"</table>"
End Function
'*******************************************************************************
Function SheetMasterDown
SheetMasterDown = _
"<table cellspacing=0 cellpadding=3 width=""700"" align=center border=0>" & vbLF & _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td align=left colspan=1 style=""color:black;""> 仓库主管: </td>" & vbLF & _
" <td colspan=2 > </td>" & vbLF & _
" <td align=left colspan=1 style=""color:black;"">验收人: </td>" & vbLF & _
" <td colspan=2 > </td>" & vbLF & _
" <td align=left colspan=1 style=""color:black;"">保管员: </td>" & vbLF & _
" <td colspan=2 > </td>" & vbLF & _
" </tr>" & vbLF
End Function
'*******************************************************************************
Function SheetBottom()
SheetBottom = _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td align=right colspan=9 style=""color:black;"">仲量联行上海信息大楼物业管理中心 </td>" & vbLF & _
" </tr>" & vbLF & _
"</table>" & vbLF
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -