⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 purchase_sheet.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
'###############################################################################
'#
'#	文件名	 : purchase_sheet.inc
'#	
'#      创建人	 : yaoxiaohui
'#      日期	 : 2002-11-06
'#
'#	修改历史  : ****年**月**日 ****** 
'#      修改内容  : *********************************
'#
'#	功能描述	 : 采购单显示函数文件
'#      版   本	 : v1.0
'#
'#      Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'###############################################################################

'*******************************************************************************
Function SheetTop()
    SheetTop = _
		"<table cellspacing=0 cellpadding=3 width=""640"" align=center border=0>" & vbLF & _
		"  <tr height=60 bgcolor=white>" & vbLF & _
		"	<td align=center style=""color:black;font-size:16pt;font-weight:800;"">仓库购物申请表</td>" & vbLF & _
		"  </tr>" & vbLF & _		
		"</table>" & vbLF
End Function
'*******************************************************************************
Function Border()
	Border = _
	"<table cellspacing=0 cellpadding=3 width=""20"" align=center border=0>" & vbLF & _
	"  <tr bgcolor=white>" & vbLF & _
	"	<td></td>" & vbLF & _
	"  </tr>" & vbLF & _
	"</table>" & vbLF
End Function
'*******************************************************************************
Function SheetMasterUp()
    SheetMasterUp = _
		"<table cellspacing=0 cellpadding=3 width=""640"" align=center border=0>" & vbLF & _
		"  <tr height=30 bgcolor=white>" & vbLF & _
		"	<td width=450 align=left style=""color:black;"">&nbsp;&nbsp;&nbsp;类别:&nbsp;" & sGoodsType & "</td>" & vbLF & _
		"	<td width=150 align=left style=""color:black;"">编号:&nbsp;" & pSheetID & "</td>" & vbLF & _
		"  </tr>" & vbLF & _		
		"</table>" & vbLF
