<extend name="Public/publicHTML" />
<block name="nav"></block>

<block name="content">
<link href="__COMMON__/daterangepicker/daterangepicker-bs3.css"
	rel="stylesheet" type="text/css" />
<script src="__COMMON__/daterangepicker/moment.min.js"
	type="text/javascript"></script> <script
	src="__COMMON__/daterangepicker/daterangepicker.js"
	type="text/javascript"></script>

<link rel="stylesheet" href="__COMMON__/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="__COMMON__/bootstrap/css/font-awesome.min.css" />
<div class="tabbable tabs-left">
	<div class="tab-content">
		<table class="table table-striped table-bordered">
			<thead>
				<th>订单统计</th>
			</thead>
			<tbody>
				<tr >
						<td colspan="4">
							<a
							href="analytics/default', array('controller'=>'Analytics', 'action'=>'orderStats'), array('query'=>array('dateNum'=>7))"
							class="btn <?php if($this->date_num == 6) echo 'btn-primary'; ?>">
								最近7天 </a>&nbsp; <a
							href="analytics/default', array('controller'=>'Analytics', 'action'=>'orderStats'), array('query'=>array('dateNum'=>30))"
							class="btn <?php if($this->date_num == 29) echo 'btn-primary'; ?>">
								最近30天 </a>&nbsp;&nbsp; 
						<input type="text" class="form-control w300"
							name="start_time" id="start_time"
							value="<?php if(isset($this->start_time)) echo $this->start_time; ?>"
							onfocus="AnalysisOrder.dataPick(this)"> ~ <input
							type="text" class="form-control w300" name="end_time"
							id="end_time"
							value="<?php if(isset($this->end_time)) echo $this->end_time; ?>"
							onfocus="AnalysisOrder.dataPick(this)">
							<button type="submit" class="btn btn-primary">查看</button>
						</td>
				</tr>
				<tr>
					<td width="25%"><b> 今日订单： </b > <em id="dayNumber"></em> </td>
					<td width="25%"><b> 本月订单： </b> <em id="dayMonth"></em></td>
					<td width="25%"><b> 已付款订单： </b> {$moneryTotal}</td>
					<td width="25%"><b> 订单总数： </b> {$totalNumber}</td>
				</tr>
				<tr>
					<td colspan="4">
						<div id="user_chart" class="user_chart"></div>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<div id="payment_type_chart" class="payment_type_chart"></div>
					</td>
					<td colspan="2">
						<div id="express_type_chart" class="payment_type_chart"></div>
					</td>
				</tr>
				<tr>
					<td colspan="4">
						<div id="order_map_chart" class="payment_type_chart"></div>
					</td>
				</tr>
			</tbody>
		</table>
		<script src="__COMMON__/js/alert.js?a={:time()}"></script>
		<script src="__COMMON__/js/echarts3.5/echarts.min.js"></script>
		<script src="__COMMON__/js/echarts3.5/theme/shine.js"></script>
		<script>
			var path="__COMMON__/js/echarts3.5/map/china.json";
			var NUMBER_DAY_URL = "{:U('curretDayNumber')}";
			var NUMBER_MOUTH_URL = "{:U('curretMonthNumber')}";
			var PAY_TYPE_URL     = "{:U('payMemtMonery')}";
			var DISTR_URL		 = "{:U('distributionMode')}";
			var AREA_URL_LIST	 = "{:U('getAreaOrderNumber')}";
			var DATA_STR = {$dataStr};
			var ORDER_NUMBER = {$dataNumber};
			var PAY_ORDER_NUMBER = {$payNumber};
			console.log(PAY_ORDER_NUMBER);
			console.log(ORDER_NUMBER);
		</script>
		<script src="__JS__/analysis/orderAnalysis.js?a={:time()}"></script>
	</div>
</div>
</block>