<%'guidedisplay=1%>
<!--#include file="admin_start.asp" -->
<%
id=request("id")
if not MySys.check.isInteger(id) then
   MySys.Error.info = "请提交合法的栏目id！"
   MySys.Error.location = "back"
   MySys.Error.err()
End If

id=int(id)

rs.open"select * from jins_customer_order_list where customer_order_id="&id&" ",conn,1,1
if rs.eof then
   MySys.Error.info = "您请求的订单不存在！"
   MySys.Error.location = "back"
   MySys.Error.err()
End If
%>
<body topmargin="30" marginwidth="10" marginheight="10">
<form name=edit_html target=admin_edit_html method=post><input type=hidden name=c value=''><input type=hidden name=formname value=''><input type=hidden name=inputname value=''></form>
<table cellpadding="3" cellspacing="4" width="90%" height="30" align=center style='border:1px solid #ebebeb' >
	<tr>
		<td width="2%" align=right><img alt='点击弹开编辑框' onclick="opencat(basic_open)" style='CURSOR: hand' src="Images/index_search.gif" width="8" height="16"></td>
		<td  width="98%" align=left>
		<font color="#ebebeb"> | </font>
		<img alt='点击弹开提示信息框' onclick="opencat(help_ads_open)" style='CURSOR: hand' src="Images/icon_info.gif" width="13" height="13" hspace="0" align="absmiddle">			
		<font color="#ebebeb"> | </font>
		客户订单编辑
	    </td>
	</tr>		
	<tr id="help_ads_open" style="display:  ">
		<td colspan="10" align=left>
		<table cellpadding="4" cellspacing="2" width="99%" height="30" align=center style='border:1px dashed #B7B7B7' >
			<tr>
				<td colspan="8" width='100%' style="line-height:150% ">
				<input type=radio name=ffg value=gg checked> 表示此状态您可以修改。 
				<input disabled type=radio name=dfdfd value=dfdf >表示此状态您暂时不能修改。 
				<input disabled checked type=radio name=dddd value=dd >表示此状态已经完成。 				
	           </td>
			</tr>
		</table>
		</td>
	</tr>
	
	<tr id="basic_open" >
		<td colspan="10" align=left style='padding-bottom:5px'>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
        <form name=stat action="admin_user_customer_order_edit_handle.asp?action=edit&id=<%=request("id")%>" method=post>
			<tr>
				<td  width="100%" colspan="10" align=left style='padding-left:15px'>订单状态:
				<%
				'//////////////////////////////////////////////
				dim stat_d(6)
				dim stat(6,2)
				dim stat_n
				dim able
				
				stat_n=rs("customer_order_stat")
				
				stat(0,0)=0
				stat(0,1)=1
				
				stat(1,0)=1
				stat(1,1)=0
				
				stat(2,0)=2
				stat(2,1)=1
				
				stat(3,0)=3
				stat(3,1)=1
				
				stat(4,0)=4
				stat(4,1)=0
				
				stat(5,0)=5
				stat(5,1)=1
				
				stat_d(0)="未作任何处理"
				stat_d(1)="用户已付款"
				stat_d(2)="确认到款"
				stat_d(3)="已发货"
				stat_d(4)="用户收到货"
				stat_d(5)="订单完成"
				'//////////////////////////////////////////////
				for i=0 to 5
				'response.Write"<img hspace=5 src='images/mp3_num_0"&i+1&".gif' align=absmiddle >"
				
				if stat(i,1)=1 and stat_n=i-1 then
				response.Write"<input type=radio name=stat_c value="&i&" checked> <font color=red>"&stat_d(i)&"</font>"
				able=1
				else
				if stat_n>=i then
				response.Write"<input disabled checked type=radio name=stat_cc value="&i&" > "&stat_d(i)
				else
				response.Write"<input disabled type=radio name=stat_cc value="&i&" > "&stat_d(i)
				end if
				end if
				'response.Write 
				'if stat_n>=i then response.Write"<img hspace=5 src='images/yes.gif' align=absmiddle >"
				response.Write " > "
				next
				
				%>
				</td>
			</tr>
			<tr>
				<td height='1' colspan="9" background='images/dot03.gif'></td>
			</tr>
			<tr>
				<td height='1' colspan="9" align=center>
				<%if able=1 then %>
				<input type=submit  value='修改订单状态' >
				<%else%>
				<input type=submit disabled  value='暂时不能修改订单状态' >
				<%end if%>
				
				</td>
			</tr>
       </form>	
		</table><br>
		
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
        <form name=money action="admin_user_customer_order_edit_handle.asp?action=editmoney&id=<%=request("id")%>" method=post>
			<tr><td  width='20%' align=right>总 订 单 号 ：</td>
				<td  width='80%' align=left><%=rs("customer_order_mark")%></td>
			</tr>
			
			<tr><td  width='20%' align=right>子 订 单 号 ：</td>
				<td  width='80%' align=left><%=rs("customer_order_mark_children")%></td>
			</tr>
			
			<tr><td  width='20%' align=right >订单生成日期：</td>
				<td  width='80%' align=left ><%=rs("customer_order_addtime")%></td>
			</tr>
			
			<tr><td  width='20%' align=right>订 单 类 型 ：</td>
				<td  width='80%' align=left><%=rs("customer_order_kind")%></td>
			</tr>
			
			<tr><td  width='20%' align=right >订 单 状 态 ：</td>
				<td  width='80%' align=left ><font color=red><%=rs("customer_order_stat_description")%></font></td>
			</tr>
			
			<tr><td  width='20%' align=right >订 单 金 额 ：</td>
				<td  width='80%' align=left >
				<font color=red><%=MySys.info.unit_money(1)%>
				<%
				if rs("customer_order_stat")=0 then
				response.write "<input name=customer_order_money value='"&rs("customer_order_money")&"' type=text size=8 >"
				else
				response.write rs("customer_order_money")
				end if
				%>
				</font>
				 * 此处只有当订单状态为未做任何处理的时候可以修改
				</td>
			</tr>
			
			<tr><td  width='20%' align=right >支 付 方 式 ：</td>
				<td  width='80%' align=left ><%=rs("customer_order_payment_description")%></td>
			</tr>
			
			<tr><td  width='20%' align=right >送 货 方 式 ：</td>
				<td  width='80%' align=left ><%=rs("customer_order_deliverment_description")%></td>
			</tr>
		</table><br>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;border-bottom:0px ;padding:20px' >
			<tr>
			    <td  width='70%' align=left style='padding-left:48px'>商 品 名 称 </td>
				<td  width='15%' align=center>商 品 数 量 </td>
				<td  width='15%' align=center >商品总计价格</td>
			</tr>
		</table>
