<!--#include file="conn.asp"-->
<!--#include file="ad_chk.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body,p,td {font-size:12px;font-family:arial,宋体; }
-->
</style>
<%
if Request.Cookies("WrzcNethtml")("admin_class")<>0 and Request.Cookies("WrzcNethtml")("admin_class")<>2 then
response.write "你没有这个权限!"
response.end
end if
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_sub where sub_id="&request("sub_id")
rs.open sql,conn,1,1
if rs.eof then
response.write "如果您看到此信息，极有可能是您的浏览器不支持该组件，建议在打印上点击右键－“目标另存为”"
response.end
rs.close
set rs=nothing
end if

user_name=rs("sub_name")
sub_psname=rs("sub_psname")
sub_yunfei=rs("sub_yunfei")
sub_fapiao=rs("sub_fapiao")
zt=rs("sub_zt")
sub_number=rs("sub_number")

zp_id=rs("zp_id")
zp_name=rs("zp_name")
zp_price=rs("zp_price")
zp_full=rs("zp_full")
usertype_name=rs("sub_usertype")
zhekou=rs("sub_zhekou")
if zhekou=100 then
zhekouyu="不享受折扣价"
else
zhekouyu="享受原价"&zhekou&"%的折扣价"
end if
quan_id=rs("quan_id")
quan_cash=rs("quan_cash")
quan_man=rs("quan_man")
quan_no=rs("quan_no")
quan_pass=rs("quan_pass")

fuhao=rs("fuhao")
hui=rs("hui")
danwei=rs("danwei")
bizhong=rs("bizhong")
%>
<style   media=print>     
.Noprint{display:none;}     
</style>     
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">

<input type="button" onclick="window.print();" value="打印" style="margin:5px 0px;">

<table border="1" width="100%" cellpadding="2" style="border-collapse: collapse" bordercolor="#000000"><tr> 
<td colspan="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table2">
	<tr>
		<td><b>定单号：<%=rs("sub_number")%><%sub_number=rs("sub_number")%>&nbsp;&nbsp; </b>
		</td>
		<td><b>日期：<%=rs("sub_date")%>&nbsp;&nbsp; </b></td>
		<td><b>用户名：<%=rs("sub_name")%></b></td>
	</tr>
</table>
</td></tr>
<tr><td colspan="5">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td height="23" width="100">订单状态：</td>
<td width="200" height="23"><%if rs("sub_zt")=0 then response.write "无效订单"%>
<%if rs("sub_zt")=1 then response.write "未处理"%>
<%if rs("sub_zt")=-1 then response.write "已处理等待客户付款"%>
<%if rs("sub_zt")=2 then response.write "已付款等待确认"%>
<%if rs("sub_zt")=3 then response.write "已确认收款"%>
<%if rs("sub_zt")=4 then response.write "已发货注意收货"%>
<%if rs("sub_zt")=5 then response.write "已收货（归档）"%>
<%i=rs("sub_zt")%></td>
<td height="23" width="100">下单时间：</td>
<td height="23" width="200"><%=rs("sub_date")%></td></tr>
<%if rs("sub_zt1")<>"" and rs("sub_date1")<>"" then%>
<tr><td height="23" width="100">处理时间：</td>
	<td width="200" height="23"><%=rs("sub_date1")%></td>
	<td height="23" width="100">处理说明：</td>
	<td height="23" width="200"><%=rs("sub_zt1")%></td></tr>
<%end if%>
<%if rs("sub_zt2")<>"" and rs("sub_date2")<>"" then%>
<tr><td height="23" width="100">付款时间：</td><td width="200" height="23"><%=rs("sub_date2")%></td>
	<td height="23" width="100">付款说明：</td><td height="23" width="200"><%=rs("sub_zt2")%></td></tr>
<%end if%><%if rs("sub_zt3")<>"" and rs("sub_date3")<>"" then%>
<tr><td height="23" width="100">收款时间：</td><td width="200" height="23"><%=rs("sub_date3")%></td>
	<td height="23" width="100">收款说明：</td><td height="23" width="200"><%=rs("sub_zt3")%></td></tr>
<%end if%><%if rs("sub_zt4")<>"" and rs("sub_date4")<>"" then%>
<tr><td height="23" width="100">发货时间：</td><td width="200" height="23"><%=rs("sub_date4")%></td>
	<td height="23" width="100">发货说明：</td><td height="23" width="200"><%=rs("sub_zt4")%></td></tr>
<%end if%><%if rs("sub_zt5")<>"" and rs("sub_date5")<>"" then%>
<tr><td height="23" width="100">到货时间：</td><td width="200" height="23"><%=rs("sub_date5")%></td>
	<td height="23" width="100">到货说明：</td><td height="23" width="200"><%=rs("sub_zt5")%></td></tr>