End Function
'*******************************************************************************
Function TableHeader()
	TableHeader = _
		"<table cellspacing=0 cellpadding=0 width=600 align=center bgcolor=silver style=""table-layout:fixed;border-style:solid;border-color:black;border-top-width:1px;border-bottom-width:2px;border-left-width:1px;border-right-width:2px;"">" & vbLF & _
		"<tr style=""display:none"">" & vbLF & _
		"	<td width=40>这一行仅用于控制表格的宽度</td>" & vbLF & _
		"	<td width=120></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=""*""></td></tr>" & vbLF & _
		"<tr bgcolor=white height=35 style=""border-style:groove;border-color:black;border-width:1;"">" & _
        "<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 iCounter		: iCounter = 1
	Dim iPrevPage, iNextPage
	Dim rowCount        : rowCount = 0
	
	'------------------------------------
	' 获取数据库连接
	'------------------------------------
	dim rs	: set rs = Openrs(conn,sSQL)

	dim sCargoID, sCargoName, sModel, sUnit, sQuantity, sUnitPrice
	dim sTotalPrices
	
	''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
		sCargoID		= rs("cargo_id")
		sCargoName		= rs("cargo_name")
		sModel			= rs("model")
		sUnit			= rs("unit")
		sQuantity		= rs("quantity")
		sUnitPrice		= rs("unit_price")

		sTotalPrices = sQuantity*sUnitPrice	

		if left(sUnitPrice,1) = "." then
			sUnitPrice	= "0" & sUnitPrice
		end if

		sTemp = sTemp & "<tr bgcolor=white height=30>" & _
		        "<td class=tdlist align=center nowrap>" & rowCount & "</td>" & _
				"<td class=tdlist align=center title=""" & sCargoName & """ nowrap>" & sCargoName & "&nbsp;</td>" & _
				"<td class=tdlist align=center title=""" & sModel & """ nowrap>" & sModel & "&nbsp;</td>" & _
				"<td class=tdlist align=center title=""" & sQuantity & """ nowrap>" & sQuantity & "&nbsp;</td>" & _
				"<td class=tdlist align=center title=""" & sUnitPrice & """ nowrap>" & sUnitPrice & "&nbsp;</td>" & _
				"<td class=tdlist align=center title=""" & sTotalPrices & """ nowrap>" & sTotalPrices & "&nbsp;</td>" & _
				"<td class=tdlist align=center nowrap>&nbsp;</td>" & _
				"</tr>"
		iCounter = iCounter + 1
		rs.movenext
	wend
	rs.Close()
	set rs = nothing

	' 填补空白行
	sTemp = sTemp & WhiteRowsMod(iCols, iCounter, iRecordsPerPage)

	TableRecords = _ 
				sTemp & _
				"  <tr height=30 bgcolor=white>" & vbLF & _
				"	 <td class=tdlist colspan = 7 align=left>&nbsp;供货商:" & sSupplier & "</td>" & vbLF & _	
				"    </tr>" & vbLF & _
				"  <tr height=60 bgcolor=white>" & vbLF & _
				"	 <td class=tdlist colspan = 7 align=left>&nbsp;用途:" & pPurpose & "</td>" & vbLF & _	
				"    </tr>" & vbLF & _
				"  <tr height=30 bgcolor=white>" & vbLF & _
				"	 <td class=tdlist colspan = 7 align=left>&nbsp;申请金额:" & pReqPrice & "</td>" & vbLF & _	
				"    </tr>" & vbLF & _
				"  <tr height=30 bgcolor=white>" & vbLF & _
				"	 <td class=tdlist colspan = 7 align=left>&nbsp;支票抬头:" & pCheque & "</td>" & vbLF & _	
				"    </tr>" & vbLF & _
				"  <tr height=30 bgcolor=white>" & vbLF & _
				"	 <td class=tdlist colspan = 7 align=left>&nbsp;支付方式:" & pPayMode & "</td>" & vbLF & _	
				"    </tr>" & vbLF & _				
				"</table>"

End Function
'*******************************************************************************
Function SheetMasterDown
	SheetMasterDown = _	
		"<table cellspacing=0 cellpadding=3 width=""640"" align=center border=0>" & vbLF & _
		
		"  <tr height=30 bgcolor=white>" & vbLF & _
		"	<td width=90 align=right>&nbsp;申购部门:&nbsp;</td>" & vbLF & _
		"	<td width=110 align=left>" & sDepartment & "</td>" & vbLF & _
		"	<td width=90 align=right>采购人:&nbsp;</td>" & vbLF & _
		"	<td width=310 align=left colspan=3>" & pBuyer & "</td>" & vbLF & _
		"  </tr>" & vbLF & _

		"  <tr height=30 bgcolor=white>" & vbLF & _
		"	<td width=90 align=right>行政主管:&nbsp;</td>" & vbLF & _
		"	<td width=110 align=left>" & pAdmin & "</td>" & vbLF & _
		"	<td width=90 align=right>高级经理:&nbsp;</td>" & vbLF & _
		"	<td width=110 align=left>" & pMgr & "</td>" & vbLF & _
		"	<td width=90 align=right>批准日期:&nbsp;</td>" & vbLF & _
		"	<td width=110 align=left>" & pPurTime & "</td>" & vbLF & _
		"  </tr>" & vbLF & _
		
		"</table>" & vbLF
End Function
'*******************************************************************************
Function SheetBottom()
    SheetBottom = _
		"<table cellspacing=0 cellpadding=3 width=""640"" align=center border=0>" & vbLF & _
		"  <tr height=30 bgcolor=white>" & vbLF & _
		"	<td align=right style=""color:black;"">仲量联行上海信息大楼物业管理中心&nbsp;&nbsp;</td>" & vbLF & _
		"  </tr>" & vbLF & _		
		"</table>" & vbLF
End Function
'*******************************************************************************
function TableAction()
	dim sTemp : sTemp = ""
	if hasright(ID_PURCHASE) < RIGHT_READ  then
	else
	sTemp = _
	"		<a style=""color:blue"" target=_blank href=""purchase_sheet.asp?sheet_id=" & pSheetID & "&forprint=1""><img border=0 src=""../images/arrowr.gif"">&nbsp;察看打印版</a>" & vbLF & _
	"		&nbsp;&nbsp;&nbsp;" & vbLF
	end if

	TableAction = _
		"<table width=600 cellspacing=0 cellpadding=5 height=30 align=center>" & vbLF & _
		"	<tr>" & vbLF & _
		"	<td align=center>" & _
		sTemp & vbLF & _	
		"		<a style=""color:blue"" href=""purchase_mgr.asp""><img border=0 src=""../images/property.gif"">&nbsp;采购单管理</a>" & vbLF & _
				"</td>" & vbLF & _
		"	</tr>" & vbLF & _
		"</table>"
end function
'*******************************************************************************
Function WhiteRowsMod(piCols, piStart, piRecordsPerPage)
	dim i, j, sTemp, iCols, iStart, iRecordsPerPage

	iCols = piCols
	iStart = piStart
	iRecordsPerPage = piRecordsPerPage

	'' 如果起始行已经等于或超过每页总行数,则返回空字串
	'' 如果从第一行开始就是空行,则显示(哎呀,一条记录也没有找到!)
	'' 否则,就从起始行开始填补空行
	if iStart > iRecordsPerPage then
		sTemp = ""
	else
		sTemp = "<tr bgcolor=white height=30>"
		for i = 1 to iCols
			sTemp = sTemp & "<td class=tdlist>&nbsp;</td>"
		next
		sTemp = sTemp & "</tr>"
	end if
	for j = iStart + 1 to iRecordsPerPage step 1
		sTemp = sTemp & "<tr bgcolor=white height=30>"
		for i = 1 to iCols
			sTemp = sTemp & "<td class=tdlist>&nbsp;</td>"
		next
		sTemp = sTemp & "</tr>"
	next
	WhiteRowsMod = sTemp
End Function
'*******************************************************************************
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -