<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="HANCHAO"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<?php $csscommon="/Public/bootstrap/css/bootstrap.min.css" ?>
<?php $csscommon.="|/Public/HanChaoUI/css/hanchaoui.css" ?>
<?php $CSSARR[]=THEME_PATH."/common/css/main.css" ?>
<?php $CSSARR[]="/Public/HanChaoUI/css/weebox.css" ?>
<link rel="stylesheet" href="<?php echo min_css($CSSARR,$csscommon);?>" media="all"/>
<?php $jscommon="/Public/script/jquery.min.js" ?>
<?php $jscommon.="|/Public/bootstrap/js/bootstrap.min.js" ?>
<?php $JSARR['min2']=THEME_PATH."/common/js/common.js" ?>
<?php $JSARR['min3']="/Public/HanChaoUI/js/weebox.js" ?>
<script language="javascript">var URL = '/admin.php?s=/order_info/';var THEME_COLOR = '';var ROOT_PATH = '/';var APP   =   '/admin.php?s=/';var CONTROLLER_NAME   =   '<?php echo (CONTROLLER_NAME); ?>';var THEME_PATH   =   '<?php echo (TPL_PATH); ?>/';</script>
<script type="text/javascript" src="<?php echo min_js($JSARR,$jscommon);?>"></script><!--[if IE]>
<link href="/Public/bootstrap/css/bootstrap.ie.css" rel="stylesheet" type="text/css"/>
 <script src="/Public/bootstrap/js/html5shiv.js"></script>
<![endif]-->
<script language="javascript">
$(function($){
    $(window.parent.document).find('#loading').hide();
    var topid='<?php echo ($_GET['topid']); ?>';
    var leftid='<?php echo ($_GET['leftid']); ?>';
    changemenu(topid,leftid);
});
function changemenu(topid,leftid){
    if(!topid && !leftid)return false;
    if(topid)parent._OPENleft(topid);
    if(leftid){
        $(window.parent.document).find('#_OPENright'+leftid).parent().prev().click();
        $(window.parent.document).find('#_OPENright'+leftid+' a').click();
    }
}
</script>
<title><?php echo (L("website_manage")); ?>Powered by hanchao</title>
</head>
<body><?php if(!empty($big_menu)): ?><div class="pad-lr-10 col-sm-12">
    <div class="btn-handle mt15">
   <?php if(is_array($big_menu)): foreach($big_menu as $k=>$vo): ?><a class="btn <?php if(!empty($menu_hover)): if(in_array(($k), is_array($menu_hover)?$menu_hover:explode(',',$menu_hover))): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>                
   <?php else: ?>btn-primary<?php endif; ?>" href="<?php echo (isset($vo)?$vo:''); ?>"><?php echo (isset($k)?$k:''); ?></a>&nbsp;&nbsp;<?php endforeach; endif; ?>
    </div>