<%end if%>
</table>
</td></tr>
<tr><td colspan="5"><b>收 货 人：<%=rs("sub_to")%></b></td></tr>
<tr><td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr><td bgcolor="#FFFFFF" height="23">地址：<%=rs("sub_adds")%> (<%=rs("sub_city")%>,<%=rs("sub_state")%>,<%=rs("sub_country")%>)&nbsp;&nbsp;&nbsp; 邮编：<%=rs("sub_post")%></td></tr>
<tr><td bgcolor="#FFFFFF" height="23">电话：<%=rs("sub_tel")%></td></tr>
<tr><td bgcolor="#FFFFFF" height="23">邮箱：<%=rs("sub_mail")%></td></tr>
</table></td></tr>
<tr><td colspan="5"><b>到货时间：<%=rs("sub_totime")%></b></td></tr>
<tr><td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr><td height="20" bgcolor="#FFFFFF">付款方式：<%=rs("sub_payname")%></td>
	<td height="20" bgcolor="#FFFFFF">送货方式：<%=rs("sub_psname")%></td>
	<td height="20" bgcolor="#FFFFFF">需要发票：<%if fapiao=1 then%> <%if rs("sub_fapiao")=1 then%>需要（抬头：<%=rs("sub_taitou")%>）<%else%>不需要<%end if%><%else%>不提供<%end if%></td>
	<td height="20" bgcolor="#FFFFFF">缺货处理：<%if rs("sub_quehuo")=1 then%>等待到货<%else%>从订单取消<%end if%></td>
</tr>
<tr><td height="20" bgcolor="#FFFFFF" colspan="4">其它说明：<%=rs("sub_other")%></td></tr>
</table></td></tr>
<tr><td align="center" width="60%">货物名称</td><td align="center" width="10%">单价</td>
	<td align="center" width="10%">
	数量</td><td align="center" width="10%">备注</td><td align="center" width="10%">合计</td></tr>
<%set rsp=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_basket where sub_number='"&sub_number&"' and user_name='"&user_name&"' and basket_check=1"
rsp.open sql,conn,1,1
if rsp.eof then
response.write "没有此订单信息"
else
do while not rsp.eof%>
<tr><td align="center" width="60%"><%=rsp("hw_name")%></td>
  <td align="center" width="10%"><%=fuhao%> <%=FormatNum(rsp("hw_price")*hui)%> <%=danwei%></td>
  <td align="center" width="10%"><%=rsp("basket_count")%></td>
  <td align="center" width="10%"><%=rsp("kxa")%>&nbsp;<%=rsp("kxb")%></td>
  <td align="center" width="10%"><%=fuhao%> <%=FormatNum(rsp("hw_price")*rsp("basket_count")*hui)%><%=danwei%></td></tr>
<%totalcash=totalcash+rsp("hw_price")*rsp("basket_count")*hui
totaljifen=totaljifen+rsp("hw_jifen")*rsp("basket_count")
totalw=totalw+(rsp("basket_count")*trim(rsp("hw_weight")))
totaly=totaly+(rsp("basket_count")*trim(rsp("hw_yunfei")))
totalc=totalc+rsp("basket_count")
rsp.movenext
loop
rsp.close
set rsp=nothing%>
<%if totalcash*zhekou/100>=zp_full and zp_id>0 then%>
<tr><td align="center" width="60%"><%=zp_name%></td>
<td align="center" width="10%"><%=fuhao%> 0 <%=danwei%></td>
<td align="center" width="10%">1</td>
<td align="center" width="10%">赠品</td>
<td align="center" width="10%"><%=fuhao%> 0 <%=danwei%></td>
</tr>
<%end if%>
<tr><td colspan="5" align="right">
<p style="line-height: 120%; margin-left:5px; margin-right:15px; margin-top:3px; margin-bottom:3px">
共 <span class="price"><%=totalc%></span> 件商品&nbsp;价格总计：<span class="price"><%=fuhao%> <%=FormatNum(totalcash)%> <%=danwei%></span>&nbsp;&nbsp;
<%=usertype_name%>(<%=zhekouyu%>)<br>
收货方式：<%=sub_psname%>&nbsp;&nbsp;运费：<%=fuhao%><%=FormatNum(sub_yunfei*hui)%><%=danwei%><br>

<%if quan_id<>0 and quan_cash<>0 then%>
使用优惠券(<%=quan_no%>)抵消<%=fuhao%><%=quan_cash*hui%><%=danwei%><br>
<%end if%>

折后总计：<%totalcash=checkshui(totalcash*zhekou/100+sub_yunfei*hui-quan_cash*hui,shuidian,sub_fapiao)%><span class="price"><%=fuhao%> <%=FormatNum(totalcash)%> <%=danwei%></span><%if sub_fapiao=1 then%>(索要发票需要加收<%=shuidian%>%的税点)<%end if%>&nbsp;&nbsp;
获得积分：<%=totaljifen%>
</td></tr><%end if%>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>