<{import file="header.html" title="订单详情"}> 
<link type="text/css" rel="stylesheet" href="<{$__APP__}>public/css/s_order_detail.css?v=<{$js_version}>"> 
<{uqcms m="order" v="row" c="get_one:order_no=smarty.get.oid&is_shop=1"}>
<{if $row.error == '0'}>
<div class="lbox"> 
	<div class="process">
		<ul>
			<li class="step <{if $row.order.order_status >= 1}>step1<{else}>step0<{/if}>">
				<div class="ttl">买家下单</div>
				<div class="number">√</div>
				<div class="meta"><{if $row.order.addtime}><{$row.order.addtime}><{/if}></div>
			</li>
			<li class="step <{if $row.order.order_status >= 2}> step1<{else}>step0<{/if}>">
				<div class="ttl">已经付款</div>
				<div class="number">√</div>
				<div class="meta"><{if $row.order.pay_time}><{$row.order.pay_time}><{/if}></div>
			</li>
			<li class="step <{if $row.order.order_status >= 3}> step1<{else}>step0<{/if}>">
				<div class="ttl">卖家发货</div>
				<div class="number">√</div>
				<div class="meta"><{if $row.order.deliver_time}><{$row.order.deliver_time}><{/if}></div>
			</li>
			<li class="step <{if $row.order.order_status >= 4}> step1<{else}>step0<{/if}>">
				<div class="ttl">等待收货</div>
				<div class="number">√</div>
				<div class="meta"><{if $row.order.receipt_time}><{$row.order.receipt_time}><{/if}></div>
			</li>
			<li class="step <{if $row.order.order_status >= 5}> step1<{else}>step0<{/if}>">
				<div class="ttl">互相评价</div>
				<div class="number">√</div>
				<div class="meta"><{if $row.order.comment_time}><{$row.order.comment_time}><{/if}></div>
			</li>
		</ul>
	</div> 
	<div class="oStatus"> 
		<div class="address">
			<div class="name"><span>发货地址</span></div>
			<div class="con"> 
				<div class="addD"><h3>姓名：</h3> <span><{$row.express.name}></span></div> 
				<div class="addD"><h3>电话：</h3> <span><{$row.express.mobile}></span></div> 
				<div class="addD">
					<h3>地址：</h3>
					<span><{$row.express.prov_cn}> <{$row.express.city_cn}> <{$row.express.dist_cn}> , <{$row.express.address}> </span>
				</div> 
				<{if $row.express.zip != '' }>
					<div class="addD"><h3>邮编：</h3> <span> <{$row.express.zip}></span></div>
				<{/if}> 
				<div class="addD"><h3>留言：</h3> <span><{$row.order.message}></span> </div> 
			</div>
		</div>
		
		<div class="oinfo"> 
			<div class="ono">
				<h3>订单编号：</h3>
				<span><{$row.order.order_no}></span>
			</div> 
			<{if $row.order.order_status == 1}>
				<div class="oname"><h3>等待买家付款</h3></div>
			<{elseif $row.order.order_status == 2}> 
				<div class="oname"><h3>等待买家收货</h3></div>
				<div class="kdBox">
					<div class="name"><span>发送快递</span></div>
					<form action="<{$__SELLER__}>order/send_goods" method="post" id="form">
						<input type="hidden" name="oid" value="<{$row.order.order_no}>"/> 
						<table class="etable">
							<tr>
								<td width="80">选择快递：</td>
								<td> 
									<select name="kd_code">
										<option value="0">--选择快递--</option> 
										<{uqcms m="common" v="express" c="category:name=express"}>
										<{foreach item=i key=k from=$express}>		
											<option value="<{$k}>"<{if $k == $row.express.kd_code}> selected="selected"<{/if}>><{$i}></option>
										<{/foreach}>			 
									</select>
								</td>
							</tr>
							<tr class="kd_code">
								<td>快递单号：</td>
								<td><input type="text" name="kd_number" size="28" value="<{$row.express.kd_number}>" autocomplete="off"/></td>
							</tr>
							<{if $UQCMS.auth_express}>
								<tr class="kd_code">
									<td>快递申请：</td>
									<td><a href="<{$__SELLER__}>express_print/order?oid=<{$row.order.order_no}>">申请单号</a></td>
								</tr>
							<{/if}>
							<tr>
								<td></td>
								<td><input type="submit" name="submit" class="submit" value="发货"></td>
							</tr>
						</table> 
					 </form> 
				</div>
			<{elseif $row.order.order_status == 3}>
				<div class="oname"><h3>卖家已发货</h3></div>
			<{elseif $row.order.order_status == 4}>
				<div class="oname"><h3>买家已经收货</h3></div> 
			<{elseif $row.order.order_status == 5}>
				<div class="oname"><h3>交易结束</h3></div>
			<{else}>
				<div class="oname"><h3>交易关闭</h3></div>
				<div class="odesc"><span>取消原因：<{$row.order.cancel_reason}></span></div> 
			<{/if}>
			
			<{if $row.order.order_status == '3' || $row.order.order_status == '4'}> 
				<div class="wl"> 
					<span>物流信息</span>
					<dl>
						<dt>快递公司：</dt>
						<dd><{if $row.express.kd_name}><{$row.express.kd_name}><{else}>--<{/if}></dd>
					</dl>
					<dl>
						<dt>运单号码：</dt>
						<dd><{if $row.express.kd_number}><{$row.express.kd_number}><{else}>--<{/if}></dd>
					</dl> 
					<!--dl>
						<div class="exp_pro"><ul>加载中...</ul></div>
					</dl--> 
				</div>
			<{/if}>		
		</div>
	</div>
	 
	<div class="gcon"> 
		<div class="name"><span>购买清单</span></div>
		<table class="ltable">
			<thead>
				<tr>
					<th>商品</th>
					<th width="100">单价（元）</th>
					<th width="100">数量</th> 
					<th width="100">总价（元）</th>
				</tr>
			</thead>
			<tbody>
				<{foreach item=i from=$row.glist}>
					<tr>
						<td style="text-align:left;"> 
							<div class="box_content">
								<div class="img">
									<a href="<{$__URI__}>goods/<{$i.gid}><{$__HTML__}>" target="blank">
										<img src="<{$__IMG__}><{$i.images|img_size:50x50}>" width="50"/>
									</a>
								</div>
								<div class="desc">
									<div class="ttl"><a href="<{$__URI__}>goods/<{$i.gid}><{$__HTML__}>" target="blank"><{$i.title}></a></div>
									<div class="sku">
										<{if $i.sku}>
											<{foreach item=s from=$i.sku}>		
												<span><{$s.0}> : <{$s.1}> &nbsp;&nbsp; </span> 
											<{/foreach}>
										<{/if}>
									</div>
								</div> 
							</div>		
						</td>
						<td><{$i.price}></td>
						<td><{$i.buy_num}></td> 
						<td><{$i.total_price}></td> 
					</tr>
				<{/foreach}>
			</tbody> 
		</table> 
		<div class="total_price">
			<div class="srit">
				<dl>
					<dt>产&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;品：</dt>
					<dd>￥<{$row.order.goods_price}></dd>
				</dl> 
				<{if $row.order.coupon_price}>
					<dl>
						<dt>优&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;惠：</dt>
						<dd>￥-<{$row.order.coupon_price}></dd>
					</dl>
				<{/if}> 
				<dl>
					<dt>快&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;递：</dt>
					<dd>￥<{$row.order.express_price}></dd>
				</dl> 
				<dl>
					<dt class="total">实际付款：</dt>
					<dd class="total">￥<{$row.order.total_price}></dd>
				</dl> 
			</div> 
		</div> 
		
	</div>
</div>
<{else}>
	订单不存在
<{/if}>
<{import file="footer.html"}> 