{if $full_page}
{include file="page_header.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="post" action="order.php" name="list_form" id="list_form">
<div class="list-div" id="listDiv">
{/if}
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
<tr>
<td height="36" class="BotNavBg">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td width="50" align="left" style="padding-left:10px;">
	<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label></td>
	<td style="padding-left:5px;">
		<select name="type_up" id="sel_action_up" onchange="change_action(this);">
		<option value="">请选择...</option>
		<option value="drop">删除</option>
		</select>
	</td>
	<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
	</tr>
	</table>
</td>
</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="0" class="list-table">
		<tr class="thead">
		<th align="left" width="5%" ><input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" /> </th>
		<th width="20%" align="left">订单号</th>
		<th width="15%" align="left">会员</th>
		<th width="15%" align="right">总金额</th>
		<th width="15%" align="center">状态</th>
		<th width="20%" align="center"><a href="javascript:listTable.sort('date_added'); "><font color="#FFFFFF">日期</font></a>{$sort_date_added}</th>
		<th width="10%" align="left">操作</th>
		</tr>
		{foreach from=$order_list item=list}
		<tr>
		<td><input type="checkbox" name="checkboxes[]" value="{$list.order_id}" /></td>
		<td class="first-cell"><span>{$list.order_no|escape:html}</span></td>
		<td align="left"><span>{$list.user_name}</span></td>
		<td align="right"><span>￥{$list.total_amount}</span></td>
		
		<td align="center">
		<span>
		{if $list.status == 0}
		未付款
		{elseif $list.status == 1}
		已付款
		{elseif $list.status == 2}
		已发货
		{elseif $list.status == 3}
		完成
		{elseif $list.status == 4}
		取消
		{elseif $list.status == 5}
		退货
										
		{/if}
		</span>
		</td>
		<td align="center"><span>{$list.date_added}</span></td>
		<td align="right" nowrap="true" class="operation">
		<a href="order.php?act=detail&id={$list.order_id}{$strpass}" title="详细" class="op_edit"></a>
		<a href="javascript:;" onclick="listTable.remove({$list.order_id}, '您确实要删除该订单吗?')" title="删除" class="op_del"></a>
		</td>
		</tr>
		{foreachelse}
		<tr><td class="no-records" colspan="16">没有记录</td></tr>
		{/foreach}
	</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td height="36" class="BotNavBg">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="50" align="left" style="padding-left:10px;">
			<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label>
			</td>
			<td style="padding-left:5px;">
				<input type="hidden" name="act" value="batch" />
				<input type="hidden" name="type" value="" id="type" />
				<select name="type_down" id="sel_action_down" onchange="change_action(this);">
				<option value="">请选择...</option>
				<option value="drop">删除</option>
				</select>
			</td>
			<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
		</tr>
		</table>
	</td>
  </tr>
</table>
{if $full_page}
</div>
<script type="text/javascript">
	listTable.recordCount = {$record_count};
	listTable.pageCount = {$page_count};
	{foreach from=$filter item=item key=key}
	listTable.filter.{$key} = '{$item}';
	{/foreach}
	{literal}

	function change_action(obj){
		var sel_val = $(obj).val();	
		$('#type').val(sel_val);

		if(sel_val == 'drop' && confirm("确认删除?")){
			$("#list_form").submit();	
		}
		return false;
	}

	function select_all(obj){
		$('.list-table :checkbox').prop("checked",$(obj).prop('checked'));
	}
{/literal}
</script>
</form>
{insert_scripts files="tab.js"}
{include file="page_footer.htm"}
{/if}