orderstatistics.html 7.07 KB
{template 'common/header'}
<ul class="nav nav-tabs">
<li {if $op == 'salereport'}class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'salereport'))}">零售生意报告</a></li>
<li {if $op == 'orderstatistics' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'orderstatistics'))}">订单统计</a></li>
<li {if $op == 'saledetails' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'saledetails'))}">商品销售明细</a></li>
<li {if op == 'saletargets' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'saletargets'))}">销售指标分析</a></li>
<li {if $op == 'productsaleranking' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'productsaleranking'))}">商品销售排行</a></li>
<li {if $op == 'productsalestatistics'}class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'productsalestatistics'))}">商品访问与购买比</a></li>
<li {if $op == 'memberranking' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'memberranking'))}">会员消费排行</a></li>
<li {if $op == 'fansrange' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'fansrange'))}">代理粉丝排行</a></li>
<li {if $op == 'userincreasestatistics'&&$usertype=='user' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'userincreasestatistics'))}">会员增长统计</a></li>
<li {if $op == 'userincreasestatistics'&&$usertype=='agent' }class="active"{/if}><a href="{php echo $this->createWebUrl('statistics', array('op' => 'userincreasestatistics','usertype'=>'agent'))}">代理增长统计</a></li>
</ul>
<script type="text/javascript" src="resource/js/lib/jquery-ui-1.10.3.min.js"></script>
<style>.c_hidden {clear: both;display: none;background-color: #f6faf1;width: 100%;}</style>
<script>
	$(function(){
		$("#TabOrders tr").not(".table_title,.c_hidden").click(function(){
			//$(this).next("tr").removeClass("c_hidden");
			if($(this).next("tr").is(":hidden")){
				$(this).next("tr").removeClass("c_hidden");
			}else{
				$(this).next("tr").addClass("c_hidden");
			}     
		});
	});
</script>

<div class="main">
	<form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
		<input type="hidden" name="c" value="site" />
		<input type="hidden" name="a" value="entry" />
		<input type="hidden" name="m" value="wwx_fxxt" />
		<input type="hidden" name="do" value="statistics" />
		<input type="hidden" name="op" value="orderstatistics" />

		<div class="alert alert-info">
			<i class="icon-lightbulb"></i>说明:查看已完成订单的所有相关信息!</div>
			<div class="panel panel-default">
				<div class="panel-heading">筛选</div>
				<div class="panel-body">

					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">会员名</label>
						<div class="col-sm-8 col-lg-9 col-xs-12">
							<input class="form-control" name="realname" id="" type="text" value="{$realname}" placeholder="可查询会员姓名 /昵称">
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">收货人</label>
						<div class="col-sm-8 col-lg-9 col-xs-12">
							<input class="form-control" name="addressname" id="" type="text" value="{$addressname}" placeholder="可查询收货人姓名">
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">订单号</label>
						<div class="col-sm-8 col-lg-9 col-xs-12">
							<input class="form-control" name="ordersn" id="" type="text" value="{$ordersn}" placeholder="可查询订单号">
						</div>
					</div>

					<div class="form-group">
						<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">起始日期</label>
						<div class="col-sm-7 col-lg-9 col-xs-12">
							{php echo tpl_form_field_daterange('time', array('start'=>date('Y-m-d', $start_time),'end'=>date('Y-m-d', $end_time)));}
						</div>
					</div>


					<div class="form-group">        
						<input type="submit" name="" value="查询" class="btn btn-primary" style="height:30px">  
						<button type="submit" name="orderstatisticsEXP01" value="orderstatisticsEXP01" class="btn btn-warning btn-lg">导出excel</button>
					</div>
				</div>
			</div>


			<div class="panel panel-default">
				<div class="panel-heading">订单统计:共<span class="label label-success">{$total}</span>单</div>
				<div class="panel-body table-responsive">
					<table class="table table-hover" id="TabOrders" style="width:100%;border-collapse:collapse;">
						<thead class="navbar-inner">
							<tr class="table_title">
								<th style="width:15%;">订单号</th>
								<th style="width:20%;">下单时间</th>
								<th style="width:25%;">总订单金额</th>
								<th style="width:10%;">付款方式</th>
								<th style="width:15%;">用户名</th>
								<th style="width:15%;">收货人</th>
							</tr>
						</thead>
						<tbody>
						{php $index=0;$countmoney=0}
						{loop $list $item}
						{php $index++;}
							<tr>
								<td>{$item['ordersn']}</td>
								<td>{php echo date('Y-m-d  H:i:s',$item['createtime'])}</td>
								<td>{php $countmoney=$countmoney+$item['price']} {$item['price']}{if !empty($item['dispatchprice'])&&$item['dispatchprice']>0 }&nbsp;(运费:{$item['dispatchprice']}){/if}</td>
								<td>{if $item['paytype'] == 1}<span class="label label-info">余额支付</span>{/if}{if $item['paytype'] == 2}<span class="label label-success">在线支付</span>{/if}{if $item['paytype'] == 3}<span class="label label-warning">货到付款</span>{/if}</td>
								<td>{$item['realnamestr']}</td>
								<td>{$item['tdrealname']}</td>
							</tr>	
							<tr style="background: #e0dcce;" class="c_hidden">
								<td colspan="6">
									<table width="100%">
										<tbody>
										{loop $item['ordergoods'] $itemgoods}
											<tr style="background: #e0dcce;">
												<td><img src="../attachment/{$itemgoods['thumb']}" style="border-width:0px;height: 50px;"></td>
												<td><span class="Name">{$itemgoods['title']}</span><br/> <span class="colorC">规格:{$itemgoods['optionname']}</span></td>
												<td>商品单价:{$itemgoods['price']}</td>
												<td>购买数量:{$itemgoods['total']}</td>
												<td>总价(元):<strong class="colorG">{php echo round(($itemgoods['total']*$itemgoods['price']),2)}</strong></td>
											</tr>
										{/loop}
										</tbody>
									</table>	   
								</td>
							</tr>
						{/loop}
						<tr>
							<td colspan="10"><input name="token" type="hidden" value="{$_W['token']}" /></td>
						</tr>
						<h6 class="sub-title"><span >当前页共计<span class="label label-success">{php echo $index}</span>个,订单金额共计<span class="label label-success">{php echo $countmoney}</span>元</span></h6>
					</table>
				{$pager}
			</div>
		</div>
	</form>
</div>


{template 'common/footer'}