📄 xx_addproducts.asp
字号:
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file=function.asp-->
<html>
<head><link href="css.css" rel="stylesheet" type="text/css">
<title>祥星送货单打印系统--增加送货单</title>
</head>
<body>
<%
Dim rss
Dim p_id,len_id,i,zero
Set rss=Conn.Execute("Select Product_ID From [XX_Products] Order By ID Desc")
if not rss.eof then
p_id = rss(0)
else
p_id=0
end if
p_id = Clng(p_id)+1
len_id = Len(p_id)
If len_id<10 Then
For i=1 To (10-len_id)
zero = zero & "0"
Next
p_id = zero & p_id
End if
rss.Close
Set rss=Nothing
%>
<center><table border=1 width=100% cellpadding=0 cellspacing=0 bordercolorlight=#cccccc bordercolordark=#ffffff>
<tr bgcolor=#efefef><td align=center>商品编号</td><td align=center>商品名称</td><td align=center>商品规格</td><td align=center>商品类别</td><td align=center>商品单位</td><td align=center>操作</td></tr>
<form action="XX_Save.asp?action=ManPro" method=post id=form1 name=form1 onSubmit="return chk(this)">
<tr bgcolor=#efefef><td align=center><input name="product_id" type="text" id="product_id" value="<%=p_id%>" size="15" maxlength="20" readonly></td>
<td align=center><input name="pname" type="text" id="pname" size="25" maxlength="30"></td>
<td align=center><input name="spgg" type="text" id="spgg" size="10" maxlength="30"></td>
<td align=center><select name="type" id="type">
<option value="" selected>请选择商品类别</option>
<%
Dim ty
Set ty=Conn.Execute("Select ID,Class From [Product_Class] Order By ID desc")
Do While Not ty.Eof
Response.Write "<option value='"& ty(0) &"'>" & ty(1) & "</option>"
ty.MoveNext
Loop
ty.Close
Set ty=Nothing
%>
</select></td>
<td align=center> <select name="SUnit" id="SUnit"> <option value="" selected>请选择商品单位</option>
<%
Set ty=Conn.Execute("Select ShopUnit From [XX_ShopUnit] Order By ID desc")
Do While Not ty.Eof
Response.Write "<option value='"& ty(0) &"'>" & ty(0) & "</option>"
ty.MoveNext
Loop
ty.Close
Set ty=Nothing
%>
</select></td>
<td align=center><input type="submit" name="Submit" value="添 加"></td>
</tr>
</form>
</table>
</center>
</body></html>
<script javascript=javascript>
function chk(){
if (document.form1.product_id.value=="")
{
alert ("请填写产品号。");
document.form1.product_id.value='';
document.form1.product_id.focus();
return false;
}
if (document.form1.pname.value=="")
{
alert ("请填写产品名称。");
document.form1.pname.value='';
document.form1.pname.focus();
return false;
}
var istrue;
istrue=confirm('您确定无误要入库是吗?');
if(istrue) {
return true;
}
else {
return false;
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -