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

📄 goods_move.inc

📁 物业管理和办公自动化系统
💻 INC
📖 第 1 页 / 共 2 页
字号:
	' 获取数据库连接
	'------------------------------------
	dim rs	: set rs = Openrs(conn,sSQL)

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

	if rs.EOF then
    iCols			= 9 
	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("id")
		sGoodsName		    	= rs("goods_name")
		sModel			        = rs("model")
		sUnit		        	= rs("unit")
		sQuantity	    		= rs("quantity")
		sGoodsType		    	= rs("type_desc")
		sInputMethod	        = rs("input_method")		
		sCurrentStatus	   		= rs("current_status")
		sDepotID		    	= rs("depot_name")	

        select case sInputMethod
		    case "1"
			sInputMethod = "采购入库"
			case "2"
			sInputMethod = "移交入库"
			case "3"
			sInputMethod = "归还入库"
		end select

       select case sCurrentStatus
		    case "1"
			sCurrentStatus = "在库中"
			case "2"
			sCurrentStatus = "已借出"
			case "3"
			sCurrentStatus = "已报废"
			case "4"
			sCurrentStatus = "已退货"
			case "5"
			sCurrentStatus = "已领用"
			case "6"
			sCurrentStatus = "已移出"
			case "7"
			sCurrentStatus = "待选择"
		end select

		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;</td>" & _
				"<td align=center title=""" & sInputMethod & """ nowrap>&nbsp;" & sInputMethod & "&nbsp;</td>" & _
				"<td align=center title=""" & sCurrentStatus & """ nowrap>&nbsp;" & sCurrentStatus & "&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=75>这一行仅用于控制表格的宽度</td>" & vbLF & _
		        "	<td width=35></td>" & vbLF & _
         		"	<td width=75></td>" & vbLF & _
	        	"	<td width=40></td>" & vbLF & _
	        	"	<td width=75></td>" & vbLF & _
	        	"	<td width=75></td>" & vbLF & _
	        	"	<td width=75></td>" & vbLF & _
	        	"	<td width=75></td>" & vbLF & _
	        	"	<td width=75></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>" & _
		"		<a title=""选择需要移动的物品和设备"" style=""cursor:hand"" onclick=""btnNext_OnClick();""><img border=0 src=""../images/arrowr.gif"">&nbsp;进入物品移动页面</a>" & vbLF & _
		"    &nbsp;&nbsp;&nbsp;&nbsp;" & _
		"		<a title=""放弃移动"" style=""cursor:hand"" onclick=""btnCancel_OnClick();""><img border=0 src=""../images/delete.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 current_status = 7 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 current_status = 1 where goods_id = " & sGoodsID
'			response.Write sSQL2 & "<br>"
			call Openrs(conn, sSQL2)
	next
end sub

'*******************************************************************************
sub NextStep()
	Response.Redirect "goods_move_master.asp"
	response.end
end sub
'*******************************************************************************
sub Cancel()
  dim sql
  sql = "update t_goods set current_status = 1 where current_status = 7"
  call Openrs(conn,sql)
  response.redirect "goods_query.asp"
  response.end
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/goods_input.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/sheet_mgr.asp"">出入库单管理</a></td>" & vbLF & _
		"</tr>" & vbLF & _
		"</table>" & vbLF
End Function
%>

⌨️ 快捷键说明

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