📄 addding.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="Inc/Ubbcode.asp"-->
<!--#include file="Inc/Function.asp"-->
<!--#include file="Conn.asp"-->
<%
dianji=year(date())&right("0"&month(date()),2)&right("0"&day(date()),2)
set rs1=conn.execute("select max(ddh) from bs_ddanlb where ddh like '"&dianji&"%'")
if rs1(0)>0 then
dianji=dianji & right("00" & rs1(0)+1,3)
stock_num=rs1(0)+1
response.cookies("ddh")=dianji
else
dianji=dianji & "001"
stock_num=1
response.cookies("ddh")=dianji
end if
rs1.close
set rs1=nothing
%>
<%
dim Action
if Request.QueryString("action")="add" then
ddh=Trim(Request.Form("ddh"))
xdr=Trim(request.cookies("yhmc"))
xdrq=Trim(Request.Form("xdrq"))
jhrq=Trim(Request.Form("jhrq"))
ausd=Trim(Request.Form("ausd"))
daodd=Trim(Request.Form("daodd"))
fhd=Trim(Request.Form("fhd"))
gys=Trim(Request.Form("gys"))
cgs=Trim(Request.Form("cgs"))
shuom=Trim(Request.Form("shuom"))
if ddh<>"" and gys<>"" and cgs<>"" and shuom<>"" then
Set rs2=Server.CreateObject("Adodb.RecordSet")
rs2.open "Select * from bs_ddanlb ",conn,1,3
rs2.addnew
rs2("ddh")=dianji
rs2("xdr")=request.cookies("yhmc")
rs2("xdrq")=Request.Form("xdrq")
rs2("jhrq")=Request.Form("jhrq")
rs2("ausd")=Request.Form("ausd")
rs2("daodd")=Request.Form("daodd")
rs2("fhd")=Request.Form("fhd")
rs2("gys")=Request.Form("gys")
rs2("cgs")=Request.Form("cgs")
rs2("shuom")=Request.Form("shuom")
rs2.update
rs2.Close
set rs2=Nothing
call CloseConn()
Response.Redirect"bs_add.asp"
else
response.write"<span style='color: #FF0000'>对不起你填写的内容有误或项目为空,请重新检查订单内容!</span>"
end if
end if
%>
<script language = "JavaScript">
function CheckForm()
{
if(confirm("确定要增加此订单吗?"))
return true;
else
return false;
}
</script>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="91%" align="center" class="a2">
<tr>
<td class="a1" height="12" align="center"><strong>添 加 <strong> 石 材 </strong>订 单 </strong></td>
</tr>
<tr>
<td height="252" align="center" bgcolor="#FFFFFF" class="a2"><p> </p>
<form method="POST" name="myform" onSubmit="return CheckForm();" action="addding.asp?action=add" target="_self">
<p>是否增加订单号为<span style="color: #FF0000"><strong><%=request.cookies("ddh")%></strong> </span>订单的详细资料,按确定继续</p>
<table width="671" border="1" cellpadding="2" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="a2">
<tr>
<td width="57"><div align="center">订 单 号</div></td>
<td width="90"><input name="ddh" type="text" id="ddh" value="<%=dianji%>" size="12" style="color: #FF0000"></td>
<td width="78"><div align="center">下单日期</div></td>
<td width="83"><div align="center">
<input name="xdrq" type="text" id="xdrq" value="<%=date()%>" size="12">
</div></td>
<td width="72"><div align="center">交货日期</div></td>
<td width="100"><div align="center">
<input name="jhrq" type="text" id="jhrq" value="<%=date()+2%>" size="12">
</div></td>
<td width="63"><div align="center">结算币种</div></td>
<td width="78">
<select name="ausd" size="1" id="ausd">
<option value="美元">美元</option>
<option value="人民币">人民币</option>
</select></td>
</tr>
<tr>
<td><div align="center">发 货 地</div></td>
<td> <input name="fhd" type="text" id="fhd" size="12"> </td>
<td><div align="center">到 达 地</div></td>
<td><div align="center">
<input name="daodd" type="text" id="daodd" size="12">
</div></td>
<td><div align="center">供 应 商</div></td>
<td><strong>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from baidu_client where cTrade='供应商' "
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<span style='color: #FF0000'>请添供应商资料</span>"
else
%>
<select name="gys" size="1" id="gys">
<option selected value="<%=trim(rs("cCompany"))%>"><%=trim(rs("cCompany"))%></option>
<%
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("cCompany"))%>"><%=trim(rs("cCompany"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
</strong></td>
<td><div align="center">船 公 司</div></td>
<td><strong>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from baidu_client where cTrade='船公司'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%>
<select name="cgs" size="1" id="cgs">
<option selected value="<%=trim(rs("cCompany"))%>"><%=trim(rs("cCompany"))%></option>
<%
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("cCompany"))%>"><%=trim(rs("cCompany"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
</strong></td>
</tr>
<tr>
<td>
<p align="center">相关要求</p> <p align="center">或 说 明</p></td>
<td colspan="7">
<textarea name="shuom" cols="80" rows="6" id="shuom"></textarea></td>
</tr>
<tr>
<td colspan="8"><div align="center">
<input type="submit" name="wadd" id="wadd" value="确定">
</div></td>
</tr>
</table>
<p> </p>
</form>
<p> </p></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -