<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%
ColumnName="":Tablename="HX_ProductSaleRecord"
action=request("action")
page=request("page")
 if action="del" then
  id=request("id")
  if WS_S.HX_IsNUM(id) then
    conn.execute("delete from "&Tablename&" where WS_PSID="&id)
	WS_S.HX_Redirect("ProductSaleRecord.asp?page="&page)
  end if  	
end if
 Orderby=" where WS_ProductSaleCreateMan="&loginuid&" order by WS_PSID desc"
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)

%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>销售纪录</title>
<link rel=stylesheet type=text/css href="../HXinclude/HX_Style.css">
</head>
<body topmargin="20" leftmargin="0" bottommargin="0">
<table width="98%"  border="0" cellspacing="1" cellpadding="0" align=center bgcolor="#613c25">
  <tr>
    <td colspan="2" bgcolor=FFFBE8 background="../hximages/titlelinebg.gif"><table width="590"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25" background="../hximages/titleline.gif"><font class="fontmenu">销售纪录</font>　　　　　　　<a href="ProductSaleRecordCreate.asp" class="menu">添加销售纪录</a></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="1" cellpadding="0" bgcolor=FFFBE8>
  <tr bgcolor="#BF9B73">
    <td width="4%" height="20" align="right"><div align="center">编 号</div></td>
    <td width="13%"><div align="center">产品名称</div></td>
    <td width="18%"><div align="center">购买人</div></td>
    <td width="8%">购买数量</td>
    <td width="15%">购买日期</td>
    <td width="12%">清单日期</td>
    <td width="10%"><div align="center">清单意见</div></td>
    <td width="9%"><div align="center">备注</div></td>    
    <td width="11%"><div align="center">操 作</div></td>
  </tr>
  <%if rs.recordcount>0 then
 rs.PageSize =15 '每页记录条数
	iCount=rs.RecordCount '记录总数
	iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	ii=0
	do while not rs.EOF%>
  <tr bgcolor="#FFFBE8" onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'>
    <td align="center" height="20"><%=rs("WS_PSID")%></td>
    <td align="center"><a href="ProductModify.asp?id=<%=rs("WS_PTID")%>"><%call WS_S.HX_OutProduct(rs("WS_PTID"))%></a></td>
    <td><%=WS_S.HX_OutSaleMan(rs("WS_ProductSaleMan"))%></td>
    <td><%=rs("WS_ProductSaleCnt")%></td>
    <td><%=WS_S.FormatColor(WS_S.Format_Time(rs("WS_ProductSaleDate"),5),"blue")%></td>
    <td><%if rs("WS_ProductSaleDetailDate")-date<=2 then response.Write WS_S.FormatColor(WS_S.Format_Time(rs("WS_ProductSaleDetailDate"),5),"red") %></td>
    <td align="center"><%=rs("WS_ProductSaleDetailContent")%></td>
    <td align="center"><%=rs("WS_ProductSaleDescribe")%></td>
    <td align="center"><a href="ProductSaleModify.asp?id=<%=rs("WS_PSID")%>">修改</a> <a href="#" onclick="if(!confirm('确认要删除此交往信息记录吗？')) {return false};else {location.href='ProductSaleRecord.asp?action=del&id=<%=rs("WS_PSID")%>';return true;}">删除</a></td>
  </tr><%
  ii=ii+1
	  if ii>=rs.PageSize then Exit Do
	  rs.movenext
      loop
	  end if
	  for i=0 to 15-rs.recordcount
  %>
   <tr bgcolor="#FFFBE8" onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8' align=center>
    <td height="25">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    
  </tr>
  <%
     next
   if rs.recordcount>0 then
   call WS_S.PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>",10)
   end if
  call WS_S.HX_RSClose(rs) %>
</table></td>
  </tr>
</table>

