<%@ LANGUAGE="VBScript" %>
<!--#include file="Conn.asp" -->
<!--#include file ="Check_Manager.asp"-->
<%
If Request.QueryString("action")="hand" Then
Call Updateshop
End if
Set rs = Server.CreateObject("ADODB.recordset")
sql="Select * From [ShopOrder] Where Form_Id="&Request("id")
rs.open sql,conn,1,1
If rs.Eof Then
Response.write "<br><center><font size=3>没有你想查询订单的资料!</font><br><br>"
Response.Write "<input type='button' value=' 返 回 ' name='B4' onclick='javascript:history.go(-1)'></center>"
Else
%>
<HTML>
<HEAD>
<TITLE>购物订单查询</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="admin/admin.css" type=text/css rel=stylesheet>
</HEAD>
<BODY>
<br>
<DIV align=center>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><p align="center"><font color="#000000"><strong>购物订单详细资料</strong></font></p>
        <TABLE width=520 align="center" cellPadding=4 cellSpacing=4 class=tableBorder>
          <TBODY>
            <TR> 
              <TD  width=331 bgColor=#FFFFFF height=3 align="right"> <p align="right">订货单号：</p></TD>
              <TD  width=637 height=3 bgcolor="#FFFFFF"> <p> <%=rs("Form_Id")%> 
                </p></TD>
            </TR>
            <TR> 
              <TD bgColor=#FFFFFF height=3 align="right"> <div align="right">公司名称：</div></TD>
              <TD  width=637 height=3 bgcolor="#FFFFFF"><%=rs("Compname")%> </TD>
            </TR>
            <tr> 
              <TD  width=331 bgColor=#FFFFFF height=7 align="right"> <p align="right">收货人：</p></TD>
              <TD  width=637 height=7 bgcolor="#FFFFFF"> <p><%=rs("Somane")%> 
                </p></TD>
            </tr>
            <tr> 
              <TD  width=331 bgColor=#FFFFFF height=7 align="right"> <p align="right">收货地址：</p></TD>
              <TD  width=637 height=7 bgcolor="#FFFFFF"> <p><%=rs("Address")%> 
                </p></TD>
            </tr>
            <tr> 
              <TD  width=331 bgColor=#FFFFFF height=7 align="right"> <p align="right">邮政编码：</p></TD>
              <TD  width=637 height=7 bgcolor="#FFFFFF"> <p><%=rs("Zip")%> </p></TD>
            </tr>
            <tr> 
              <TD  width=331 bgColor=#FFFFFF height=3 align="right"> <p align="right">联系电话：</p></TD>
              <TD  width=637 height=3 bgcolor="#FFFFFF"> <p><%=rs("Phone")%> </p></TD>
            </tr>
            <tr> 
              <TD align="right" bgColor=#FFFFFF> <div align="right">联系传真：</div></TD>
              <TD  width=637 bgcolor="#FFFFFF"><%=rs("Fox")%> </TD>
            </tr>
            <tr> 
              <TD align="right" bgColor=#FFFFFF> <div align="right">联系E-mail：</div></TD>
              <TD  width=637 bgcolor="#FFFFFF"><%=rs("Email")%> </TD>
            </tr>
            <tr> 
              <TD align="right" bgColor=#FFFFFF><div align="right">所选汇款账号：</div></TD>
              <TD  width=637 bgcolor="#FFFFFF"><%=rs("Bank")%></TD>
            </tr>
            <tr> 
              <TD align="right" bgColor=#FFFFFF><div align="right">备注：</div></TD>
              <TD  width=637 bgcolor="#FFFFFF"><%=rs("Remark")%></TD>
            </tr>
            <tr> 
              <TD align="right" bgColor=#FFFFFF><div align="right">订货日期：</div></TD>
              <TD  width=637 bgcolor="#FFFFFF"><%=rs("RegTime")%></TD>
            </tr>
            <tr> 
              <TD align="right" bgColor=#FFFFFF><div align="right">订单是否已经处理：</div></TD>
              <TD  width=637 bgcolor="#FFFFFF"><%=rs("Flag")%></TD>
            </tr>
            <tr> 
              <TD height="80" colspan="2" align="right" bgColor=#FFFFFF> 
                <%Set pro=Conn.Execute("Select * From ShopList Where ShopForm_Id="&Request("id"))
				%>
                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                  <tr> 
                    <td width="17%" bgcolor="#eeeeee"><div align="center">产品编号</div></td>
                    <td width="23%" bgcolor="#eeeeee"><div align="center">产品名称</div></td>
                    <td width="46%" bgcolor="#eeeeee"><div align="center">产品类别</div></td>
                    <td width="14%" bgcolor="#eeeeee"><div align="center">产品数量</div></td>
                 </tr>
				 <%If pro.Eof Then
				Response.Write "没有产品清单"
				Else
				Do While Not pro.Eof %>
                  <tr> 
                    <td bgcolor="#FFFFFF"><div align="center"><%=pro("Product_Id")%></div></td>
                    <td bgcolor="#FFFFFF"><div align="center"><%=pro("Product_Name")%></div></td>
                    <td bgcolor="#FFFFFF"> <div align="center"><%=pro("BigClassName")%> 
                        >> <%=pro("SmallClassName")%></div></td>
                    <td bgcolor="#FFFFFF"><div align="center"><%=pro("Number")%></div></td>
                  </tr>
				  <%pro.MoveNext
				  Loop
				  End if%>
                </table>
                <%pro.Close%>
              </TD>
            </tr>
<%If rs("Flag")="已经发货" Then
Response.Write ""
Else%>
            <TR bgColor=#FFFFFF> 
              <TD height="25"  colSpan=2> <DIV align=center> 
                  <form name="form1" method="post" action="Shop_View.asp?action=hand&id=<%=rs("Form_Id")%>">
                    <input type="submit" name="Submit" value="订单处理">
                  </form>
                </DIV></TD>
            </TR>
			<%End if%>
          </TBODY>
        </TABLE></td>
    </tr>
  </table>
</DIV>
</BODY>
</HTML>
<%
End if
rs.close
conn.close
Sub Updateshop
Sql = "Update [ShopOrder] Set Flag='已经发货' Where Form_Id="&Request("id")
Conn.Execute (Sql)
JaSys("管理员" & session("ManagerUser") & "<font color=red>订单处理ID"&Request("id")&"</font>成功")
Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('订单处理成功!请按客户详细地址发货...');" & Chr(13)
		Response.write "window.document.location.href='Shop_Manage.asp';"&Chr(13)
		Response.write "</script>" & Chr(13)
Response.End
End Sub 
%>