<?php include_once(mvc::$cfg['PATH_TPL'].'public/headBase.php');?>
<div class="main" style="width:50%;float: left;">
	<div class="info_main">
		<div>
			<div class="cat_title">
				<p>成交记录</p>
			</div>
			<div class="txt_main_info">
				<table class="table table-bordered table-hover">
					<thead>
						<tr>
							<th width="120px">类别</th>
							<th width="100px">今天</th>
							<th width="100px">昨天</th>
							<th width="100px">最近30天</th>
							<th width="100px">全部</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>售出配件</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=all&startTime=<?php echo strtotime(date('Y-m-d',time()));?>&endTime=<?php echo time();?>"><?php echo $saleToday;?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=all&startTime=<?php echo strtotime(date('Y-m-d',strtotime("-1 day")));?>&endTime=<?php echo strtotime(date('Y-m-d',time()));?>"><?php echo $saleYesterday;?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=all&startTime=<?php echo (time() - 60*60*24*30);?>&endTime=<?php echo time();?>"><?php echo $saleMonth;?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=all"><?php echo $saleAll;?></a></td>
						</tr>
						<tr>
							<td>支付成功</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=paied&startTime=<?php echo strtotime(date('Y-m-d',time()));?>&endTime=<?php echo time();?>"><?php echo $payToday?sprintf('%.2f',$payToday):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=paied&startTime=<?php echo strtotime(date('Y-m-d',strtotime("-1 day")));?>&endTime=<?php echo strtotime(date('Y-m-d',time()));?>"><?php echo $payYesterday?sprintf('%.2f',$payYesterday):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=paied&startTime=<?php echo (time() - 60*60*24*30);?>&endTime=<?php echo time();?>"><?php echo $payMonth?sprintf('%.2f',$payMonth):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=paied"><?php echo $payAll?sprintf('%.2f',$payAll):'';?></a></td>
						</tr>
						<tr>
							<td>退款金额</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=refunded&startTime=<?php echo strtotime(date('Y-m-d',time()));?>&endTime=<?php echo time();?>"><?php echo $refundedToday?sprintf('%.2f',$refundedToday):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=refunded&startTime=<?php echo strtotime(date('Y-m-d',strtotime("-1 day")));?>&endTime=<?php echo strtotime(date('Y-m-d',time()));?>"><?php echo $refundedYesterday?sprintf('%.2f',$refundedYesterday):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=refunded&startTime=<?php echo (time() - 60*60*24*30);?>&endTime=<?php echo time();?>"><?php echo $refundedMonth?sprintf('%.2f',$refundedMonth):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=refunded"><?php echo $refundedAll?sprintf('%.2f',$refundedAll):'';?></a></td>
						</tr>
						<tr>
							<td>成交金额</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=completed&startTime=<?php echo strtotime(date('Y-m-d',time()));?>&endTime=<?php echo time();?>"><?php echo ($payToday-$refundedToday)>0?sprintf('%.2f',$payToday-$refundedToday):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=completed&startTime=<?php echo strtotime(date('Y-m-d',strtotime("-1 day")));?>&endTime=<?php echo strtotime(date('Y-m-d',time()));?>"><?php echo ($payYesterday-$refundedYesterday)>0?sprintf('%.2f',$payYesterday-$refundedYesterday):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=completed&startTime=<?php echo (time() - 60*60*24*30);?>&endTime=<?php echo time();?>"><?php echo ($payMonth-$refundedMonth)>0?sprintf('%.2f',$payMonth-$refundedMonth):'';?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=completed"><?php echo ($payAll-$refundedAll)>0?sprintf('%.2f',$payAll-$refundedAll):'';?></a></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="clear"></div>
				<div class="info_cat">
			<div class="cat_title">
				<p>订单</p>
			</div>
			<div class="txt_main_info">
				<table class="table table-bordered table-hover">
					<thead>
						<tr>
							<th width="200px">类别</th>
							<th width="100px">数量</th>
							<th width="100px">金额</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>待付款订单</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=wait"><?php echo $order['creat'];?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=wait"><?php echo $orderMoney['creat']?sprintf('%.2f',$orderMoney['creat']):'';?></a></td>
						</tr>
						
						<tr>
							<td>取消的订单</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=cancel"><?php echo $order['cancel'];?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=cancel"><?php echo $orderMoney['cancel']?sprintf('%.2f',$orderMoney['cancel']):'';?></a></td>
						</tr>
						<tr>
							<td>待发货的订单</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=paied"><?php echo $order['paied'];?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=paied"><?php echo $orderMoney['paied']?sprintf('%.2f',$orderMoney['paied']):'';?></a></td>
						</tr>
						<tr>
							<td>已发货的订单</td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=send"><?php echo $order['send'];?></a></td>
							<td><a class="blue" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=send"><?php echo $orderMoney['send']?sprintf('%.2f',$orderMoney['send']):'';?></a></td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="clear"></div>
		<div class="info_cat">
			<div class="cat_title">
				<p>配件售后</p>
			</div>
			<div class="txt_main_info">
				<div class="txt_main_type">
					<p>
						<span>售后中:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=wait"><?php echo $refund['wait'];?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>已完成售后:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>order/orderList?status=completed"><?php echo $refund['refunded'];?></a>
					</p>
				</div>
			</div>
		</div>
		<div class="clear"></div>
		<div class="info_cat">
			<div class="cat_title">
				<p>配件管理</p>
			</div>
			<div class="txt_main_info">
				<div class="txt_main_type">
					<p>
						<span>未上架的配件:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>product/productList?status=0"><?php echo $product['0']?$product['0']:0;?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>售卖中的配件:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>product/productList?status=1"><?php echo $product['1']?$product['1']:0;?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>预售中的配件:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>product/productList?status=2"><?php echo $product['2']?$product['2']:0;?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>违规的配件:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>product/productList?status=-1"><?php echo $product['-1']?$product['-1']:0;?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>使用橱窗的配件:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>product/productList?promoted=Y"><?php echo $productRecommend['Y']?$productRecommend['Y']:0;?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>未使用橱窗的配件:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>product/productList?promoted=N"><?php echo $productRecommend['N']?$productRecommend['N']:0;?></a>
					</p>
				</div>
			</div>
		</div>
		<div class="clear"></div>
		<div class="info_cat">
			<div class="cat_title">
				<p>店铺管理</p>
			</div>
			<div class="txt_main_info">
				<div class="txt_main_type">
					<p>
						<span>营业中的店铺:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>shop/lists?status=using"><?php echo $shop['1']?$shop['1']:0;?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>关闭的店铺:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>shop/lists?status=stop"><?php echo $shop['0']?$shop['0']:0;?></a>
					</p>
				</div>
				<div class="txt_main_type">
					<p>
						<span>禁止的店铺:</span>
						<a class="blue" target="_blank" href="<?php echo mvc::$cfg['ADMIN_URI'];?>shop/lists?status=forbidden"><?php echo $shop['-1']?$shop['-1']:0;?></a>
					</p>
				</div>
			</div>
		</div>
		<div class="clear"></div>
	</div>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>
<style>
.info_main{padding:0px 55px;}
.info_main .info_cat{margin-top: 20px;height: auto;}
.info_main .cat_title{font-weight: bold; line-height: 28px; }
.info_main .txt_main_info{color:#666666;}
.info_main .txt_main_type{float: left;width: 200px;line-height: 25px;}
</style>