📄 user_show.asp
字号:
<%
if session("yida_username")="" then
%>
<script language="javascript">
top.location.href="../index.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="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
<script language="javascript">
function collapse(img, objName)
{
var obj;
obj = document.getElementById(objName);
if (img.src.indexOf('open') != -1)
{
img.src = img.src.replace('open', 'close');
obj.style.display = 'none';
}
else
{
img.src = img.src.replace('close', 'open');
obj.style.display = '';
}
}
function collapseall(img)
{
var obj;
if (img.src.indexOf('open') != -1)
{
img.src = img.src.replace('open', 'close');
for (x=1;x<=<%=maxrecord%>;x++)
{
obj = document.getElementById("buy"+x);
if (obj)
{
obj.style.display = 'none';
}
}
}
else
{
img.src = img.src.replace('close', 'open');
for (x=1;x<=<%=maxrecord%>;x++)
{
obj = document.getElementById("buy"+x);
if (obj)
{
obj.style.display = '';
}
}
}
}
</script>
<script language=javascript>
function preview() {
bdhtml=window.document.body.innerHTML;
sprnstr="<!--startprint-->";
eprnstr="<!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
window.document.body.innerHTML=bdhtml;
}
</script>
</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 fla34="0" and session("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%
response.end
end if
set rs=conn.execute("select * from login where id="&request("id"))
'取得当前页码
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()-day(date()-1)
end if
nowenddate=request("enddate")
if nowenddate="" then
nowenddate=date()
end if
nowkeyword=request("keyword")
sql="select * from sell where type=0 and zu and isok and id_login="&rs("id")
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 (bianhao = '"&nowkeyword&"' or bianhao in (select bianhao from sell where type=0 and (title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')))"
end if
set count_sell=conn.execute(sql)
nowprice=0
zongshulian=0
do while count_sell.eof=false
sql3="select sum(price*shulian),sum(shulian) from sell where bianhao='"&count_sell("bianhao")&"' and zu=false"
if nowkeyword<>"" then
sql3=sql3&" and (bianhao = '"&nowkeyword&"' or title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
end if
set rs_sum=conn.execute(sql3)
nowprice=nowprice+rs_sum(0)
zongshulian=zongshulian+rs_sum(1)
count_sell.movenext
loop
sql="select * from buy where type=1 and zu and isok and id_login="&rs("id")
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 (bianhao = '"&nowkeyword&"' or bianhao in (select bianhao from buy where type=1 and (title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')))"
end if
set count_back=conn.execute(sql)
nowprice_back=0
zongshulian2=0
do while count_back.eof=false
sql3="select sum(price*shulian),sum(shulian) from buy where bianhao='"&count_back("bianhao")&"' and zu=false"
if nowkeyword<>"" then
sql3=sql3&" and (bianhao = '"&nowkeyword&"' or title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
end if
set rs_sum=conn.execute(sql3)
nowprice_back=nowprice_back+rs_sum(0)
zongshulian2=zongshulian2+rs_sum(1)
count_back.movenext
loop
%>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
<tr>
<td width="5%" height="21"> <img src="../images/print.jpg" align="absmiddle" style="cursor:hand;" onClick="preview();window.close()"></td>
<td width="95%" align="right">
开始日期:
<input name="startdate" value="<%=nowstartdate%>" readonly style="width:100px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');">
结束日期:
<input name="enddate" value="<%=nowenddate%>" readonly style="width:100px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');">
<input type="text" name="keyword" size="20" value="<%=nowkeyword%>">
<input type="hidden" name="hid" value="ok">
<input type="hidden" name="id" value="<%=rs("id")%>">
<input type="submit" value=" 查询 " class="button">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> <%=rs("username")%></b> 销售记录</td>
<td align="right">总销售额:<i><%=formatnumber(nowprice,2)%></i> 元 (<%=formatnumber(zongshulian,2)%>),顾客退货:<u><%=formatnumber(nowprice_back,2)%></u> 元 (<%=formatnumber(zongshulian2,2)%>),实际销售:<b><%=formatnumber(nowprice-nowprice_back,2)%></b> 元 </td>
</tr>
</table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<!--startprint-->
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr align="center">
<td class="category" width="10"><img src="../images/folder_close.gif" style="cursor:hand" onClick="collapseall(this)" /></td>
<td class="category" height="30">
<a href="?order1=<%if request("order1")="asc" then%>desc<%else%>asc<%end if%>&id=<%=request("id")%>&page=<%=currentpage%>&startdate=<%=nowstartdate%>&enddate=<%=nowenddate%>&keyword=<%=nowkeyword%>" class="title">编号<%if request("order1")="asc" then%><img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"><%else%><img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"><%end if%></a>
</td>
<td class="category">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -