<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/shop_order_manage.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/shop_order_manage.js"></script>
</head>
<body data-type="generalComponents">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				销售订单管理
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li class="am-active">销售订单管理</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;销售订单管理
					</div>
					<div class="tpl-portlet-input tpl-fz-ml am-no-margintop">
						<div class="am-form-group am-fl  am-no-marginbtm am-select-hover  am-no-outline" style="margin-right:10px;">
							<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}" style="display: none;">
								<option {% if sort==0 %} selected="selected" {% endif %} value="shop_order_manage?{{url['sort']}}sort=0">下单日期(降序)</option>
								<option {% if sort==1 %} selected="selected" {% endif %} value="shop_order_manage?{{url['sort']}}sort=1">下单日期(升序)</option>
								<option {% if sort==2 %} selected="selected" {% endif %} value="shop_order_manage?{{url['sort']}}sort=2">订单号(降序)</option>
								<option {% if sort==3 %} selected="selected" {% endif %} value="shop_order_manage?{{url['sort']}}sort=3">订单号(升序)</option>
								<option {% if sort==4 %} selected="selected" {% endif %} value="shop_order_manage?{{url['sort']}}sort=4">订单总金额(降序)</option>
								<option {% if sort==5 %} selected="selected" {% endif %} value="shop_order_manage?{{url['sort']}}sort=5">订单总金额(升序)</option>
							</select>
						</div>
						<div class="am-form-group am-fl  am-no-marginbtm am-select-hover  am-no-outline" style="margin-right:10px;">
							<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}" style="display: none;">
								<option selected="selected" value="?aid=0">数据筛选</option>
								<option {% if filter==0 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=0">等待用户付款</option>
								<option {% if filter==1 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=1">已支付,等待发货</option>
								<option {% if filter==2 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=2">订单已确认,配货中</option>
								<option {% if filter==3 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=3">已发货,等待用户签收</option>
								<option {% if filter==4 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=4">已签收,交易完毕</option>
								<option {% if filter==5 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=5">要求退货的订单</option>
								<option {% if filter==6 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=6">拒绝退货的订单</option>
								<option {% if filter==7 %} selected="selected" {% endif %} value="shop_order_manage?{{url['filter']}}filter=7">退货完毕的订单</option>
							</select>
						</div>
						<div class="portlet-input input-small input-inline am-fl">
							<form action="#" method="get" id="search">
								<div class="input-icon right">
									<i class="am-icon-search log-search"></i>
									<input type="text" class="form-control form-control-solid ngar-Vxiugai-radius am-hover ngco-Alo-Noborder" placeholder="搜索..." name="word" value="" id="word">
								</div>
							</form>
						</div>
					</div>
				</div>
				<div class="am-g">
					<div class="am-u-sm-12 ngALL-AFenyeFu-marginT ngco-No-paddingR">
						<form class="am-form">
							<table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
								<thead>
									<tr>
										<th class="table-check"><input type="checkbox" name="all" id="all" onclick="kg.select_all(this.form);" class="tpl-table-fz-check"></th>
										<th class="">订单号</th>
										<th class="table-title">会员(下单时间)</th>
										<th class="table-type">收货人(电话)</th>
										<th class="table-author am-hide-sm-only">应付金额</th>
										<th class="table-date am-hide-sm-only">订单状态</th>
										<th class="table-set">操作</th>
									</tr>
								</thead>
								<tbody>
									{% for row in data %}
									<tr>
										<td><input type="checkbox" value="{{row['id']}}" name="id[]"></td>
										<td>{{row['oid']}}</td>
										<td><a href="#">{{row['uid']}}</a>({{row['addtime']}})</td>
										<td>{{row['consignee']}}({{row['mobile']}})</td>
										<td class="am-hide-sm-only">{{row['amount']}}</td>
										<td class="am-hide-sm-only">{{row['status']}}</td>
										<td>
											<div class="am-btn-toolbar ngre-Hdadd-paddidngT">
												<div class="am-btn-group am-btn-group-xs">
													<a href="shop_order_update?action=edit&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only">
														<span class="am-icon-pencil-square-o"></span>&nbsp;编辑
													</a>
													<a href="shop_order_manage?action=del&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-danger ngro-Jclick-shanchubi">
														<span class="am-icon-trash-o"></span>&nbsp;删除
													</a>
												</div>
											</div>
										</td>
									</tr>
									{% endfor %}
								</tbody>
							</table>
							{% if not data %}<div class="no-data"><ul>没有相关数据</ul></div>{% endif %}
							<!--全选-->
							{% if page_data['total_rows'] %}
							<div class="am-u-sm-12 am-u-md-6">
								<div class="am-btn-toolbar ng-xno-borderL" id="select-handle">
									<span class="am-input-group-btn add-span">
										<a class="add am-btn am-btn-default am-select am-back ngco-Ono-radiusR" href="javascript:;">全选</a>
									</span>
									<input type="hidden" name="action" id="action" value="">
									<select class="am-select-hover" data-am-selected="{btnSize: 'sm'}" style="display: none;">
										<option selected="selected" value='0'>将选中项：</option>
										<option value="del">删除</option>
									</select>
								</div>
							</div>
							{% endif %}
							<!--分页-->
							{% if page_data['total_page'] > 1 %}
							{{ page_html }}
							{% endif %}
						</form>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
	<script>
	kg.title2div('title2div'); //调用此方法， 把该元素的title属性替换成div
	</script>
</body>
</html>