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

📄 borrow_input.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
'#############################################################################################
'#
'#	文件名	 : purchase_input.inc
'#	
'#      创建人	 : yaoxiaohui
'#      日期	 : 2002-11-06
'#
'#	修改历史  : ****年**月**日 ****** 
'#      修改内容  : *********************************
'#
'#	功能描述	 : 选择物品和设备入库函数文件
'#      版   本	 : v1.0
'#
'#      Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'#############################################################################################
'************************************************************************************************
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=90>这一行仅用于控制表格的宽度</td>" & vbLF & _
		"	<td width=40></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=80></td>" & vbLF & _
		"	<td width=150></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>&nbsp;<img src=""../images/bg/ar-y.gif"" width=8 height=8>&nbsp;" & TableHeaderField(sFileName, "sheet_id", "清单编号", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;选择</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "department", "部门", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "handover", "发料人", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "receiver", "借用人", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;类别</td>" & _
		"<td class=tdHead align=center>&nbsp;借用日期</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 sSheetID, sDepartment, sHandover, sReceiver, sGoodsType, sOpdate
	'------------------------------------
	' 获取数据库连接
	'------------------------------------
	dim rs	: set rs = Openrs(conn,sSQL)
	
	''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
		sSheetID			        = rs("sheet_id")
		sDepartment			        = rs("department")
		sHandover	            	= rs("handover")
		sReceiver	     	       	= rs("receiver")
		
		sql = "select t1.type_desc from t_goods_type t1 left join t_stock_detail t2 on t1.type_id = t2.goods_type where t2.sheet_id =" & ToSQL(sSheetID,"number")
		sGoodsType = DLookUp(conn,sql)
		
		sql = "select opdate from t_stock_detail where sheet_id =" & ToSQL(sSheetID,"number")
		sOpdate = DLookUp(conn,sql)

		sTemp = sTemp & "<tr bgcolor=white height=20>" & _
				"<td title=""点击可以察看“" & sSheetID & "”的信息"" style=""cursor:hand;color:blue;"" onclick=""javascript:location.href='sheet_goto.asp?sheet_id=" & sSheetID & "';"" nowrap>&nbsp;<img src=""../images/bg/ar-g.gif"" width=8 height=8>&nbsp;" & sSheetID & "&nbsp;</td>" & _
				"<td align=center><input type=""checkbox"" id=choose_" & rowCount & " name=""choose"" value=""" & rowCount & """ style=""border-width:0""></td>" & vbLF & _
				"<input type=""hidden"" name=""Sheet_id_" & rowCount & """ value=""" & sSheetID & """>" & vbLF & _
				"<td align=center title=""" & sDepartment & """ nowrap>&nbsp;" & sDepartment & "&nbsp;</td>" & _
				"<td align=center title=""" & sHandover & """ nowrap>&nbsp;" & sHandover & "&nbsp;</td>" & _
				"<td align=center title=""" & sReceiver & """ nowrap>&nbsp;" & sReceiver & "&nbsp;</td>" & _
				"<td align=center title=""" & sGoodsType & """ nowrap>&nbsp;" & sGoodsType & "&nbsp;</td>" & _
				"<td align=center title=""" & sOpdate & """ nowrap>&nbsp;" & sOpdate & "&nbsp;</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) & _
				"&nbsp;</td></tr>"
    TableRecords = _
	           "<form method=post name=""frmInput"" action=""" & sFileName & """>" & vbLF & _
			   "<input type=""hidden"" name=""FormAction"">" & vbLF & _
	           sTemp & _
			   ActionLink & _
			   "</form>" 

End Function
'************************************************************************************************
'*********************************************************************************************
Function ActionLink
		ActionLink = _
			"<img height=2>" & _
			"<table cellspacing=0 cellpadding=1 width=""100%"" align=center bgcolor=""#0099cc"" style=""color:white"">" & vbLF & _
			"<tr height=20>" & vbLF & _
			"		<td align=right" & _
						" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""CheckAllRows();"">全部选中</td>" & vbLF & _
			"		<td align=center" & _
						" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnInputNext_OnClick();"">继续</td>" & vbLF & _
			"</tr>" & vbLF & _
			"</table>" & vbLF
End Function
'*********************************************************************************************
sub InputNext(choose)
	dim arrayOutput, sSheetID, j, pSheetID
'	response.write choose & "<br>"
'	response.end

	arrayOutput = split(choose, ",")
'	response.Write arrayInput(0) & "<br>"
'	response.Write arrayInput(1) & "<br>"
'	response.end
	for j = 0 to UBound(arrayOutput) step 1
			sSheetID = GetParam("sheet_id_" & Trim(arrayOutput(j))) 
'			response.write sSheetID & "<br>"
			pSheetID = sSheetID & "," & pSheetID
	next
'	response.write pSheetID & "<br>"
'	response.end
    dim Num        :  Num = Len(pSheetID)
    pSheetID = left(pSheetID,Num - 1)
	dim pGoodsID : pGoodsID = "''"
	session("goods_id_for_input") = pGoodsID
	Response.Redirect "borrow_input_detail.asp?sheet_id=" & pSheetID
end sub
'*******************************************************************************
Function TableLink()
	TableLink = _
		"<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>&nbsp;" & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""../stock/goods_query.asp"">库存查询</a>" & vbLF & _
		"		&nbsp;&nbsp;&nbsp;" & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""../stock/output.asp"">物品出库</a>" & vbLF & _
		"		&nbsp;&nbsp;&nbsp;" & vbLF & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""../stock/goods_move.asp"">物品移动</a></td>" & vbLF &_
		"</tr>" & vbLF & _
		"</table>" & vbLF
End Function
%>

⌨️ 快捷键说明

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