{extend name="base"}

{block name="content"}
<div class="row">
	<div class="col-sm-12">
		<div class="card-box">
			<div class="row">
				<div class="col-sm-6">
					<form class="form-inline" role="form" action="" method="get">
						<div class="form-group">
							<input class="form-control input-daterange-datepicker"  style="width:200px;" type="text" name="date_range" value="{:urldecode($Think.get.date_range)}" placeholder="点击选择查询日期">
						</div>
						<button type="submit" class="btn btn-purple waves-effect waves-light"><i class="fa fa-search"></i> 搜索</button>
	                </form>
				</div>
				<div class="col-sm-6">
					<a href="?date_range={:urldecode($Think.get.date_range)}&action=dump" class="btn btn-purple waves-effect waves-light pull-right" target="_blank">批量导出</a>
				</div>
			</div>
			<!-- end row -->
			<div class="row">
				<table class="table table-striped m-0">
					<thead>
						<tr>
							<th>支付方式</th>
							<th>提交订单数</th>
							<th>已付订单数</th>
							<th>未付订单数</th>
							<th>订单总金额</th>
							<th>订单实收金额</th>
						</tr>
					</thead>
					<tbody>
						{foreach $statis as $v}
						<tr>
							<td>{$v.title}</td>
							<td>{$v.count}</td>
							<td>{$v.paid}</td>
							<td>{$v.unpaid}</td>
							<td>{$v.sum_money}</td>
							<td>{$v.sum_actual_money}</td>
						</tr>
						{/foreach}
						<tr>
							<td>合计</td>
							<td>{$counts.count}</td>
							<td>{$counts.paid}</td>
							<td>{$counts.unpaid}</td>
							<td>{$counts.sum_money}</td>
							<td>{$counts.sum_actual_money}</td>
						</tr>
					</tbody>
				</table>
			</div>
			<!-- end row -->
		</div>
	</div>
</div>
{/block}

{block name="appendJS"}

<script>

</script>

{/block}
