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

📄 sales_in_yunshu.asp

📁 asp_erp 源碼 附詳盡使用說明及數據庫
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统∷</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">

<SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>

<SCRIPT language=javascript  src="js/selectcity.js"></script>
<script language="JavaScript" src="js/validate.js" type="text/JavaScript"></script>

<SCRIPT language=javascript src="css/init.js"></SCRIPT>

<style type="text/css">
<!--
td {  font-family: "宋体"; font-size: 9pt}
body {  font-family: "宋体"; font-size: 9pt}
select {  font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt} 
-->
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{

	if (myform.dakuan.value == "")
	{
		alert("打款数目不能为空!");
		myform.dakuan.focus();
		return (false);
	}

}


function SelectAll() {
	for (var i=0;i<document.selform.selBigClass.length;i++) {
		var e=document.selform.selBigClass[i];
		e.checked=!e.checked;
	}
}
//-->
</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>       
<!--#include file="top.asp"--><% dim sql,rs

  select case request("action")
  case "add"
       call SaveAdd()
  case "modify"
       call SaveModify()
  case "del"
       call delCate()
  case "edit"
       isEdit=True
       call myform(isEdit)
  case "view"
       isEdit=True
       call myform(isview)
  case else
       isEdit=False
       call myform(isEdit) 
  end select

  
  sub SaveAdd



bianhao1 = trim(request.Form("bianhao"))
chehao=request.Form("chehao")

dakuan = request.Form("dakuan")

set rs1=server.createobject("adodb.recordset") 

sql1="select * from yunshu where bianhao='"&bianhao1&"'"

rs1.open sql1,conn,1,3

if not rs1.eof then

rs1("yifuyunfei")=rs1("yifuyunfei")+dakuan
rs1("yunfei")=rs1("yunfei")-dakuan
rs1("jiezhang_time")=request.Form("uptime")
rs1.update
end if

rs1.update
rs1.close
set rs1=nothing

set rs=server.createobject("adodb.recordset") 
sql="select * from sales_in_yunshu"
rs.open sql,conn,1,3
rs.addnew
rs("bianhao") = trim(request.Form("bianhao"))
rs("uptime") = request.Form("uptime")
rs("dakuan") = trim(request.Form("dakuan"))
rs("chehao") = request.Form("chehao")
rs("shoukuanren") = request.Form("shoukuanren")
rs("content") = request.Form("content")

rs.update
response.Write "<script language=javascript>alert('添加成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=sales_in_yunshu.asp"">"
response.end
rs.close
set rs=nothing
end sub

 
sub SaveModify   
set rs=server.createobject("adodb.recordset") 
sql="select * from sales_in_yunshu where id="&request.Form("id")
rs.open sql,conn,1,3
rs("bianhao") = trim(request.Form("bianhao"))
rs("uptime") = request.Form("uptime")
rs("dakuan") = trim(request.Form("dakuan"))
rs("chehao") = request.Form("chehao")
rs("shoukuanren") = request.Form("shoukuanren")

rs("content") = request.Form("content")
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=sales_in_yunshu.asp"">"
response.end
rs.close
set rs=nothing
end sub   
 
  sub delCate()
        conn.execute("delete from sales_in_yunshu where id in ("&Request.Form("selBigClass")&")")
		response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=sales_in_yunshu.asp"">"
response.end
  end sub
  %> <% sub myform(isEdit) %> 	  
<TABLE width=600 align=center border="0" cellspacing="0" bordercolor="#D6D3CE">
  <TBODY> 
  <TR> 
    <td align="center" valign="top"> 
	<%if oskey="supper" or oskey="xiaoshou" then%>
	<fieldset style="width:98%"><legend>
	<%
	    set rs=server.createobject("adodb.recordset")
	   if isedit then
		   rs.open "select * from sales_in_yunshu where id=" & request("id"),conn,1,1
	       response.write "编 辑 运 费 结 帐 信 息"
	   else
	       response.write "添 加 运 费 结 帐 信 息"
	   end if %></legend>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
          <tr class="but"> 
			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">销售编号</td>
			<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but'">打款日期</td>
			<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but'">打款金额</td>

			<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but'">运输车号</td>
			<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but'">收款人</td>
	
          </tr>
		  <form name="reg" method="post" action="sales_in_yunshu.asp" onSubmit="return Juge(this)" >
		  <tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'> 
		  <% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>"> <% End If %>

			<td align="center"><input name="bianhao" type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("bianhao")
																  end if %>'></td>
            <td height="18" align="center">
			<input name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" type="text"  size="15"  value='<% 

if isedit then
		                                                         response.write rs("uptime")
																

 else
																

 response.write date()
																

  end if %>'></td>
			<td align="center" ><input name="dakuan" type="text"  size="20" value='<% if isedit then
		                                                         response.write rs("dakuan")
																

  end if %>'></td>

			<td align="center" ><input name="chehao" type="text"  size="20" value='<% if isedit then
		                                                         response.write rs("chehao")
																

  end if %>'></td>

			<td align="center" ><input name="shoukuanren" type="text"  size="20" value='<% if isedit then
		                                                         response.write rs("shoukuanren")
																

  end if %>'></td>


          </tr>




		  <tr class="but"> 

			<td width="70%" colspan="5" height="18" align="center" class="but" 

onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">备  注</td>		

	
          </tr>
		  <tr> 

            <td colspan="4"><textarea name="content" cols="60" rows="1"><% if isedit then
		                                                         response.write rs("content")
																

  end if %></textarea></td>
			<td width="148" align=center><input type="submit" class="button" value="<% if isedit then
		                                                         response.write "编辑"
																

 else
																

 response.write "添加"
																

  end if %>"> </td>
          </tr></form>
		  
           </table>
        </fieldset>
		<%end if%>
<br><br><br>





<fieldset style="width:600">

<legend>运 费 结 帐 信 息 列 表</legend>
			<form action="sales_in_yunshu.asp" method="post" name="selform" >
  <table width="600"  border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8" align="center">
    <tr> 
      
      <td width="600" align="center" valign="top">
	 
        <table width="600" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
          <tr class="but"> 
			<td width="5%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but01'">编号</td>
			<td width="10%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but01'">打款日期</td>
			<td width="10%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but01'">打款金额</td>
			<td width="10%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but01'">运输车号</td>


			<td width="10%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but01'">收款人</td>

			<td width="10%" height="18" align="center" class="but01" onMouseDown="this.className='tddown'" 

onMouseUp="this.className='but'" onMouseOut="this.className='but01'">操作</td>	
          </tr>

		 <%
PageShowSize = 10            '每页显示多少个页
MyPageSize   = 20          '每页显示多少条
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
set rs=server.CreateObject("ADODB.RecordSet")
search=request("search")
if search<>"" then
keyword=request("keyword")
rs.Source="select* from sales_in_yunshu where chehao like '%"&keyword&"%' order by id desc"
else
rs.Source="select* from sales_in_yunshu order by id desc"
end if
rs.Open rs.Source,conn,1,1
if not rs.EOF then
rs.PageSize     = MyPageSize
MaxPages         = rs.PageCount
rs.absolutepage = MyPage
total            = rs.RecordCount
for i=1 to rs.PageSize
if not rs.EOF then
%>

<tr >
<td height="18" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" 

onMouseOut="this.className='but1'"><%=rs("id")%></td>
<td height="18" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" 

onMouseOut="this.className='but1'">
<a href="sales_in_yunshu.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("uptime")%></a>


</td>
<td height="18" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" 

onMouseOut="this.className='but1'"><%=FormatCurrency(rs("dakuan"),2,-1,,0)%><%if rs("dakuan")="" then%>&nbsp;<%end if%></td>


<td height="18" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" 

onMouseOut="this.className='but1'">

<%=rs("chehao")%><%if rs("chehao")="" then%>&nbsp;<%end if%>

</td>
<td height="18" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" 

onMouseOut="this.className='but1'">

<%=rs("shoukuanren")%><%if rs("shoukuanren")="" then%>&nbsp;<%end if%>

</td>


<td height="18" align="center" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" 

onMouseOut="this.className='but1'"><input name="selBigClass" type="checkbox" id="selBigClass" value="<%=rs("ID")%>"></td>
</tr>
<%
rs.MoveNext
end if
next
end if

%>
<tr><td align="right" colspan="10" height="22">
共 <%=total%> 条,当前第 <%=Mypage%>/<%=Maxpages%> 
            页,每页 <%=MyPageSize%> 条 
            <%
			if search<>"" then
			url="sales_in_yunshu.asp?chehao="&keyword&"&search=search&"
			else
                        url="sales_in_yunshu.asp?"
			end if				
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs.PageSize)+1

if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & Url & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if

if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" & Url & "page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next

if Mypage+1 <=Pagetpage  then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
rs.Close
set rs=nothing
%>
&nbsp;&nbsp;&nbsp;&nbsp;<%if oskey="supper" or oskey="xiaoshou" then%>
        <input type="checkbox" name="checkbox" value="checkbox" onClick="javascript:SelectAll()"> 选择/反选
              <input onClick="{if(confirm('此操作将删除该信息!\n\n确定要执行此项操作吗?')){this.document.selform.submit

();return true;}return false;}" type=submit value=删除 name=action2> 
              <input type="Hidden" name="action" value='del'><%end if%></td></tr>
        </table>

	  
</td>
    </tr>

  </table>
</fieldset>
</form><br>
<fieldset style="width:600"><legend>运 费 结 帐 信 息 搜 索</legend>
        <table width="600" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
         
		  <form name="search" method="post" action="sales_in_yunshu.asp">
		  <tr><input name="search" type="hidden" value="search">
 
            <td align="center" width="50%">车号: <input name="keyword" type="text"  size="25"></td>
                      
			<td align="center" width="30%" ><input type="submit"  value="查 找"> </td>
          </tr></form>
		 </fieldset> 
           </table>








			</TD>
              </TR>
          </table>
		          

  </TBODY>
</TABLE>
<%end sub%>
<P>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  <TBODY>
  <TR vAlign=center>
    <TD align=middle width="100%"><!--#include file="footer.htm"--></TD>
  </TR></TBODY></TABLE></P></BODY></HTML>


⌨️ 快捷键说明

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