<!--#include file="include/conn.asp"-->
<%Call limsss(sQxa,"$$lstRoadorder$$")%>
<html>
<title>订单管理</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../css/lst.css" rel="stylesheet" type="text/css" />
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2"><tr><td height="31"><div class="titlebt">线路订单</div></td></tr></table>
<table border="1" width="100%" cellpadding="0" style="border-collapse: collapse" bordercolor="#B5D0D9" bgcolor="#FFFFFF">
	<tr>
		<td>
<%If action="edd" Then%>
<%
Set oRs = server.CreateObject ("adodb.recordset")
sSql="select * from LstOrder where Id="& Id
oRs.open sSql,oConn,1,1
%>
<div id="whitebigid<%=oRs("Id")%>" class="whitebig">
	<div class="stitlesx">
		<h1>查看订单</h1>
		<div class="mores"><a href = "javascript:void(0)" onclick = "document.getElementById('whitebigid<%=oRs("Id")%>').style.display='none';document.getElementById('blackbigid<%=oRs("Id")%>').style.display='none'">关闭</a></div>
	</div>
	<div class="sconts">
		<ul><form action="?action=eddorder&Id=<%=oRs("Id")%>" method=post>
			<table border="0" width="100%" id="table3" cellspacing="0" style="border-collapse: collapse" bordercolor="#D3DCE0" cellpadding="0" bordercolorlight="#D3DCE0" bordercolordark="#C0C0C0">
				<tr>
					<td height="30" align="right" width="150">订单编号：</td>
					<td height="30"  class="fmoney20"><%=oRs("OrderNo")%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">线路名称：</td>
					<td height="30"><%=NEWSNAME(oRs("RoadId"))%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">单价：</td>
					<td height="30" class="fmoney20"><%=oRs("OrderMoney")%> 元</td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">抵达与离开：</td>
					<td height="30"><%=oRs("OrderKtime")%> - <%=oRs("OrderJtime")%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">人数：</td>
					<td height="30"  class="fmoney20"><%=oRs("OrderRen")%> 人</td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">总价：</td>
					<td height="30"  class="fmoney20"><%=oRs("OrderZmoney")%> 元</td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">联系电话：</td>
					<td height="30"><%=oRs("OrderTel")%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">联系人：</td>
					<td height="30"><%=oRs("OrderName")%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">联系地址：</td>
					<td height="30"><%=oRs("OrderAddress")%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">联系QQ：</td>
					<td height="30"><%=oRs("OrderQQ")%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150">是否付款：</td>
					<td height="30"><%=YESZHIFU(oRs("Omoney"))%></td>
				</tr>
				<tr>
					<td height="30" align="right" width="150"><select name="llll">
					<option value="<%=oRs("OState")%>"><%=FAHUO(oRs("OState"))%></option>
					<option value="0">暂未处理</option>
					<option value="1">正在服务</option>
					<option value="2">无效订单</option>
					<option value="3">退款订单</option>
					<option value="9">完成订单</option>
					</select></td>
					<td height="30">
					<input name="rr" value="立即处理" type="submit"></td>
				</tr>
			</table>
		<ul></form>
	</div>
</div> 
<div id="blackbigid<%=oRs("Id")%>" class="blackbig"></div>
<%End If%>
<table border="1" width="100%" id="table3" cellspacing="0" style="border-collapse: collapse" bordercolor="#F6F6F6" cellpadding="0">
<tr>
<td height="30" align="center" bgcolor="#F6F6F6"><b>订单编号</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>单价</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>抵达时间</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>离开时间</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>人数</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>总价</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>联系电话</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>付款</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>标记状态</b></td>
<td height="30" align="center" bgcolor="#F6F6F6"><b>操作</b></td>
</tr>
<%
If keyword="" Then 
sSql="select * from [LstOrder] where RoadId>0 and fangid=0 order by Id desc"
Else 
sSql="select * from [LstOrder] where OrderNo like '%"&keyword&"%' and RoadId>0 and fangid=0 order by Id desc"
End If
Set oRs = Server.CreateObject("ADODB.Recordset")
oRs.Open sSql, oconn, 1, 1
If oRs.eof and oRs.bof then
Response.Write ""
Else
Call PageNum(25)
for i=1 to mypage
%>
<tr>
<form action="?action=eddorder&Id=<%=oRs("Id")%>" method=post>
<td height="30" align="center" bgcolor="#FFFFFF"><a href=?action=edd&id=<%=oRs("Id")%>><b><%=oRs("OrderNo")%></b></a></td>
<td height="30" align="center" bgcolor="#FFFFFF" style="line-height:25px;" class="fmoney20"><%=oRs("OrderMoney")%></td>
<td height="30" align="center" bgcolor="#FFFFFF" style="line-height:25px;"><%=oRs("OrderKtime")%></td>
<td height="30" align="center" bgcolor="#FFFFFF"><%=oRs("OrderJtime")%></td>
<td height="30" align="center" bgcolor="#FFFFFF"><%=oRs("OrderRen")%></td>
<td height="30" align="center" bgcolor="#FFFFFF"><%=oRs("OrderZmoney")%></td>
<td height="30" align="center" bgcolor="#FFFFFF"><%=oRs("OrderTel")%></td>
<td height="30" align="center" bgcolor="#FFFFFF"><%=YESZHIFU(oRs("Omoney"))%></td>
<td height="30" align="center" bgcolor="#FFFFFF">
<%If (oRs("Omoney"))=2 Then%>
无效订单
<%Else%>
<select name="llll">
<option value="<%=oRs("OState")%>"><%=FAHUO(oRs("OState"))%></option>
<option value="0">暂未处理</option>
<option value="1">正在服务</option>
<option value="2">无效订单</option>
<option value="3">退款订单</option>
<option value="9">完成订单</option>
</select>
<input name="rr" value="立即处理" type="submit">
<%End If%>
</td>
<td height="30" align="center" bgcolor="#FFFFFF"><a href="?action=delorder&Id=<%=oRs("Id")%>"><img src=../images/ico/del.gif></a></td>
</tr>
</form>
<%
oRs.MoveNext
Next
End If
%>
</table>

<table border="0" width="100%" cellspacing="3" cellpadding="3">
	<tr>
		<td align="center" height="30"><%Call PageUrl("?g=z",25)%></td>
	</tr>
</table>	

		</td>
	</tr>
</table>
</body>
</html>
<%
'删除订单
If action="delorder" then
		set ors=Server.CreateObject("ADODB.Recordset")
		sSql="delete * from [LstOrder] WHERE Id = "&Id&" "
		ors.open sSql,oconn,1,3
		set ors=nothing
		call alert("删除成功!","lstRoadorder.asp")
End if
'处理订单
If action="eddorder" Then
	Set oRs=server.createobject("adodb.recordset")
	sSql="Select * from [LstOrder] where id="&Id
	oRs.open sSql,oconn,1,3
		oRs("OState")=trim(request("llll"))
		oRs("OChuTime")=now()
		oRs.update
		oRs.close
		call alert("处理成功!","lstRoadorder.asp")
	Set oRs = Nothing
End If
%>