📄 chukusave.asp
字号:
<%xian=session("xian")
ljl_xian=mid(xian,31,1)
if ljl_xian<>1 then%>
<script language=vbscript>
MsgBox "错误:您无权使用本功能模块,如果确实需要操作本模块的权限,请与管理员联系!"
location.href = "../config/txt.asp"
</script>
<%end if%>
<!--#include file="bkconn.asp"-->
<%
'获取数据
scaozuoren=Session("ljl_add")
ziduan=request.form("a1")
sa1=left(ziduan,Instr(ziduan,"|")-1) '获取材料名称
sa3=mid(ziduan,Instr(ziduan,"|")+1,InstrRev(ziduan,"|")-Instr(ziduan,"|")-1)'型号
sa5=right(ziduan,len(ziduan)-InstrRev(ziduan,"|")) '单位
sip = Request.ServerVariables("REMOTE_ADDR")
sa4=request.form("a4")
sa6=request.form("a6")
sa8=request.form("a8")
sa9=request.form("a9")
lingliaodanwei=request.form("lingliaodanwei")
shuliang2=request.form("shuliang2")
shuliang3=request.form("shuliang3")
shuliang4=request.form("shuliang4")
shuliang5=request.form("shuliang5")
cailiao2=request.form("cailiao2")
cailiao3=request.form("cailiao3")
cailiao4=request.form("cailiao4")
cailiao5=request.form("cailiao5")
if shuliang2="" then '如果数量为空,则表示没有选择要领此材料,所以将材料名称也置为空
shuliang2=0
cailiao2="空"
end if
if shuliang3="" then
shuliang3=0
cailiao3="空"
end if
if shuliang4="" then
shuliang4=0
cailiao4="空"
end if
if shuliang5="" then
shuliang5=0
cailiao5="空"
end if
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
ssj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
'检验数据合法性
if sa1="" or sa8="" or not isnumeric(sa6) or not isnumeric(shuliang2) or not isnumeric(shuliang3) or not isnumeric(shuliang4) or not isnumeric(shuliang5) then
%>
<script language=vbscript>
MsgBox "错误:提交的表单中不能有空,或者数量您填写了不是数字,请返回核对!"
location.href = "chukushenqing.asp"
</script>
<%else
'写入记录
conn.execute("insert into 出库(材料名称,规格型号,领料用途,单位,数量,备注,领料人,ip,当前状态,材料名称2,材料名称3,材料名称4,材料名称5,数量2,数量3,数量4,数量5,领料单位,申请时间) values('" &sa1 &"','" &sa3 &"','" &sa4 &"','" &sa5 &"','" &sa6 &"','" &sa9 &"','" &sa8 &"','" &sip &"','申请','" &cailiao2 &"','" &cailiao3 &"','" &cailiao4 &"','" &cailiao5 &"','" &shuliang2 &"','" &shuliang3 &"','" &shuliang4 &"','" &shuliang5 &"','" &lingliaodanwei &"','" &ssj &"')")
%>
<script language=vbscript>
MsgBox "材料领用保存成功,请等待供应会计审核!"
location.href = "chukushenqing.asp"
</script>
<%end if
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -