<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->
<script src="<!--{$urlpath}-->tpl/static/charts/highcharts.src.js"></script>
<script src="<!--{$urlpath}-->tpl/static/charts/modules/exporting.src.js"></script>
<!--{if $a == "run"}-->
<div class="oemarry_layout">
  <div class="oe_top_nav"><i></i>报表统计->商家入驻报表</div>
  <div class="oe_content">
    <h6>会员商家入驻报表分析</h6>
	<form id="moreform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post" />
	<input type="hidden" name="a" id="a" value="moremonths" />
    <table class="oe_table_wrap">
	  <tr>
	    <th width="15%">选择月份范围：<span class="f_red">*</span></th>
		<td width="85%">
		  <input type="text" name="starttime" id="starttime" class="input-120" /> 至
		  <input type="text" name="endtime" id="endtime" class="input-120" value="<!--{$time|date_format:"%Y-%m"}-->" /> 
		  （月份格式如：<!--{$time|date_format:"%Y-%m"}-->）
		</td>
	  </tr>
	  <tr>
	    <td></td>
		<td><input type="button" id="btn_more" class="button_2" value="查看报表" /> </td>
	  </tr>
	</table>
	</form>

  </div>
</div>
<script type="text/javascript">
$(function(){
	$("#btn_more").bind("click", function(){
		if ($("#starttime").val().length  == 0) {
			ToastShow("请输入起始月份", "starttime");
			return false;
		}
		$("#moreform").submit();
	});
});
</script>
<!--{/if}-->

<!--{if $a == "moremonths"}-->
<div class="oemarry_layout">
  <div class="oe_top_nav">
    <i></i>报表统计->商家入驻报表
	<span><a href="<!--{$oefile}-->&c=<!--{$c}-->">&lt;&lt;返回选择</a></span>
  </div>
  <div class="oe_content">
    <h6><!--{$starttime}-->~<!--{$endtime}--> 商家入驻统计</h6>

    <table class="oe_table_wrap">
	  <tr>
	    <th width="15%">入驻商家：</th>
		<td width="85%">
		<!--{assign var='shop_nums' value=count_chart("mod={shop} type={count} where={<!--{$where}-->}")}-->
	    <!--{$shop_nums}-->家
		</td>
	  </tr>
	  <tr>
	    <th colspan="4">图表</th>
	  </tr>
	  <tr>
	    <td colspan="4"><div id="sales-charts" style="margin:0 auto;width:98%;"></div></td>
	  </tr>
	</table>


  </div>
</div>
<script type="text/javascript">
$(function () {
	var chart;
	$(document).ready(function() {
		chart = new Highcharts.Chart({
			chart: {
				renderTo: 'sales-charts',
				type: 'line'
			},
			title: {
				text: ''
			},
			subtitle: {
				text: ''
			},
			xAxis: {
				categories: [<!--{$contmonths}-->]
			},
			yAxis: {
				title: {
					text: '报表统计(单位：家)'
				}
			},
			tooltip: {
				enabled: false,
				formatter: function() {
					return '<b>'+ this.series.name +'</b><br/>'+
						this.x +': '+ this.y +'家';
				}
			},
			plotOptions: {
				line: {
					dataLabels: {
						enabled: true
					},
					enableMouseTracking: false
				}
			},
			series: [{
				<!--{assign var='shop_chartcount' value=draw_chart("mod={shop} type={count} contday={$contmonths} where={<!--{$nodate_where}-->}")}-->
				name: '商家',
				data: [<!--{$shop_chartcount}-->]
			}]
		});
	});
	
});

</script>

<!--{/if}-->

</body>
</html>