<%
dim num_goods
dim sum_goods
num_goods=0
sum_goods=0
set rss=conn.execute("select * from jins_customer_order_list where customer_order_mark='"&rs("customer_order_mark")&"' order by customer_order_id ")
do while not rss.eof 
%>
		<table cellpadding="4" cellspacing="2" bgcolor='#ffffff' width="99%" height="30" align=center style='border:1px dashed #808080;border-bottom:0px ;padding:20px' >
			<tr>
				<td  width='70%' align=left style='padding-left:48px'><%=rss("goods_name")%></td>
				<td  width='15%' align=center><%=rss("customer_order_goods_num")%></td>
				<td  width='15%' align=center ><font color=red><%=MySys.info.unit_money(1)%><%=rss("customer_order_goods_price")*rss("customer_order_goods_num")%></font></td>
			</tr>
		</table>
<%
num_goods=num_goods+rss("customer_order_goods_num")
sum_goods=sum_goods+rss("customer_order_goods_price")*rss("customer_order_goods_num")
rss.movenext
loop
set rss=nothing
%>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
			<tr>
			    <td  width='70%' align=left style='padding-left:48px'>总计：</td>
				<td  width='15%' align=center><font color=red><%=num_goods%></font></td>
				<td  width='15%' align=center ><font color=red><%=MySys.info.unit_money(1)%> <%=sum_goods%></font></td>
			</tr>
		</table>
        <br>
		
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
			<tr>
				<td  width='20%' align=right>真实姓名：</td>
				<td  width='80%' align=left><%=rs("customer_order_buyer_realname")%></td>
			</tr>
			
			<tr><td  width='20%' align=right >真实地址：</td>
				<td  width='80%' align=left ><%=rs("customer_order_buyer_address")%></td>
			</tr>
			
			<tr><td  width='20%' align=right>邮 编 ：</td>
				<td  width='80%' align=left><%=rs("customer_order_buyer_postcode")%></td>
			</tr>
			
			<tr>
				<td  width='20%' align=right >联系电话：</td>
				<td  width='80%' align=left ><%=rs("customer_order_buyer_telnumber")%></td>
			</tr>
			
			<tr><td  width='20%' align=right>Email地址:</td>
				<td  width='80%' align=left><%=rs("customer_order_buyer_email")%></td>
			</tr>
			
			<tr><td  width='20%' align=right >性 别 ：</td>
				<td  width='80%' align=left >
				<%if rs("customer_order_buyer_sex")=1 then response.write "男"%>
				<%if rs("customer_order_buyer_sex")=0 then response.write "女"%>
				</td>
			</tr>
		</table><br>

		</td>
	</tr>

	<tr>
		<td height='1' colspan="9" background='images/dot03.gif'></td>
	</tr>
	
	<tr>
	  <td height='30' colspan="8" width='100%' align=center >
	  <a href="javascript:neww=window.open('admin_user_customer_order_edit_handle.asp?back=1&action=delete&ids=<%=request("id")%>');neww.focus();" ><font color=red>删除此订单！</font></a>
	  <%if rs("customer_order_stat")=0 then%>
	  <input type=submit value="修改订单金额" > 
	  <%end if%>
	  <input type=button onclick='print()' value="打印此订单！" > 
       <input type=reset value="重置" > 
	   <input onclick='history.back(-1)' type=button value="返回" >	  </td>
	</tr>
</table>		
</form>
<SCRIPT language=javascript>
	function opencat(cat)
	{
 	 	if(cat.style.display=="none"){
     	cat.style.display="";
  		} else {
     	cat.style.display="none"; 
  		}
	}</SCRIPT>
<%
rs.close
%>
<!--#include file="admin_end.asp" -->