<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<body>
		<?php if (get ( "type" ) == "new"): ?>
		<div class="tabs-border">
			<div class="item active">新订单</div>
		</div>
		<?php elseif (get ( "type" ) == "unpay"): ?>
		<div class="tabs-border">
			<div class="item active">待支付订单</div>
		</div>
		<?php else: ?>
		<div class="tabs-border">
			<a href="/moduleadmin.php?m=b2b_order&type=all" class="item <?php if (get ( 'type' ) == 'all'): ?>active<?php endif; ?>">全部订单</a>
			 
			<a href="/moduleadmin.php?m=b2b_order&type=unsend" class="item <?php if (get ( 'type' ) == 'unsend'): ?>active<?php endif; ?>">待发货</a>
			<a href="/moduleadmin.php?m=b2b_order&type=unreceive" class="item <?php if (get ( 'type' ) == 'unreceive'): ?>active<?php endif; ?>">待收货</a>
			<a href="/moduleadmin.php?m=b2b_order&type=unraty" class="item <?php if (get ( 'type' ) == 'unraty'): ?>active<?php endif; ?>">待评价</a>
		</div>
		<?php endif; ?>
		<div class="main-body">
			<form autocomplete="off" class="search-form" action="/moduleadmin.php"> 
				<input type="hidden" name="m" value="b2b_order">
				<input type="hidden" name="type" value="<?php echo html($_GET['type']); ?>" />
				ID <input type="text"  class="w50" name="orderid" value="<?php echo intval($_GET['orderid']); ?>" />
				订单号 <input type="text" class="w150" name="orderno" value="<?php echo html($_GET['orderno']); ?>" />
				用户 <input type="text" name="nickname" class="w100" value="<?php echo html($_GET['nickname']); ?>" />	 
				 
				下单时间 <input name="stime" type="text" id="stime" value="<?php echo $_GET['stime']; ?>" class="w100" /> 到 <input  class="w100" type="text"  name="etime" id="etime"  value="<?php echo $_GET['etime']; ?>" /> 
				<button type="submit" class="btn" >搜索</button>
			</form>
			<table class="tbs">
				<thead>
					<tr>
						<td>订单</td>
						<td>订单号</td>
					 
						<td>用户</td>
						<td>状态</td>
						 
						 
						<td>订单金额</td>
						<td>快递费</td> 
						 
						<td>数量</td> 
						 
						 
						<td>操作</td> 
						 
					</tr>
					</tr>
				</thead> <?php $_from = $this->_var['list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
				<tr>
					<td><?php echo $this->_var['c']['orderid']; ?></td>
					<td><?php echo $this->_var['c']['orderno']; ?></td>
					 
					<td><?php echo $this->_var['c']['nickname']; ?></td>
					<td><?php echo $this->_var['c']['status_name']; ?></td>
					 
					 
					<td>￥<?php echo $this->_var['c']['money']; ?></td>
					<td>￥<?php echo $this->_var['c']['express_money']; ?></td> 
					 
					
					<td><?php echo $this->_var['c']['total_num']; ?></td>
					 
					 
					<td><a href="/moduleadmin.php?m=b2b_order&a=show&orderid=<?php echo $this->_var['c']['orderid']; ?>">查看</a>
						</td>
				</tr>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</table>
			<div><?php echo $this->_var['pagelist']; ?></div>
		</div>
		<?php echo $this->fetch('footer.html'); ?>
		<script src="/plugin/laydate/laydate.js"></script>
		<script>
			laydate.render({
				elem:"#stime"
			})
			laydate.render({
				elem:"#etime"
			});
		</script>
	</body>
</html>
