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

📄 purchase_remind.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
'*******************************************************************************
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=""18%"">这一行仅用于控制表格的宽度</td>" & vbLF & _
		"	<td width=""7%""></td>" & vbLF & _
		"	<td width=""15%""></td>" & vbLF & _
		"	<td width=""12%""></td>" & vbLF & _
		"	<td width=""12%""></td>" & vbLF & _
		"	<td width=""12%""></td>" & vbLF & _
		"	<td width=""12%""></td>" & vbLF & _
		"	<td width=""12%""></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, "goods_name", "物品名称", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>选择</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "model", "型号规格", sFormParams, sSorting, sSorted) & 	"</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "unit", "单位", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "quantity", "库存数", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "type_desc", "物品类别", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "min_quantity", "最小库存", sFormParams, sSorting, sSorted) & "</td>" & _
		"<td class=tdHead align=center>&nbsp;" & TableHeaderField(sFileName, "depot_name", "存货仓库", sFormParams, sSorting, sSorted) & "</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

'	response.write sSQL & "<br>"
'	response.end
	'------------------------------------
	' 获取数据库连接
	'------------------------------------
	dim rs	: set rs = Openrs(conn,sSQL)

	dim sGoodsID, sGoodsName, sModel, sUnit, sQuantity, sGoodsType, sMinQuantity, sDepotID
	
	'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")
		sModel			        = rs("model")
		sUnit		        	= rs("unit")
		sQuantity	    		= rs("quantity")
		sGoodsType		    	= rs("type_desc")
		sMinQuantity	        = rs("min_quantity")		
		sDepotID		    	= rs("depot_name")	

	    'response.write rowCount : response.end
		sTemp = sTemp & "<tr bgcolor=white height=20>" & _
				"<td align=center title=""" & sGoodsName & """ nowrap>&nbsp;<img src=""../images/bg/ar-g.gif"" width=8 height=8>&nbsp;" & sGoodsName & "&nbsp;</td>" & _
				"<td align=center><input type=""checkbox"" id=choose1_" & rowCount & " name=""choose1"" value=""" & rowCount & """ style=""border-width:0"">" & _
				"<input type=""hidden"" name=""goods_id1_" & rowCount & """ value=""" & sGoodsID & """></td>" & _
				"<td align=center title=""" & sModel & """ nowrap>&nbsp;" & sModel & "&nbsp;</td>" & _
				"<td align=center title=""" & sUnit & """ nowrap>&nbsp;" & sUnit & "&nbsp;</td>" & _
				"<td align=center title=""" & sQuantity & """ nowrap>&nbsp;" & sQuantity & "&nbsp;</td>" & _
				"<td align=center title=""" & sGoodsType & """ nowrap>&nbsp;" & sGoodsType & "&nbsp;" & _
				"<input type=""hidden"" name=""goods_type1_" & rowCount & """ value=""" & sGoodsType & """></td>" & _
				"<td align=center title=""" & sMinQuantity & """ nowrap>&nbsp;" & sMinQuantity & "&nbsp;</td>" & _
				"<td align=center title=""" & sDepotID & """ nowrap>&nbsp;" & sDepotID & "&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"" value=""input"">" & vbLF & _
				sTemp & vbLF & _
				ActionLink1 & vbLF
End Function

'*******************************************************************************
Function TableRecords2(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
	dim sTemp	: sTemp = ""	' 临时字符串变量
	dim j					    ' 临时循环变量

	call PrepareListData(conn,sSQL, Join(arrayFields, sDelimiter), sDelimiter)
	'------------------------------------
	' 分页所需的变量定义
	'------------------------------------
	Dim iCounter		: iCounter = 1
	Dim iPrevPage, iNextPage
	Dim rowCount        : rowCount = 0

'	response.write sSQL & "<br>"
'	response.end
	'------------------------------------
	' 获取数据库连接
	'------------------------------------
	dim rs	: set rs = Openrs(conn,sSQL)

	dim sGoodsID, sGoodsName, sModel, sUnit, sQuantity, sGoodsType, sMinQuantity, sDepotID
	
	'response.write sSQL : response.end

	if rs.EOF then
    iCols			= 8 
	iCounter        = 4
	sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
	end if
	
	' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
	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")
		sModel			        = rs("model")
		sUnit		        	= rs("unit")
		sQuantity	    		= rs("quantity")
		sGoodsType		    	= rs("type_desc")
		sMinQuantity	        = rs("min_quantity")		
		sDepotID		    	= rs("depot_name")	

		sTemp = sTemp & "<tr bgcolor=white height=20>" & _
				"<td align=center title=""" & sGoodsName & """ nowrap>&nbsp;<img src=""../images/bg/ar-g.gif"" width=8 height=8>&nbsp;" & sGoodsName & "&nbsp;</td>" & _
				"<td align=center><input type=""checkbox"" id=choose2_" & rowCount & " name=""choose2"" value=""" & rowCount & """ style=""border-width:0"">" & _
				"<input type=""hidden"" name=""goods_id2_" & rowCount & """ value=""" & sGoodsID & """></td>" & _
				"<td align=center title=""" & sModel & """ nowrap>&nbsp;" & sModel & "&nbsp;</td>" & _
				"<td align=center title=""" & sUnit & """ nowrap>&nbsp;" & sUnit & "&nbsp;</td>" & _
				"<td align=center title=""" & sQuantity & """ nowrap>&nbsp;" & sQuantity & "&nbsp;</td>" & _
				"<td align=center title=""" & sGoodsType & """ nowrap>&nbsp;" & sGoodsType & "&nbsp;" & _
				"<input type=""hidden"" name=""goods_type2_" & rowCount & """ value=""" & sGoodsType & """></td>" & _
				"<td align=center title=""" & sMinQuantity & """ nowrap>&nbsp;" & sMinQuantity & "&nbsp;</td>" & _
				"<td align=center title=""" & sDepotID & """ nowrap>&nbsp;" & sDepotID & "&nbsp;</td>" & _
				"</tr>"
		iCounter = iCounter + 1
		rs.movenext
	wend
	
	'response.write sTemp : response.end
	
	rs.Close()
	set rs = nothing
	
	' 首页、前页、后页、尾页等分页信息
	sTemp = sTemp & "<tr bgcolor=white height=20><td colspan=" & iCols & " align=right>" & _
				Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
				"&nbsp;</td></tr>"
	
	TableRecords2 = _
				"<table cellspacing=1 cellpadding=0 width=""100%"" align=center bgcolor=silver style=""table-layout:fixed"">" & vbLF & _
		        "<tr style=""display:none"">" & vbLF & _
		        "	<td width=""18%"">这一行仅用于控制表格的宽度</td>" & vbLF & _
				"	<td width=""7%""></td>" & vbLF & _
				"	<td width=""15%""></td>" & vbLF & _
				"	<td width=""12%""></td>" & vbLF & _
				"	<td width=""12%""></td>" & vbLF & _
				"	<td width=""12%""></td>" & vbLF & _
				"	<td width=""12%""></td>" & vbLF & _
				"	<td width=""12%""></td></tr>" & vbLF & _
				"<tr height=20>" & _
				"<td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"">准备采购物品</td></tr>" & _
				sTemp & vbLF & _
				"</table>" & vbLF & _
				ActionLink2 & vbLF
End Function

'*******************************************************************************
Function ActionLink1
		ActionLink1 = _
			"<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=""CheckAllRows1();"">全部选中</td>" & vbLF & _
			"		<td align=center" & _
						" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnInput_OnClick();"">添加</td>" & vbLF & _
			"</tr>" & vbLF & _
			"</table>" & vbLF
End Function

'*******************************************************************************
Function ActionLink2
		ActionLink2 = _
			"<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=""CheckAllRows2();"">全部选中</td>" & vbLF & _
			"		<td align=center" & _
						" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnOutput_OnClick();"">剔除</td>" & vbLF & _
			"</tr>" & vbLF & _
			"</table>" & vbLF
End Function

'*******************************************************************************
function TableAction()
	TableAction = _
		"<table width=""100%"" cellspacing=0 cellpadding=5 height=30 align=center>" & vbLF & _
		"<tr height=60>" & _
		"	<td align=center colspan=8>" & _
		"		<a title=""选择需要采购的物品,点击按钮进入采购单页面"" style=""cursor:hand"" onclick=""btnNext_OnClick();""><img border=0 src=""../images/arrowr.gif"">&nbsp;进入定制采购单页面</a>" & vbLF & _
		"		&nbsp;&nbsp;&nbsp;" & _
		"		<a title=""放弃处理"" style=""cursor:hand"" onclick=""btnCancel_OnClick();""><img border=0 src=""../images/edit.gif"">&nbsp;放弃处理</a>" & vbLF & _
		"   </td>" & vbLF & _
		"	</tr>" & vbLF & _
		"</form></table>"
end function

'*******************************************************************************
sub Input(choose1)
	dim arrayInput, sGoodsID, j
	dim sSQL1

'	response.write choose & "<br>"
'	response.end

	arrayInput = split(choose1, ",")
'	response.Write arrayInput(0) & "<br>"
'	response.end
	for j = 0 to UBound(arrayInput) step 1
			sGoodsID = GetParam("goods_id1_" & Trim(arrayInput(j))) 
			sSQL1 = "update t_goods set remind_status = 4 where goods_id = " & sGoodsID			
			call Openrs(conn, sSQL1)
	next
end sub

'*******************************************************************************
sub Output(choose2)
	dim arrayOutput, sGoodsID, j
	dim sSQL2

	arrayOutput = split(choose2, ",")
	for j = 0 to UBound(arrayOutput) step 1
			sGoodsID = GetParam("goods_id2_" & Trim(arrayOutput(j))) 
			sSQL2 = "update t_goods set remind_status = 2 where goods_id = " & sGoodsID
'			response.Write sSQL2 & "<br>"
			call Openrs(conn, sSQL2)
	next
end sub

'*******************************************************************************
sub NextStep()

	dim pIsTemp : pIsTemp = "0"
	Response.Redirect "purchase_edit.asp?is_temp=" & pIsTemp
end sub
'*******************************************************************************
sub Cancel()
  dim sql
  sql = "update t_goods set remind_status = 2 where remind_status = 4"
  call Openrs(conn,sql)
  response.redirect "../stock/output.asp"
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=""../purchase/purchase_mgr.asp"">采购单管理</a></td>" & vbLF & _
		"</tr>" & vbLF & _
		"</table>" & vbLF
End Function
%>

⌨️ 快捷键说明

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