<div class="headbar">
	<div class="position">订单<span>></span><span>单据管理</span><span>></span><span>退款回收站</span></div>
	<div class="operating">
		<a href="javascript:;"><button class="operating_btn" type="button" onclick="window.location='{url:/order/order_refundment_list}'"><span class="import">返回列表</span></button></a>
		<a href="javascript:void(0)" onclick="selectAll('id[]')"><button class="operating_btn" type="button"><span class="sel_all">全选</span></button></a>
		<a href="javascript:void(0)" onclick="refundment_del()"><button class="operating_btn" type="button"><span class="delete">彻底删除</span></button></a>
		<a href="javascript:void(0)" onclick="refundment_restore()"><button class="operating_btn"><span class="recover">还原</span></button></a>
	</div>
</div>
<form name="orderForm" action="" method="post">
<div class="content">
	<table class="list_table">
		<colgroup>
			<col width="30px" />
			<col width="30px" />
			<col width="180px" />
			<col />
		</colgroup>

		<thead>
			<tr>
				<th>选择</th>
				<th></th>
				<th>订单号</th>
				<th>收货金额</th>
				<th>付款人</th>
				<th>支付状态</th>
				<th>申请时间</th>
			</tr>
		</thead>

		<tbody>
			{set:$page= (isset($_GET['page'])&&(intval($_GET['page'])>0))?intval($_GET['page']):1;}
			{query: name=refundment_doc as c join=left join order as o on c.order_id eq o.id left join member as m on m.user_id eq c.user_id fields=o.order_no,c.amount,m.true_name,c.id,o.id as oid,c.pay_status,c.time where=c.if_del eq 1 and c.pay_status neq 0  order= c.id desc page=$page }
			<tr>
				<td><input name="id[]" type="checkbox" value="{$item['id']}" /></td>
				<td><a href="{url:/order/order_show/id/$item[oid]}"><img class="operator" src="{skin:images/admin/icon_check.gif}" title="查看" /></a></td>
				<td>{$item['order_no']}</td>
				<td>{$item['amount']}</td>
				<td>{$item['true_name']}</td>
				<td>{if:$item['pay_status']==0}申请退款{elseif:$item['pay_status']==1}退款失败{else:$item['pay_status']==2}退款成功{/if}</td>
				<td>{$item['time']}</td>
			</tr>
			{/query}
		</tbody>
	</table>
</div>
{$query->getPageBar()}
</form>
<script type="text/javascript">
function refundment_restore()
{
	$("form[name='orderForm']").attr('action','{url:/order/refundment_recycle_restore}');
	confirm('确定要还原所选中的信息吗？','formSubmit(\'orderForm\')');
}
function refundment_del()
{
	$("form[name='orderForm']").attr('action','{url:/order/refundment_recycle_del}');
	confirm('确定要彻底删除所选中的信息吗？','formSubmit(\'orderForm\')');
}
</script>