📄 purchase_new.inc
字号:
<%
'###############################################################################
'#
'# 文件名 : purchase_new.inc
'#
'# 创建人 : yaoxiaohui
'# 日期 : 2002-11-06
'#
'# 修改历史 : ****年**月**日 ******
'# 修改内容 : *********************************
'#
'# 功能描述 : 函数文件
'# 版 本 : v1.0
'#
'# Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'###############################################################################
'*******************************************************************************
Function SessionDetail()
SessionDetail = _
"<form name=""frmDetail"" method=post action=""" & sFileName & """>" & vbLF & _
"<input type=""hidden"" name=""FormAction"">" & vbLF & _
"<table cellspacing=0 cellpadding=3 width=""100%"" align=center border=0>" & vbLF & _
"<tr height=20>" & _
"<td colspan=8 bgcolor=""black"" align=center style=""color:white;font-weight:600"">填写需采购物品记录</td></tr>" & _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td width=90 align=right>名称:</td>" & vbLF & _
" <td width=75 align=left><input type=""text"" name=""goods_name"" value=""" & pGoodsName & """ size=12 maxlength=20>" & vbLF & _
" <td width=90 align=right>型号规格:</td>" & vbLF & _
" <td width=75 align=left><input type=""text"" name=""model"" value=""" & pModel & """ size=12 maxlength=20>" & vbLF & _
" <td width=60 align=right>单位:</td>" & vbLF & _
" <td width=75 align=left><input type=""text"" name=""unit"" value=""" & pUnit & """ size=12 maxlength=20>" & vbLF & _
" <td width=60 align=right>数量:</td>" & vbLF & _
" <td width=75 align=left><input type=""text"" name=""quantity"" value=""" & pQuantity & """ size=12 maxlength=20>" & vbLF & _
" </tr>" & vbLF & _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td align=right>备注:</td>" & vbLF & _
" <td align=left colspan=8><textarea name=""remark"" rows=3 cols=87>" & pRemark & "</textarea></td>" & _
" </tr>" & vbLF & _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td align=center colspan=8>" & _
" <span style=""cursor:hand"" title=""添加记录!"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnAdd_OnClick();"">" & _
" <img border=0 src=""../images/input.gif"" style=""vertical-align:middle"">添加记录</span>" & vbLF & _
" " & _
" <span title=""选中全部,准备剔除"" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""CheckAllRows();"">" & _
" <img border=0 src=""../images/task.gif"" style=""vertical-align:middle"">全部选中</span>" & _
" " & _
" <span title=""选定需要剔除的物品,点击剔除"" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnOutput_OnClick();"">" & _
" <img border=0 src=""../images/output.gif"" style=""vertical-align:middle"">物品剔除</span>" & _
" " & _
" <span style=""cursor:hand"" title=""清空购物表!"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnCancel_OnClick();"">" & _
" <img border=0 src=""../images/delete.gif"" style=""vertical-align:middle"">清空购物表</span></td></tr>" & vbLF & _
" <tr height=10 bgcolor=white><td colspan=8></td></tr>" & vbLF & _
"</table>" & vbLF
End Function
'*******************************************************************************
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=60>这一行仅用于控制表格的宽度</td>" & vbLF & _
" <td width=60></td>" & vbLF & _
" <td width=100></td>" & vbLF & _
" <td width=90></td>" & vbLF & _
" <td width=60></td>" & vbLF & _
" <td width=80></td>" & vbLF & _
" <td width=150></td></tr>" & vbLF & _
"<tr height=20>" & _
"<td colspan=7 bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"">需采购物品和设备清单</td></tr>" & _
"<tr bgcolor=white>" & _
"<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()
dim sTemp : sTemp = "" '' 临时字符串变量
dim j '' 临时循环变量
dim myArray,inputArray, str, str2
str = session("i_array")
myArray = split(str,"#@$#")
dim iCounter : iCounter = 1
dim rowCount : rowCount = 0
dim sGoodsName, sModel, sUnit, sQuantity, sRemark
for j = 1 to UBound(myArray) step 1
rowCount = rowCount + 1
str2 = myArray(j)
inputArray = split(str2,"#^^#")
sGoodsName = inputArray(0)
sModel = inputArray(1)
sUnit = inputArray(2)
sQuantity = inputArray(3)
sRemark = inputArray(4)
sTemp = sTemp & "<tr bgcolor=white height=20>" & _
"<td align=center nowrap> " & rowCount & " </td>" & _
"<input type=""hidden"" name=""id"" value=""" & rowCount &""">" & _
"<td align=center><input type=""checkbox"" id=choose_" & rowCount & " name=""choose"" value=""" & rowCount & """ style=""border-width:0""></td>" & vbLF & _
"<td align=center title=""" & sGoodsName & """ nowrap> " & sGoodsName & " </td>" & _
"<input type=""hidden"" name=""goods_name_" & rowCount & """ value=""" & sGoodsName &""">" & _
"<td align=center title=""" & sModel & """ nowrap> " & sModel & " </td>" & _
"<input type=""hidden"" name=""model_" & rowCount & """ value=""" & sModel &""">" & _
"<td align=center title=""" & sUnit & """ nowrap> " & sUnit & " </td>" & _
"<input type=""hidden"" name=""unit_" & rowCount & """ value=""" & sUnit &""">" & _
"<td align=center title=""" & sQuantity & """ nowrap> " & sQuantity & " </td>" & _
"<input type=""hidden"" name=""quantity_" & rowCount & """ value=""" & sQuantity &""">" & _
"<td align=center title=""" & sRemark & """ nowrap> " & sRemark & " </td>" & _
"<input type=""hidden"" name=""remark_" & rowCount & """ value=""" & sRemark &""">" & _
"</tr>"
iCounter = iCounter + 1
next
' 填补空白行
sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)
TableRecords = _
sTemp & _
"<input type=""hidden"" name=""row_count"" value=""" & rowCount &""">" & _
" <tr height=30 bgcolor=white>" & vbLF & _
" <td colspan = 7 align=center>" & _
" <span title=""填写购买物品清单,然后点击按钮进行下一购买步骤!"" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnNext_OnClick();"">" & _
" <img border=0 src=""../images/arrowr.gif"" style=""vertical-align:middle"">确定清单</span>" & vbLF & _
" " & _
" <span title=""放弃购买"" style=""cursor:hand"" onmouseover=""mover();"" onmouseout=""mout();"" onclick=""btnCancel_OnClick();"">" & _
" <img border=0 src=""../images/delete.gif"" style=""vertical-align:middle"">放弃购买</span>" & _
" </td>" & vbLF & _
" </tr></form>" & vbLF
End Function
'******************************************************************************
Sub AddinSession()
dim strx,stry
pGoodsName = GetParam("goods_name")
pModel = GetParam("model")
pUnit = GetParam("unit")
pQuantity = GetParam("quantity")
pRemark = GetParam("remark")
stry = session("i_array")
session.contents.remove "i_array"
strx = pGoodsName & "#^^#" & pModel & "#^^#" & pUnit & "#^^#" & pQuantity & "#^^#" & pRemark
stry = stry & "#@$#" & strx
session("i_array") = stry
End Sub
'******************************************************************************
Sub Cancel()
Session.Contents.Remove "i_array"
dim str : str = ""
session("i_array") = str
response.redirect "purchase_new.asp"
End Sub
'******************************************************************************
Sub Output(choose)
dim j, i, k, myArray, outputArray, sID, str, str2
outputArray = split(choose,",")
k = 0
for j = 0 to UBound(outputArray) step 1
sID = outputArray(j)
' response.write sID & "<br>"
sID = sID - k
str = session("i_array")
Session.Contents.Remove "i_array"
myArray = split(str,"#@$#")
i = 0
str2 = ""
for i = 1 to UBound(myArray)
' response.write myArray(i) & "<br>"
if i <> CInt(sID) then
str2 = str2 & "#@$#" & myArray(i)
' response.write "hi<br>"
end if
next
' response.write str2 & "<br>"
session("i_array") = str2
k = k + 1
next
End Sub
'******************************************************************************
Function NextForPurchase()
dim pIsTemp : pIsTemp = 1
response.redirect "purchase_edit.asp?is_temp=" & pIsTemp
End Function
'*******************************************************************************
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> " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../purchase/purchase_remind.asp"">采购提醒处理</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <a href=""../stock/goods_query.asp"">库存查询</a>" & vbLF & _
" " & vbLF & _
" <img src=""../images/goto.gif""> <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 + -