</div><?php endif; ?>
<div class="pad-lr-10 col-sm-12">
	<div>
		<form name="searchform" action="/admin.php?s=/order_info/wm_index" method="POST" >
			<div class="toolbars-hanchao mt15 clearfix">
				<div>订单号：<input name="order_sn" value="<?php echo (isset($order_sn)?$order_sn:''); ?>" type="text" class="form-control w150" /></div>
				<div><select id="wm_type" class="form-control" name="wm_type" ><option value="" >下单方式</option><?php if(!empty($wm_order_type)){ $selectdvalue=0;foreach($wm_order_type as $key=>$val) { if(empty($wm_type) && !is_numeric($wm_type))$wm_type=array();$wm_typearr=remove_empty_array($wm_type);if(in_array($key,$wm_typearr)) { ?><option selected="selected" value="<?php echo $key ?>"><?php echo $val;$selectdvalue=1; ?></option><?php }else { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } } } ?></select></div>
				<input type="hidden" name="status" value="<?php echo (isset($status)?$status:''); ?>" />
				<?php if(($status) != "4"): ?><input type="hidden" name="pay_status" value="<?php echo (isset($pay_status)?$pay_status:''); ?>" />
					<input type="hidden" name="shipping_status" value="<?php echo (isset($shipping_status)?$shipping_status:''); ?>" /><?php endif; ?>
				<div><select id="send_type" class="form-control" name="send_type" ><option value="" >配送方式</option><?php if(!empty($send_type_status)){ $selectdvalue=0;foreach($send_type_status as $key=>$val) { if(empty($send_type) && !is_numeric($send_type))$send_type=array();$send_typearr=remove_empty_array($send_type);if(in_array($key,$send_typearr)) { ?><option selected="selected" value="<?php echo $key ?>"><?php echo $val;$selectdvalue=1; ?></option><?php }else { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } } } ?></select></div>
				<div><select id="shop_id" class="form-control" name="shop_id" ><option value="" >选择仓库</option><?php if(!empty($shops_list)){ $selectdvalue=0;foreach($shops_list as $key=>$val) { if(empty($shop_id) && !is_numeric($shop_id))$shop_id=array();$shop_idarr=remove_empty_array($shop_id);if(in_array($key,$shop_idarr)) { ?><option selected="selected" value="<?php echo $key ?>"><?php echo $val;$selectdvalue=1; ?></option><?php }else { ?><option value="<?php echo $key ?>"><?php echo $val ?></option><?php } } } ?></select></div>
				<div><button type="submit" class="btn btn-primary">搜索</button></div>
			</div>
		</form>
		<form id="myform" name="myform" action="<?php echo U('delete');?>" method="post">
			<table class="table table-hover table-striped table-hanchao mt15 table-bordered">
				<thead>
					<tr>
						<th width="60"><?php echo orderurl('LAN_ID','id');;?></th>
						<th width="130"><?php echo orderurl('订单号','order_sn');;?></th>
						<th width="160"><?php echo orderurl('下单时间','addtime');;?></th>
						<th width="160"><?php echo orderurl('预约时间','best_time');;?></th>
						<th width="110"><?php echo orderurl('会员','uid');;?></th>
						<th width="220"><?php echo orderurl('收货地址','province');;?></th>
						<th width="90"><?php echo orderurl('下单方式','type');;?></th>
						<th width="90"><?php echo orderurl('配送方式','send_type');;?></th>
						<th width="80"><?php echo orderurl('金额','goods_amount');;?></th>
						<th width="180"><?php echo orderurl('LAN_STATUS','status');;?></th>
						<th width="120"><?php echo L('MANAGE');?></th>
					</tr>
				</thead>
                <tbody>
					<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
							<td><?php echo (isset($vo["id"])?$vo["id"]:''); ?></td>
							<td><?php echo (isset($vo["order_sn"])?$vo["order_sn"]:''); ?></td>
							<td><?php echo (time_format($vo["addtime"])); ?></td>
							<td><?php echo (time_format($vo["best_time"])); ?></td>
							<?php if($vo["type"] == 10): ?><td><?php echo (idtoname($vo["uid"],'Shops')); ?></td>
								<td><?php echo (isset($vo["address"])?$vo["address"]:''); ?></td>
							<?php else: ?>
								<td><?php echo (showuser($vo["uid"])); ?></td>
								<td><?php echo (isset($vo["consignee"])?$vo["consignee"]:''); ?> <?php echo (idtoname($vo["province"],'Area')); echo (idtoname($vo["city"],'Area')); echo (idtoname($vo["district"],'Area')); ?></td><?php endif; ?>
							<td>
							<?php if($vo["type"] == 13 || $vo["type"] == 3): echo (isset($wm_order_type[$vo['type']])?$wm_order_type[$vo['type']]:''); ?>
							<?php else: ?>
								线上<?php endif; ?>
							</td>
							<td><?php echo (isset($send_type_status[$vo['send_type']])?$send_type_status[$vo['send_type']]:''); ?></td>
							<td><?php if(($vo["type"]) == "3"): echo (isset($vo["goods_amount"])?$vo["goods_amount"]:''); else: echo (isset($vo["order_amount"])?$vo["order_amount"]:''); endif; ?></td>
							<td><?php echo (isset($order_status[$vo[status]])?$order_status[$vo[status]]:''); ?> <?php echo (isset($order_pay[$vo[pay_status]])?$order_pay[$vo[pay_status]]:''); ?> <?php echo (isset($order_shipping[$vo[shipping_status]])?$order_shipping[$vo[shipping_status]]:''); ?></td>
							<td>
								<a href="<?php echo geturl('OrderInfo/view',array('id'=>$vo['id']));?>">查看</a>
								<!--<a href="<?php echo geturl('OrderInfo/edit',array('id'=>$vo['id']));?>">编辑</a>-->
								<!--<a href="<?php echo u('store_shou',array('id'=>$vo['id']));?>">签收</a> -->
								<?php if($vo[status] == 3 && $vo[shipping_status] == 4): endif; ?>
							</td>
						</tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
			</table>
			<nav class="pages_hanchao" id="pages"><?php echo (isset($_page)?$_page:''); ?></nav>
		</form>
    </div>
</div>
</body>
</html>