📄 process.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>仓库</title>
</head>
<body leftmargin="10" rightmargin="0" topmargin="10">
<form name="form1" method="post" action="">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="42%"><b>处理结果</b></td>
<td width="17%"></td>
<td width="41%"> <div align="right"> </div></td>
</tr>
</table>
<%
'合同发货保留处理
dim connection
set connection=server.CreateObject("adodb.connection")
connection.Open connstring
if Request.Form("processtype")="deliverysend" then
if Request.Form("linecount")>0 then
for k=1 to csng(Request.Form("linecount"))
available=getlocationmaxavailable(csng(Request.Form("product"&k)),csng(Request.Form("sendlocation"&k)))
'available=40
if csng(Request.Form("reserveqty"&k))=0 then
if available<csng(Request.Form("sendqty"&k)) then
Response.Write Request.Form("model"&k)&"可用量不足,发货失败,可用量为:"&available
Response.End
end if
else
if available+csng(Request.Form("reserveqty"&k))<csng(Request.Form("sendqty"&k)) then
Response.Write Request.Form("model"&k)&"可用量不足,发货失败,可用量为:"&available+csng(Request.Form("reserveqty"&k))
Response.End
end if
end if
next
end if
if Request.Form("linecount")<>"" then
for i=1 to Request.Form("linecount")-1
if Request.Form("reserveqty"&i)>0 then
if csng(Request.Form("sendqty"&i))<csng(Request.Form("reserveqty"&i)) then
sql="update orderreserve set qty=qty-"&Request.Form("sendqty"&i)&" where orderlineid="&Request.Form("orderlineid"&i)&" and productid="&request("product"&i)
else
sql="delete from orderreserve where orderlineid="&Request.Form("orderlineid"&i)&" and productid="&request("product"&i)
end if
set rsu=connection.Execute(sql)
end if
next
end if
end if
'其他发货保留检查
if Request.Form("processtype")="othersend" then
available=getlocationmaxavailable(csng(Request.Form("product1")),csng(Request.Form("sendlocation1")))
if csng(Request.Form("sendqty"))>csng(available) then
Response.Write "可用量不足,发货失败,可用量为:"&available
Response.End
end if
end if
'采购退货保留检查
if Request.Form("processtype")="poreturn" then
if Request.Form("linecount")<>"" then
for i=1 to Request.Form("linecount")-1
if Request.Form("sendqty"&i)>0 then
available=getmaxavailable(request("product"&i))
if csng(Request.Form("sendqty"&i))>csng(available) then
Response.Write Request.Form("model"&i)&"可用量不足,退货失败,可用量为:"&available
Response.End
end if
end if
next
end if
end if
'货位移动保留检查
if Request.Form("processtype")="move" then
available=getlocationmaxavailable(Request.Form("product1"),Request.Form("sendlocation1"))
if csng(Request.Form("sendqty"))>csng(available) then
Response.Write Request.Form("model"&i)&"可用量不足,移动失败,可用量为:"&available
Response.End
end if
end if
'物流承运信息
if Request.Form("processtype")="deliverysend" then
sql="update delivery set deliverycompany='"&request("deliverycompany")&"',deliverycontact='"&request("deliverycontact")&"',deliveryphone='"&request("deliveryphone")&"',deliverydate='"&request("deliverydate")&"',deliverynum='"&request("deliverynum")&"',deliveryexpense='"&request("deliveryexpense")&"' where deliveryid="&request("deliveryid")
connection.Execute(sql)
end if
dim obj
set obj=server.CreateObject("SmartSales.Delivery")
obj.Delivery()
set obj=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -