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

📄 sell.asp

📁 某公司的进销存软件的设计与开发
💻 ASP
字号:
<%
if session("username")="" then
%>
<script language="javascript">
top.location.href="../login.asp"
</script>
<%  
  response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->

<html>
<head>
<title><%=dianming%> - 销售记录查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style2.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script>
<%
if fla2="0" then
%>
<br><center><font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%  
  response.end
end if

'取得当前页码
currentpage=request("page")
'response.write currentpage
'response.end
if currentpage<1 or currentpage="" then
  currentpage="1"
end if

'取得搜索关键字  
nowstartdate=request("startdate") 
if nowstartdate="" then
  nowstartdate=date()
end if
nowenddate=request("enddate") 
if nowenddate="" then
  nowenddate=date()
end if
nowkeyword=request("keyword") 

nowpaixu=request("paixu")
nowpaixu21=request("paixu2")
if nowpaixu21="1" then
  nowpaixu2="2"
else
  nowpaixu2="1"  
end if 
nowpaixu31=request("paixu3")
if nowpaixu31="1" then
  nowpaixu3="2"
else
  nowpaixu3="1"  
end if 
%>
<table width="98%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr> 
    <td width="24%" height="21">&nbsp;<img src="../Images/ico/ico03.gif" width="32" height="32" hspace="2" vspace="2" align="absmiddle"><font size="+1"><strong> 销售记录查询</strong></font></td>
	<td width="76%" align="right">
	  开始日期:
      <input name="startdate" value="<%=nowstartdate%>" readonly onClick="JavaScript:window.open('day.asp?form=form2&field=startdate&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');" style="width:100px">
	  结束日期:
      <input name="enddate" value="<%=nowenddate%>" readonly onClick="JavaScript:window.open('day.asp?form=form2&field=enddate&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');" style="width:100px">
	  <input type="text" name="keyword" size="20" value="<%=nowkeyword%>">
	  <input type="hidden" name="hid" value="ok">
	  <input type="submit" value=" 查询 ">
	  &nbsp;&nbsp;
	</td>
  </tr>
</form>  
</table>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" class="TableMenu">
<form name="form1" action="sell_del.asp">
  <input type="hidden" name="paixu" value="<%=nowpaixu%>">
  <input type="hidden" name="paixu2" value="<%=nowpaixu21%>">
  <input type="hidden" name="paixu3" value="<%=nowpaixu31%>">
  <input type="hidden" name="page" value="<%=currentpage%>">
  <input type="hidden" name="startdate" value="<%=nowstartdate%>">
  <input type="hidden" name="enddate" value="<%=nowenddate%>">
  <input type="hidden" name="keyword" value="<%=nowkeyword%>">
  <tr class="a1" style="color:#ffffff;font-size:12px;">
    <th width="12%" height="30">货号</th>
    <th width="10%">所属大类</th>
	<th width="12%">所属小类</th>
	<th width="16%">产品名称</th>
	<th width="9%">
	  <%if nowpaixu2="2" then%>
	    <a href="?paixu3=<%=nowpaixu31%>&paixu2=2&paixu=r&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&keyword=<%=nowkeyword%>" class="title">销售时间<img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"></a>
	    <%else%>
	    <a href="?paixu3=<%=nowpaixu31%>&paixu2=1&paixu=r&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&keyword=<%=nowkeyword%>" class="title">销售时间<img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"></a>
	    <%end if%></th>
	<th width="8%">经办人</th>
	<th width="7%">购买会员</th>
	<th width="9%">出货仓库</th>
	<th width="9%">
	  <%if nowpaixu3="2" then%>
	    <a href="?paixu2=<%=nowpaixu21%>&paixu3=2&paixu=j&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&keyword=<%=nowkeyword%>" class="title">销售价格<img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"></a>
	  <%else%>
	    <a href="?paixu2=<%=nowpaixu21%>&paixu3=1&paixu=j&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&keyword=<%=nowkeyword%>" class="title">销售价格<img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"></a>
	  <%end if%>
	</th>
	<th width="4%">数量</th>
    <th width="4%">删除</th>
  </tr>
  <%
  set rs_buy =server.createobject("ADODB.RecordSet")
  sql="select * from sell where type=0"
  if nowstartdate<>"" then
    sql=sql&" and selldate-#"&nowstartdate&"#>=0"
  end if  
  if nowenddate<>"" then
    sql=sql&" and selldate-#"&nowenddate&"#<=0"
  end if  
  if nowkeyword<>"" then
    sql=sql&" and (title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
  end if
  if nowpaixu="r" then
    if nowpaixu2="1" then
      sql=sql&" order by selldate desc"
	else
	  sql=sql&" order by selldate"
	end if
  elseif nowpaixu="j" then
    if nowpaixu3="1" then
      sql=sql&" order by price"
	else
	  sql=sql&" order by price desc"
	end if
  else  
    sql=sql&" order by id desc"
  end if	
  rs_buy.open sql,conn,1,3
  if not rs_buy.eof then
  rs_buy.pagesize=16
  rs_buy.absolutepage=currentpage
  for currentrec=1 to rs_buy.pagesize
    if rs_buy.eof then
      exit for
    end if
	
	sql="select * from produit where id="&rs_buy("id_produit")
	set rs_produit=conn.execute(sql)
  %>
  <tr bgcolor="#ececec" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#ececec'">
    <td align="center" height="25"><%if rs_produit.eof then%><%=rs_buy("huohao")%><%else%><%=rs_produit("huohao")%><%end if%></td>
	<td align="center"><%if rs_produit.eof then%><%=rs_buy("bigclass")%><%else%>
	  <%
	  sql="select * from bigclass where id="&rs_produit("id_bigclass")
	  set rs_bigclass=conn.execute(sql)  
	  %>
	  <%=rs_bigclass("bigclass")%>
	  <%end if%></td>
	<td align="center"><%if rs_produit.eof then%><%=rs_buy("smallclass")%><%else%>
	  <%
	  sql="select * from smallclass where id="&rs_produit("id_smallclass")
	  set rs_smallclass=conn.execute(sql)	  
	  %>
	  <%=rs_smallclass("smallclass")%>	   
	  <%end if%></td>
	<td align="center"><%if rs_produit.eof then%><%=rs_buy("title")%><%else%><%=rs_produit("title")%><%end if%></td>
	<td align="center"><%=rs_buy("selldate")%></td>
	<td align="center">
	  <%
	  sql="select * from login where id="&rs_buy("id_login")
	  set rs_login=conn.execute(sql)
	  %>
	  <%if rs_login.eof then%><%=rs_buy("login")%><%else%><%=rs_login("username")%><%end if%>
	</td>
	<td align="center">
	  <%
	    sql="select * from huiyuan where id="&rs_buy("id_huiyuan")
		set rs_huiyuan=conn.execute(sql)
	  %>
	  <%if rs_huiyuan.eof=false then%><%=rs_huiyuan("username")%><%else%>非会员<%end if%>
	</td>
	<td align="center"><%=rs_buy("ku")%></td>
    <td align="center"><%=rs_buy("price")%></td>
	<td align="center"><%=rs_buy("shulian")%></td>
    <td align="center"><input type="checkbox" name="ID" value="<%=rs_buy("id")%>" style="border:0"></td>
  </tr>
  <%
    rs_buy.movenext
  next
  else
  %>
  <tr bgcolor="#ececec" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#ececec'">
    <td colspan="11" height="25" align="center" style="color:red"><b>没有找到记录</b></td>
  </tr>
  <%
  end if
  %>
  
  
  
  <%
  if rs_buy.recordcount>0 then 
  %> 
  <tr class="a1">
    <td colspan="11" height="30">
	<table cellpadding=0 cellspacing=0 width="100%">
	<tr>
	<td width="3%" style="color:#FFFFFF; font-weight:bold" align="right"></td>  
	<td width="96%" align="right" style="color:#FFFFFF;">
	&nbsp;&nbsp;
      <font color=#ffffff><b><%=rs_buy.recordcount%></b></font>&nbsp;条信息&nbsp; 共&nbsp;<font color=#ffffff><b><%=rs_buy.pagecount%></b></font>&nbsp;页&nbsp;
  <%
  nowstart=currentpage-9
  if nowstart<1 then
    nowstart=1
  end if
  nowend=currentpage+10
  if nowend>rs_buy.pagecount then
    nowend=rs_buy.pagecount
  end if
  for ipage=nowstart to nowend
    if cstr(ipage)=cstr(currentpage) then
      response.write "&nbsp;<span style='font-weight:bold;color:#5858E6'>" & ipage &"</span>&nbsp;"
    else
      response.write "&nbsp;[&nbsp;<a href='sell.asp?paixu="&nowpaixu&"&paixu2="&nowpaixu21&"&paixu3="&nowpaixu31&"&startdate="&nowstartdate&"&enddate="&nowenddate&"&keyword="&nowkeyword&"&page="&ipage&"' class='page'>" & ipage &"</a>&nbsp;]&nbsp;"
    end if
  next
%>
    <input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"> 全选
	<input type="submit" value="删 除" onClick="return confirm('此记录用于计算员工工资!!!请慎重!!!\n\n确定要删除所选择的销售记录吗?')">
  </td>
  <td width="1%"></td>
  </tr></table></td></tr>
<%end if%> 
</form>   
</table>
</body>
</html>

⌨️ 快捷键说明

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