<%if session("bjxadmin")="" then
response.Write "<script LANGUAGE='javascript'>alert('网络超时或者您还没有登录请登录');window.location.href='../login.asp';</script>"
response.End
else
if session("flag")>2 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
%>
<!--#include file="conn.asp"-->
<html>
<head>
<title>订单详细信息</title>
<script language="javascript">
<!--
function checkQty(form){
		ads.style.display = "none";
   document.all.WebBrowser.ExecWB(6,1)
   
}
-->
</script>
<script language="javascript">
<!--
function checkQtys(form){
		ads.style.display = "none";
  document.all.WebBrowser.ExecWB(6,6)
 }
-->
</script>
<script>
function showadv(){
if (document.form1.advshow.checked == true) {
		adv.style.display = "";
		ads.style.display = "";
	}else{
		adv.style.display = "none";
		
	}
}		
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<style><!--
body,td,th {
	color: #000000;
}
body {
	background-color: #C7D4F7;
}
-->
</style></head>
<body text="#000000">
  <%
id=request("id")
if not isnumeric(id) then 
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
response.end
end if
  set rs=server.createobject("adodb.recordset")
  sql="SELECT * FROM tuangou  where tgid="&id&" "
  rs.open sql,conn,3,1
  if rs.eof then 
  response.write "没有订单！"
  end if 
 %>
  <br>
  <table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#CCCCCC">
    <tr> 
      <td bgcolor="#FFFFFF"> <div align="center"><font color="#009933"><b>团购/批发<%=rs("bookname")%>订单详细信息</b></font></div></td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF"> <table width="95%" align="center">
          <tr bgcolor="#f1f1f1" align="center">
            <td width="23%"><strong>订单ID</strong></td> 
            <td width="31%"><b>商品名称</b></td>
            <td width="18%" bgcolor="#f1f1f1"><strong>类型</strong></td>
            <td width="18%"><strong> 单价</strong></td>
            <td width="12%" align="center"><b>数量</b></td>
          </tr>
          <tr bgcolor="#f1f1f1" align="center">
            <td width="23%"><%=id%></td> 
            <td width="31%"><%=rs("bookname")%></td>
            <td width="18%"><%if rs("rad")=1 then 
		   response.write "<font color=red>批发</color>"
		   else 
		    if rs("rad")=2 then
			response.write "集团采购" 
		     end if
		     end if %></td>
            <td width="18%"><% =rs("huiyuanjia")%></td>
            <td width="12%" align="center"><% =rs("shuliang")%></td>
          </tr>
          <tr bgcolor="#f1f1f1" align="center">
            <td>&nbsp;</td> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><b>小　　计</b></td>
            <td align="center" bgcolor="#f1f1f1"><span class="style1"><%=rs("huiyuanjia")*rs("shuliang")%>元</span></td>
          </tr>
          <tr bgcolor="#f1f1f1" align="center"> 
            <td colspan="5"> </td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF"> </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF" height="48"> <div align="center"><b>收货人信息</b></div></td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF"> <table width="95%" align="center">
        <tr bgcolor="#f1f1f1"> 
          <td width="15%" align="center"><b>客户姓名：</b></td>
          <td width="20%" align="center"><div align="left"><% =rs("forname")%></div></td>
          <td width="15%" align="center"><b>联系电话：</b></td>
          <td width="15%" bgcolor="#f1f1f1"><% =rs("tel")%></td>
          <td width="15%" bgcolor="#f1f1f1"><div align="center"><strong>Email：</strong></div></td>
          <td bgcolor="#f1f1f1"><% =rs("formail")%></td>
        </tr>
        <tr bgcolor="#f1f1f1"> 
          <td width="15%" align="center"><b>送货地址：</b></td>
          <td colspan="3" align="left"><% =rs("addr")%></td>
          <td width="15%" align="center"><strong>邮政编码：</strong></td>
          <td width="22%" align="center"><% =rs("youbian")%></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <hr width="90%" color=#cccccc noShade size=1>
  
<form name="form" method="post" action="detailor.asp">
  <table width="80%" border="0" cellspacing="0" cellpadding="0" align="center" id=ads style="DISPLAY: ">
    <tr> 
      <td align="center"><OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>
        </OBJECT>
        <input type="hidden" name=id value=<%=id%>> <input name="Submit" type="submit" class="go-wenbenkuang" value="好,发货"> 
        <input name="Submit" type="submit" class="go-wenbenkuang" value="货已到">
        <input name="Submit" type="submit" class="go-wenbenkuang" value="返回上页">
        <input type=button class="go-wenbenkuang" onClick="return checkQtys(this.form);" value=直接打印> 
        <input type=button class="go-wenbenkuang" onclick=document.all.WebBrowser.ExecWB(8,1) value=页面设置> 
        <input type=button class="go-wenbenkuang" onclick=document.all.WebBrowser.ExecWB(7,1) value=打印预览> 
      </td>
    </tr>
  </table>
</form>
</body>
</html>
<%  oprat=request.form("submit")
    id=request.form("id")		    
	if oprat<>"" and id<>"" then 
	   if oprat="好,发货" then 
	       set rs=server.createobject("adodb.recordset")
	       sql="select * from tuangou where tgid="&id&""
           rs.open sql,conn,1,3
		   rs("action")=1
		   rs.update
            'conn.Execute("update tuangou set action=1  where tgid="&id&"")			
           rs.close
           response.redirect "index.asp"
		else 
		    if oprat="货已到" then 
		   set rs=server.createobject("adodb.recordset")
		   sql="select * from tuangou where tgid="&id&""
           rs.open sql,conn,1,3 
		   rs("action")=2
		   rs.update
           'conn.Execute("update tuangou set action=2  where tgid="&id&"")			
            rs.close
           response.redirect "index.asp"
		else 
		    if oprat="返回上页" then 
			response.redirect "index.asp"
			end if
		 end if 
		end if
   	end if %>

