📄 update_ruku_sav.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!-- #include file="../common/conn.asp" -->
<!-- #include file="../common/status.html" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改入库清单</title>
<% if session("admin_id")="" then %>
您还没有登录或者您的权限不够,五秒钟后自动返回登录,如果您的浏览器没有自动返回,请<a href="file:///E|/admin/login.html">点击登录</a>。
<meta http-equiv="refresh" content="5;URL=url=/login.html">
<% else %>
</head>
<body background="../img/updateBG.gif">
<%
dim rs,sql,pid,intype,place,indate,num,price,handle,remark
set rs=server.createobject("adodb.recordset")
pid=trim(request("inPID"))
if trim(request("inType"))="" then
errmsg=errmsg+"<br>"+"<li>入库类型不能为空"
founderr=true
else
intype=trim(request("inType"))
end if
if trim(request("Place"))="" then
errmsg=errmsg+"<br>"+"<li>入库地点不能为空"
founderr=true
else
place=trim(request("Place"))
end if
if trim(request("Date"))="" then
errmsg=errmsg+"<br>"+"<li>入库日期不能为空"
founderr=true
else
indate=trim(request("Date"))
end if
if trim(request("Num"))="" then
errmsg=errmsg+"<br>"+"<li>入库数量不能为空"
founderr=true
else
num=trim(request("Num"))
if Num=0 then
errmsg=errmsg+"<br>"+"<li>入库数量不能为零"
founderr=true
end if
end if
if trim(request("Price"))="" then
errmsg=errmsg+"<br>"+"<li>入库单价不能为空"
founderr=true
else
price=trim(request("Price"))
end if
if trim(request("Handle"))="" then
errmsg=errmsg+"<br>"+"<li>经手人不能为空"
founderr=true
else
handle=trim(request("Handle"))
end if
remark=trim(request("Remark"))
%>
<div align="center">
<center>
<table border="0" width="600" cellspacing="0" cellpadding="0">
<%
if founderr=false then
sql="select * from scott.stock_management where sm_id="&request("id")
rs.open sql,connstr,3,3
oldnum=rs("sm_innum")
oldpid=rs("sm_inpid")
rs("sm_inpid")=pid
rs("sm_intype")=intype
rs("sm_inplace")=place
rs("sm_indate")=indate
rs("sm_innum")=num
rs("sm_inprice")=price
rs("sm_handle")=handle
rs("sm_remark")=remark
rs.update
rs.close
sql="select product_stocknum from scott.Product_info where product_num='"&pid&"'"
rs.open sql,connstr,3,3
if pid=oldpid then
rs("product_stocknum")=cint(rs("product_stocknum"))-cint(oldnum)+cint(num)
rs.update
else
rs("product_stocknum")=cint(rs("product_stocknum"))+cint(num)
rs.update
rs.close
sql="select product_stocknum from scott.Product_info where product_num='"&oldpid&"'"
rs.open sql,connstr,3,3
rs("product_stocknum")=cint(rs("product_stocknum"))-cint(oldnum)
rs.update
rs.close
end if
set rs=nothing
%>
<tr bgcolor="#999999">
<td height="30" align="center" colspan="4">入库清单修改成功</td>
<tr>
<td width="30%" height="30" align="right">入库产品编号:</td>
<td width="20%"><%=pid%></td>
<td width="20%" align="right">入库类型:</td>
<td width="30%"><%=intype%></td>
</tr>
<tr>
<td height="30"><div align="right"> 入库地点:</div></td>
<td><%=place%></td>
<td><div align="right">入库日期:</div></td>
<td><%=indate%></td>
</tr>
<tr>
<td height="30"><div align="right"> 入库数量:</div></td>
<td><%=num%></td>
<td><div align="right"> 入库单价:</div></td>
<td><%=price%></td>
</tr>
<tr>
<td height="30"><div align="right"> 经手人:</div></td>
<td><%=handle%></td>
<td><div align="right"> </div></td>
<td> </td>
</tr>
<tr>
<td height="30"><div align="right">备注:</div></td>
<td colspan="3"><%=remark%></td>
</tr>
<tr align="center">
<td height="30" colspan="4"><a href="update_ruku.asp">修改入库清单</a> <a href="all_ruku.asp">浏览全部入库清单</a> <a href="index.asp">返回主页</a></td>
</tr>
<%else%>
<meta http-equiv="refresh" content="3;url=javascript:history.go(-1)">
<tr>
<td width="600" height="20" align="center">输入的入库清单有问题</td>
</tr>
<tr>
<td><%=errmsg%></td>
</tr>
<tr><td> </td></tr>
<tr><td align="center"><a href="javascript:history.go(-1)"><font size="-1">三秒钟后自动返回到上一页,如果您的浏览器没有返回,请单击此处</font></a></td></tr>
<%end if%>
</table>
</center>
</div>
</body>
<% end if %>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -