⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yundanadd.asp

📁 这是一个关于企业物流平台的东东
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=../../conn/adminconn.asp-->
<!--#include file="login.asp"-->
<% 
	'检索当前日期是否有运单
	set rs2=server.CreateObject("adodb.recordset")
	sql2="select * from yundan where time like '"&date()&"'"
	rs2.open sql2,conn,1,1
	if not rs2.eof then
		'系统自动生成运单编号
		t=year(date)*1000000000+month(date())*10000000+day(date())*100000+rs2.recordcount+1
	else
		t=year(date)*1000000000+month(date())*10000000+day(date())*100000+1
	end if
	if request("post")<>"" then
	call writ
	end if
	'添加运单信息
	function writ
		if request("start")<>"" and request("mudidi")<>"" and request("ctime")<>"" and request("beizhu")<>"" then
			set rs=server.CreateObject("adodb.recordset")
			sql="select * from yundan"
			rs.open sql,conn,1,3
			rs.addnew
			rs("nid")=t
			rs("start")=request("start")
			rs("mudidi")=request("mudidi")
			rs("ctime")=request("ctime")
			rs("fg")=request("fg")
			rs("fgzhuangtai")="途中"
			rs("zhuangtai")="途中"
			rs("beizhu")=request("beizhu")
			rs("time")=date()
			rs.update
			rs.close
			response.Write("<script language=javascript>alert('提交成功');location='yundanadd.asp'</script>")
		else 
			response.Write("<script language=javascript>alert('请把信息填写完整');location='javascript:history.go(-1)'</script>")
		end if
	end function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
@import url("../admin.css");
.style1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: 14px;
}
body,td,th {
	font-size: 12px;
}
.style2 {color: #000000}
-->
</style>
</head>

<body>
<form name="form1" method="post" action="">
  <p>&nbsp;</p>
  <table width="390" height="390" border="0" align="center" cellspacing="1" bgcolor="#000000">
    <tr >
      <td height="48" colspan="2" background="../images/tiao.gif"><div align="center" class="style1 style2">添加运单</div></td>
    </tr>
    <tr>
      <td width="131" height="28" bgcolor="#FFFFFF"><div align="right">运单编号:</div></td>
      <td width="249" bgcolor="#FFFFFF">&nbsp;<%=t%>
      <input name="post" type="hidden" id="post" value="true">      </td>
    </tr>
    <tr>
      <td height="28" bgcolor="#FFFFFF"><div align="right">寄件地:</div></td>
      <td bgcolor="#FFFFFF">&nbsp;<input name="start" type="text" class="kuang" id="start"></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><div align="right">目的地:</div></td>
      <td bgcolor="#FFFFFF">&nbsp;<input name="mudidi" type="text" class="kuang" id="mudidi"></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"><div align="right">寄件时间:</div></td>
      <td bgcolor="#FFFFFF">&nbsp;<input name="ctime" type="text" class="kuang" id="ctime"></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">
        <div align="right">指派分公司:</div></td>
      <td bgcolor="#FFFFFF">&nbsp;<select name="fg" class="kuang" id="select5">
        <% 
	           set rs=server.CreateObject("adodb.recordset")
               sql="select * from fgongsi"
               rs.open sql,conn,1,1
				
				if rs.eof then%>
        <option>-暂无公司-</option>
        <%
	  else
	  for i=1 to rs.recordcount and not rs.eof
	  %>
        <option value=<%=rs("fengongsi")%>><%=rs("fengongsi")%></option>
        <%
	  rs.movenext
	  if rs.eof then exit for
	  next
	  end if 
	  %>
      </select></td>
    </tr>
    <tr>
      <td height="125" bgcolor="#FFFFFF"><div align="right">备注:</div></td>
      <td bgcolor="#FFFFFF">&nbsp;<textarea name="beizhu" cols="30" rows="5" class="kuang" id="beizhu">无</textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td colspan="2"><div align="center">
        <input type="submit" name="Submit" value="提交">
         
        <input type="reset" name="Submit2" value="重置">
       <input type="reset" name="Submit3" value="返回" onClick="location='xinxi.asp'"></div></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -