📄 delivery.asp
字号:
return;
}
form2.submit();
}
</script>
<%'其他发货#############################################################################################################
elseif Request("type")="othersend" then%>
<form name="form1" method="post" action="">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font class=title>其他发货</font></strong></td>
</tr>
<tr >
<td height="16" colspan="3" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
</form>
<form name="form2" id="form2" method="post" action="process.asp">
<input type=hidden name=processtype value="othersend">
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor=efefef>
<tr>
<td height=20 align=left nowrap bgcolor="DEDFDE"><div align="center">产品</div></td>
<td width="15%" nowrap bgcolor="efefef"><input type=hidden name=product1>
<input type=text name=product1name size=12> <input type=button name=bproduct13 onClick="JavaScript:opensubwin7('form2','product1','price1')" value="..." class=black>
<input type=hidden name=price1></td>
<td width="5%" align=left nowrap bgcolor="DEDFDE"><div align="center">数量</div></td>
<td width="15%" bgcolor="efefef"><input type=text name=sendqty size=12></td>
</tr>
<tr>
<td height=20 align=left nowrap bgcolor="DEDFDE"><div align="center">货位</div></td>
<td nowrap bgcolor="efefef"><input name="sendlocation1" type="hidden"> <input name="sendlocation1name" type="text" size="12" value="">
<input type="button" name="bnsendlocation12" onClick="JavaScript:if(form2.product1.value==''){alert('请先选择产品');}else{opensubwin2('form2','sendlocation1',form2.product1.value,'1')}" value=... class=black>
<input type=hidden name=available1><input type=hidden name=nonnet1> </td>
<td align=left nowrap bgcolor="DEDFDE"><div align="center">发货原因</div></td>
<td bgcolor="efefef"><select name=sendreason>
<option value=""></option>
<%getdefine2 "其他收/发原因",""%>
</select></td>
</tr>
<tr>
<td width=5% height=20 align=left nowrap bgcolor="DEDFDE"><div align="center">备注</div></td>
<td colspan="3" nowrap bgcolor="efefef"> <textarea name="description" cols="45" rows="5"></textarea>
<div align="center"></div></td>
</tr>
</table>
<table width=100%>
<tr>
<td height=30 align=center></td>
</tr>
</table>
<table width=100%>
<tr><td height=20 align=center><input type=button value="发货" onclick="send()" id=button1 name=button1></td></tr>
</table>
</form>
<script language=javascript>
function send(){
if (form2.sendlocation1.value==''){
alert('请选择发货货位!');
form2.sendlocation1.focus();
return;
}
if (form2.sendqty.value=='' || form2.sendqty.value<=0 || isNaN(form2.sendqty.value)){
alert('请输入正确的发货数量!');
form2.sendqty.focus();
return;
}
//if (parseInt(form2.sendqty.value)>parseInt(form2.available1.value)){
// alert('可用库存量不足,可用量为:'+form2.available1.value);
// form2.sendqty.focus();
// return;
//}
if (form2.sendreason.value==''){
alert('请输入发货原因!');
form2.sendreason.focus();
return;
}
form2.submit();
}
</script>
<%'其他收货#############################################################################################################
elseif Request("type")="otherreceive" then%>
<form name="form1" method="post" action="">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font class=title>其他收货</font></strong> </td>
</tr>
<tr >
<td height="16" colspan="3" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
</form>
<form name="form2" id="form2" method="post" action="process.asp">
<input type=hidden name=processtype value="otherreceive">
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td height=20 align=left nowrap bgcolor="DEDFDE"><div align="center">产品</div></td>
<td width=15% nowrap bgcolor="efefef"><input type=hidden name=product1>
<input type=text name=product1name size=12> <input type=button name=bproduct12 onClick="JavaScript:opensubwin7('form2','product1','price1')" value="..." class=black>
<input type=hidden name=price1></td>
<td width=5% align=left nowrap bgcolor="DEDFDE"><div align="center">数量</div></td>
<td width=15% bgcolor="efefef"><input type=text name=receiveqty size=12></td>
</tr>
<tr>
<td height=20 align=left nowrap bgcolor="DEDFDE"><div align="center">收到货位</div></td>
<td nowrap bgcolor="efefef"><input name="location" type="hidden"> <input name="locationname" type="text" size="12" value="">
<input type="button" name="bnlocation2" onClick="JavaScript:if(form2.product1.value==''){alert('请先选择产品');}else{opensubwin2('form2','location')}" value=... class=black>
</td>
<td align=left nowrap bgcolor="DEDFDE"><div align="center">成本</div></td>
<td bgcolor="efefef"><input type=text name=cost size=12></td>
</tr>
<tr>
<td height=20 align=left nowrap bgcolor="DEDFDE"><div align="center">收货原因</div></td>
<td nowrap bgcolor="efefef"><select name=receivereason>
<option value=""></option>
<%getdefine2 "其他收/发原因",""%>
</select></td>
<td align=left nowrap bgcolor="DEDFDE"><div align="center"></div></td>
<td bgcolor="efefef"> </td>
</tr>
<tr>
<td width=5% height=20 align=left nowrap bgcolor="DEDFDE"><div align="center">备注</div></td>
<td colspan="3" nowrap bgcolor="efefef"> <textarea name="description" cols="45" rows="5"></textarea>
<div align="center"></div></td>
</tr>
</table>
<table width=100%>
<tr>
<td height=30 align=center></td>
</tr>
</table>
<table width=100%>
<tr><td height=20 align=center><input type=button value="收货" onclick="send()" id=button1 name=button1></td></tr>
</table>
</form>
<script language=javascript>
function send(){
if (form2.location.value==''){
alert('请选择收货货位!');
form2.location.focus();
return;
}
if (form2.receiveqty.value=='' || form2.receiveqty.value<=0 || isNaN(form2.receiveqty.value)){
alert('请输入正确的收货数量!');
form2.receiveqty.focus();
return;
}
if (form2.cost.value=='' || form2.cost.value<=0 || isNaN(form2.cost.value)){
alert('请输入正确的成本!');
form2.cost.focus();
return;
}
if (form2.receivereason.value==''){
alert('请输入收货原因!');
form2.receivereason.focus();
return;
}
form2.submit();
}
</script>
<%'货位移动#############################################################################################################
elseif Request("type")="move" then%>
<form name="form1" method="post" action="">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font class=title>货位移动</font></strong></td>
</tr>
<tr >
<td height="16" colspan="3" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
</form>
<form name="form2" id="form2" method="post" action="process.asp">
<input type=hidden name=processtype value="move">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor=efefef>
<tr>
<td width=5% height=20 align=left nowrap bgcolor="DEDFDE">产品</td>
<td width=15% nowrap bgcolor="efefef">
<input type=hidden name=product1>
<input type=text name=product1name size=12>
<input type=button name=bproduct1 onClick="JavaScript:opensubwin7('form2','product1','price1')" value="..." class=black>
<input type=hidden name=price1>
</td>
<td width=5% align=left nowrap bgcolor="DEDFDE">移出货位</td><input type=hidden name=nonnet1>
<td width=15% bgcolor="efefef">
<input name="sendlocation1" type="hidden"><input name="sendlocation1name" type="text" size="12" value=""><input type="button" name="bnsendlocation1" onClick="JavaScript:if(form2.product1.value==''){alert('请先选择产品');}else{opensubwin2('form2','sendlocation1',form2.product1.value,'1')}" value=... class=black><input type=hidden name=available1>
</td>
<td width=5% align=left nowrap bgcolor="DEDFDE">数量</td>
<td width=15% bgcolor="efefef">
<input type=text name=sendqty size=12>
</td>
<td width=5% align=left nowrap bgcolor="DEDFDE">移入货位</td>
<td width=15% bgcolor="efefef">
<input name="location" type="hidden"><input name="locationname" type="text" size="12" value=""><input type="button" name="bnlocation" onClick="JavaScript:if(form2.product1.value==''){alert('请先选择产品');}else{opensubwin2('form2','location')}" value=... class=black>
</td>
</tr>
</table>
<table width=100%>
<tr><td height=50 align=center></td></tr>
</table>
<table width=100%>
<tr><td height=20 align=center><input type=button value="移动" onclick="send()" id=button1 name=button1></td></tr>
</table>
</form>
<script language=javascript>
function send(){
if (form2.sendlocation1.value==''){
alert('请选择移出货位!');
form2.sendlocation1.focus();
return;
}
if (form2.sendqty.value=='' || form2.sendqty.value<=0 || isNaN(form2.sendqty.value)){
alert('请输入正确的移动数量!');
form2.sendqty.focus();
return;
}
//if (parseInt(form2.sendqty.value)>parseInt(form2.available1.value)){
// alert('可用库存量不足,可用量为:'+form2.available1.value);
// form2.sendqty.focus();
// return;
//}
if (form2.location.value==''){
alert('请选择移入货位!');
form2.location.focus();
return;
}
form2.submit();
}
</script>
<%'采购退货#############################################################################################################
elseif Request("type")="poreturn" then%>
<form name="form1" method="post" action="">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font class=title>采购退货</font></strong> </td>
</tr>
<tr >
<td height="16" colspan="3" background="../images/title.gif"> </td>
</tr>
<tr>
<td height=4></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width=5% height=20 align=left nowrap bgcolor="DEDFDE">采购单号</td>
<td width="15%" height=20 bgcolor="EFEFEF">
<input name="PO" type="hidden" size="8" value="">
<input name="POname" type="text" size="12" value="">
<input type="button" name="bnPO" onClick="JavaScript:opensubwin2('form1','PO')" value=... class=black>
</td>
<td width=5% height=20 align=left nowrap bgcolor="DEDFDE">SLIP编号</td>
<td width=15% height=20 align=left nowrap bgcolor="EFEFEF">
<input type=text name=slipno size=12>
</td>
<td width=5% height=20 align=left nowrap bgcolor="FFFFFF"><input type="submit" name=submit value="下一步"></td>
<td height=20 align=left nowrap bgcolor="FFFFFF"> </td>
</tr>
</table>
</form>
<%
if Request.Form("POname")<>"" or Request.Form("slipno")<>"" then
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
rs.Open "select * from v_poline where pono like '%"&Request.Form("POname")&"%' and slipno like '%"&Request.Form("slipno")&"%'",conn,1,1
%>
<form name="form2" id="form2" method="post" action="process.asp">
<input type=hidden name=processtype value="poreturn">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor=efefef>
<%
i=1
do while not rs.EOF%>
<tr>
<td align=center height=20>货号<input type=hidden name=nonnet<%=i%>></td><td><%=rs("productcode")%><input type=hidden name=product<%=i%> value=<%=rs("productid")%>></td>
<td align=center>型号</td><td><%=rs("model")%><input type=hidden name=poid<%=i%> value=<%=rs("poid")%>></td>
<td align=center>SLIP编号</td><td><%=rs("slipno")%><input type=hidden name=polineid<%=i%> value=<%=rs("lineid")%>></td>
<td align=center>数量</td><td><%=rs("qty")%><input type=hidden name=price<%=i%> value=<%=rs("price")%>></td>
<td align=center>已收数量</td><td><%=rs("issuedqty")%></td>
<td align=center>已退数量</td><td><%=rs("returnqty")%></td>
<%if rs("returnqty")=rs("issuedqty") then%>
<td align=center><%if rs("issuedqty")=0 then%>未收货<%else%>退货完成<%end if%></td>
<td>
<input type=hidden name=maxqty<%=i%> value=0><input type=hidden name=sendqty<%=i%> value=0>
<input type=hidden name=available<%=i%>>
</td>
<td align=center></td><td><input name="location<%=i%>" type="hidden" value=""></td>
<%else%>
<td align=center>退货数量</td><td><input type=hidden name=maxqty<%=i%> value=<%=cint(rs("issuedqty"))-cint(rs("returnqty"))%>><input type=text name=sendqty<%=i%> value=0 size=8></td>
<td align=center>货位</td><td><input name="sendlocation<%=i%>" type="hidden" size="8" value=""><input name="sendlocation<%=i%>name" type="text" size="8" value=""><input type="button" name="bnsendlocation<%=i%>" onClick="JavaScript:opensubwin2('form2','sendlocation<%=i%>','<%=rs("productid")%>','<%=i%>')" value=... class=black><input type=hidden name=available<%=i%>>
</td>
<%end if%>
</tr>
<%
rs.MoveNext
i=i+1
loop
%>
</table>
<table width=100%>
<tr><td height=50 align=center><input type=hidden name=linecount id=linecount value=<%=i%>><input type=button value="退货" onclick="receive()" id=button2 name=button2></td></tr>
</table>
</form>
<%
end if
%>
<script language=javascript>
function receive(){
var breceive=false;
for(i=1;i<=form2.linecount.value-1;i++){
var sendqty='sendqty'+i;
var maxqty='maxqty'+i;
var sendlocation='sendlocation'+i;
if (parseInt(form2.item(sendqty).value)>parseInt(form2.item(maxqty).value)){
alert('超过最大退货数量!');
form2.item(sendqty).focus();
return;
}
if (form2.item(sendqty).value>0){
if (form2.item(sendlocation).value==''){
alert('请选择退货货位!');
form2.item(sendlocation).focus();
return;
}
}
if (form2.item(sendqty).value<0){
alert('退货数量不能为负数!');
form2.item(sendqty).focus();
return;
}
if (form2.item(sendqty).value>0){
breceive=true;
}
}
if (breceive==false){
alert('请输入退货数量!');
return;
}
form2.submit();
}
</script>
<%'收货单退货#############################################################################################################
elseif Request("type")="poreceivereturn" then%>
<form name="form1" method="post" action="">
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><strong><font class=title>采购退货</font></strong> </td>
</tr>
<tr >
<td height="16" colspan="3" background="../images/title.gif"> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -