📄 input_chuku_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/inputBG.gif">
<%
dim rs,sql,outpid,outtype,place,outdate,num,price,handle,remark,SaleNum,Arrearage,oweNum
dim CreditTime,ReturnData,ReturnNum
set rs=server.createobject("adodb.recordset")
outpid=trim(request("outPID"))
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
outdate=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("SaleNum"))="" then
errmsg=errmsg+"<br>"+"<li>销售项号不能为空"
founderr=true
else
salenum=trim(request("SaleNum"))
end if
if trim(request("Handle"))="" then
errmsg=errmsg+"<br>"+"<li>经手人不能为空"
founderr=true
else
handle=trim(request("Handle"))
end if
if request.form("Arrearage")="no" then
Arrearage="否"
else
if trim(request("oweNum"))="" then
errmsg=errmsg+"<br>"+"<li>欠款数量不能为空"
founderr=true
else
oweNum=trim(request("oweNum"))
end if
if trim(request("CreditTime"))="" then
errmsg=errmsg+"<br>"+"<li>信用时间不能为空"
founderr=true
else
CreditTime=trim(request("CreditTime"))
end if
arrearage="是"
end if
remark=trim(request("Remark"))
if founderr=false then
sql="select product_stocknum,product_salenum from scott.Product_info where product_num='"&outpid&"'"
rs.open sql,connstr,3,3
stocknum=cint(rs("product_stocknum"))-cint(num)
if stocknum>=0 then
rs("product_stocknum")=stocknum
rs("product_salenum")=cint(rs("product_salenum"))+cint(num)
rs.update
else
errmsg=errmsg+"<br>"+"<li>出库数量大于库存数量"
founderr=true
end if
rs.close
end if
%>
<div align="center">
<center>
<table border="0" width="600" cellspacing="0" cellpadding="0">
<%
if founderr=false then
sql="select * from scott.Stock_Management order by sm_id"
rs.open sql,connstr,3,3
if rs.eof then
id=1
else
rs.movelast
id=cint(rs("sm_id"))+1
end if
rs.addnew
rs("sm_id")=id
rs("sm_outpid")=outpid
rs("sm_outplace")=place
rs("sm_outdate")=outdate
rs("sm_outnum")=num
rs("sm_outprice")=price
rs("sm_salenum")=SaleNum
rs("sm_arrearage")=arrearage
rs("sm_handle")=handle
rs("sm_num")=owenum
rs("sm_credittime")=CreditTime
rs("sm_returndate")=ReturnData
rs("sm_returnnum")=ReturnNum
rs("sm_remark")=remark
rs.update
rs.close
set rs=nothing
%>
<tr>
<td height="20" align="center" bgcolor="#989DA5" colspan="4">出库清单添加成功</td>
<tr>
<td height="30" colspan="2">请输入出库清单信息:</td>
<td width="20%" align="right"> </td>
<td width="40%"> </td>
</tr>
<tr>
<td width="20%" height="30" align="right">出库产品型号:</td>
<td width="20%" height="30"><%=outPID%></td>
<td align="right"> </td>
<td> </td>
</tr>
<tr>
<td height="30"><div align="right"> 出库地点:</div></td>
<td height="30"><%=place%></td>
<td><div align="right">出库日期:</div></td>
<td><%=outdate%></td>
</tr>
<tr>
<td height="30"><div align="right"> 出库数量:</div></td>
<td height="30"><%=num%></td>
<td><div align="right"> 出库单价:</div></td>
<td><%=price%></td>
</tr>
<tr>
<td height="30"><div align="right">销售项号:</div></td>
<td height="30"><%=SaleNum%></td>
<td><div align="right">经手人: </div></td>
<td><%=handle%> </td>
</tr>
<tr>
<td height="30"><div align="right">是否欠款:</div></td>
<td height="30"><%=Arrearage%></td>
<td><div align="right"></div></td>
<td> </td>
</tr>
<% if arrearage="是" then %>
<tr>
<td height="30"><div align="right">欠款数量:</div></td>
<td height="30"><%=oweNum%></td>
<td><div align="right">信用时间:</div></td>
<td><%=CreditTime%></td>
</tr>
<% end if %>
<tr>
<td height="30"><div align="right">备注:</div></td>
<td height="30" colspan="3"><%=remark%></td>
</tr>
<tr align="center">
<td height="30" colspan="4"><a href="update_chuku.asp">修改删除出库清单</a> <a href="input_chuku.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="30" align="center">输入的出库清单有问题</td>
</tr>
<tr>
<td height="30"><%=errmsg%></td>
</tr>
<tr>
<td height="30"> </td>
</tr>
<tr>
<td height="30" 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 + -