<{include file="index/header.html"}>
<div class="cnav"><a href="javascript:;" class="back">售后操作</a></div>
<style type="text/css">
.process ul li{ width:25%; }
.status{ width:100%; float:left; } 

.cbox{ width:100%; border:1px solid #efefef; background:#f8f8f8; float:left; }
.lft{ width:390px; position:absolute; border-right:1px solid #ddd; float:left; }
.rit{ border-left:1px solid #ddd; margin-left:390px; float:left; }

.time_line{ width:100%; border-bottom:1px solid #efefef; padding:10px 0 10px 0; float:left; }
.time_line span{ padding:0 30px 0 0; float: left; }
.plist{ width:100%; float: left;} 
.plist .name{ width:100%; background:#fff; border-bottom:1px solid #ddd; float:left; }
.plist .name span{ font-size:14px; padding:10px 0 5px 12px; float:left; }
.plist .con{ width:100%; float:left; }
.plist .con .label{ width:100%; border-bottom:1px solid #efefef; float:left; }
.plist .con .label p{ padding:5px 12px; float:left; }
 
table.info tr td{ padding:3px 0; height:20px; }
table.info tr td:first-child{ padding:3px 0; height:20px; }

.pro{ width:390px; margin:0 0 5px 30px; float:left; }
.pro img{ max-height:50px; max-width:50px; border:1px solid #efefef; float:left; }
.pro span{ width:300px; padding:0 0 0 8px; text-align:left; float:left; }
.pro span em{ font-style:inherit; color:#888; }

</style>
<div class="main"> 
<{if $row.error == '0'}>
	<div class="status">
		<div class="process">
			<ul>
				<li class="step <{if $row.status >= 1}>step1<{else}>step0<{/if}>">
					<div class="ttl">买家下单,等待支付</div>
					<div class="number">√</div>
					<div class="meta"><{if $row.addtime}><{$row.addtime}><{/if}></div>
				</li>
				<li class="step <{if $row.status >= 2}> step1<{else}>step0<{/if}>">
					<div class="ttl">确认发货,等待发货</div>
					<div class="number">√</div>
					<div class="meta"><{if $row.passtime}><{$row.passtime}><{/if}></div>
				</li>
				<li class="step <{if $row.status >= 3}> step1<{else}>step0<{/if}>">
					<div class="ttl">用户发货,确认收货</div>
					<div class="number">√</div>
					<div class="meta"><{if $row.oktime}><{$row.oktime}><{/if}></div>
				</li>
				<li class="step <{if $row.status == 4}> step1<{else}>step0<{/if}>">
					<div class="ttl">售后结束</div>
					<div class="number">√</div>
					<div class="meta"><{if $row.receipt_time}><{$row.receipt_time}><{/if}></div>
				</li>
			</ul>
		</div>
	</div>
	
	<div class="cbox">
		<div class="lft">
			<table class="etable info"> 
				<tr>  
					<td colspan="2">
						<div class="pro">
							<img src="<{$__IMG__}><{$gs_row.images|img_size:50x50}>">
							<span><a href="<{$__URI__}>goods/<{$gs_row.gid}><{$__HTML__}>" target="_blank"><{$gs_row.title}></a><br>
								<em>
									<{if $gs_row.sku}>
										<{foreach item=i from=$gs_row.sku}>
											<{$i.0}>:<{$i.1}>&nbsp;&nbsp;&nbsp; 
										<{/foreach}>
									<{/if}>
								</em>
							</span>
						</div>	
					</td>
				</tr>
				<tr>
					<td width="80">订单号：</td>
					<td><{$order_row.order_no}></td>
				</tr>
				<tr>
					<td>价格：</td>
					<td><{$gs_row.price}></td>
				</tr>
				<tr>
					<td>数量：</td>
					<td><{$gs_row.buy_num}></td>
				</tr> 
			</table>
		</div>
		<div class="rit">
			<form id="form" action="<{$__ADMIN__}>goods_order/refund_save" method="post" back="refresh">
				<{if $row.service_id}><input name="service_id" type="hidden" value="<{$row.service_id}>"/><{/if}>
				<table class="etable"> 
					<tr>
						<td width="100">售后编号：</td>
						<td><{$row.service_id}></td>
					</tr>
					<tr>
						<td>退款原因：</td>
						<td><{$row.reason}></td>
					</tr> 
					<tr>
						<td>退款金额：</td>
						<td><{$row.price}></td>
					</tr>
					<{if $row.remarks}>
						<tr>
							<td>申请备注：</td>
							<td><{$row.remarks}></td>
						</tr>
					<{/if}>
					<{if $row.status == '5'}>
						<tr>
							<td>售后状态：</td>
							<td>售后成功，完成售后。</td>
						</tr>
					<{elseif $row.status == '4'}> 
						<tr>
							<td>操作：</td>
							<td>
								<label><input type="radio" name="status" value="refund_price" checked="checked"/>认同买家并退款结束</label> 
								<label><input type="radio" name="status" value="refund_no_agreen"/>认同卖家并关闭售后</label> 
							</td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td><input type="submit" value="保存" class="submit"/></td>
						</tr>
					<{elseif $row.status == '0'}>
						<tr>
							<td>状态：</td>
							<td>订单关闭售后，无售后服务。</td>
						</tr> 
					<{/if}>  
				</table>
			</form> 
		</div>	
	</div>
	
	<div class="logcon">
		<div class="plist">
			<div class="name"><span>售后记录</span></div>
			<div class="con"> 
				<{foreach item=i from=$log}>
					<div class="label">
						<p><{$i.addtime}><br><{$i.content}></p>
					</div>
				<{/foreach}>
			</div> 
		</div>
	</div>
	
<{else}>
	<div class="nomsg"><{$row.msg}></div>
<{/if}> 
</div> 
<{include file="index/footer.html"}> 
<script type="text/javascript">
$(function(){
	$("input[name=status]").click(function(){
		val = $(this).val();
		if(val == 'refund_price'){
			$("#tk_action").show();
		}else{
			$("#tk_action").hide();
		} 
	});
	
});
</script>