<!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" type="text/css" href="{{kg['tpl_url']}}style/shop_order_update.css">
<script src="{{kg['tpl_url']}}script/jquery.min.js"></script>
<script src="{{kg['tpl_url']}}script/cropper.min.js"></script>
<script src="{{kg['tpl_url']}}script/amazeui.datetimepicker.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_update.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><a href="shop_order_manage">销售订单管理</a></li>
				<li class="am-active">修改订单信息</li>
			</ol>
			<form class="am-form tpl-form-line-form" method="post" action="#" enctype="multipart/form-data">
				<div class="tpl-portlet-components">
					<div class="portlet-title">
						<div class="caption font-green bold">
							<span class="am-icon-code"></span>&nbsp;修改订单信息
						</div>
					</div>
					<div class="tpl-block">
						<div class="am-g">
							<div class="tpl-form-body tpl-form-line">
								<div class="am-tabs" data-am-tabs="{noSwipe:1}">
									<ul class="am-tabs-nav am-nav am-nav-tabs">
										<li class="am-active"><a href="#tab1">订单信息</a></li>
										<li class=""><a href="#tab2">商品信息</a></li>
									</ul>
									<div class="am-tabs-bd">
										<div class="am-tab-panel am-fade am-active am-in" id="tab1" style="">
											<div class="am-form-group am-form-icon am-form-feedback">
												<label for="name" class="am-u-sm-3 am-form-label">订单号&nbsp;<span class="tpl-form-line-small-title">Oid</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text"  class="tpl-form-input  ngco_Ojs_bitian" id="name" name="oid" value="{{data['oid']}}">
													<i class=""></i>
												</div>
											</div>
											<div class="am-form-group">
												<label for="uid" class="am-u-sm-3 am-form-label">会员ID&nbsp;<span class="tpl-form-line-small-title">Uid</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													{% if data['uid'] == 0 %}
													<input type="text" class="tpl-form-input" id="uid" name="uid" value="匿名用户">
													{% else %}
													<input type="text" class="tpl-form-input" id="uid" name="uid" value="{{data['uid']}}">
													{% endif %}
												</div>
											</div>
											<div class="am-form-group">
												<label for="type" class="am-u-sm-3 am-form-label">订单类型&nbsp;<span class="tpl-form-line-small-title">Type</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													{% if data['type'] == 0%}
													<input type="text" class="tpl-form-input" id="type" name="type" value="普通商城订单">
													{% else %}
													<input type="text" class="tpl-form-input" id="type" name="type" value="微信营销领奖">
													{% endif %}
												</div>
											</div>
											<div class="am-form-group am-form-icon am-form-feedback">
												<label for="waybill" class="am-u-sm-3 am-form-label">运单号&nbsp;<span class="tpl-form-line-small-title">Waybill</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input ngco_Ojs_bitian2" id="waybill" name="waybill" value="{{data['waybill']}}">
													<i class=""></i>
												</div>
											</div>
											<div class="am-form-group">
												<label for="freight" class="am-u-sm-3 am-form-label">手续费&nbsp;<span class="tpl-form-line-small-title">freight</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input" id="freight" name="freight" value="{{data['freight']}}">
												</div>
											</div>
											<div class="am-form-group">
												<label class="am-u-sm-3 am-form-label">手续费是否到付&nbsp;<span class="tpl-form-line-small-title">Customer</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<div class="tpl-switch">
														{% if data['customer'] == 1%}
														<input type="checkbox" class="ios-switch bigswitch tpl-switch-btn" name="customer" checked />
														{% else %}
														<input type="checkbox" class="ios-switch bigswitch tpl-switch-btn" name="customer" />
														{% endif %}
														<div class="tpl-switch-btn-view">
															<div>
															</div>
														</div>
													</div>
												</div>
											</div>
											<div class="am-form-group">
												<label class="am-u-sm-3 am-form-label">配送是否需要保价&nbsp;<span class="tpl-form-line-small-title">Vouch</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<div class="tpl-switch">
														{% if data['vouch'] == 1%}
														<input type="checkbox" class="ios-switch bigswitch tpl-switch-btn" name="vouch" checked>
														{% else %}
														<input type="checkbox" class="ios-switch bigswitch tpl-switch-btn" name="vouch">
														{% endif %}
														<div class="tpl-switch-btn-view">
															<div>
															</div>
														</div>
													</div>
												</div>
											</div>
											<div class="am-form-group default-tpl ">
												<label class="am-u-sm-3 am-form-label">订单状态&nbsp;<span class="tpl-form-line-small-title">Status</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3 posi_box2 ng-add-span ag-add-width">
													<input type="hidden" name="status" id="status" value="">
													<select data-am-selected="{btnSize: 'sm'}" class="select-fu" id="status_select_id" style="display: none;">
														<option class="option-one option-sel"  value="32">请选择订单状态</option>
														<option {% if data['status']==0 %} selected="selected" {% endif %} value="0">等待用户付款</option>
														<option {% if data['status']==1 %} selected="selected" {% endif %} value="1">已支付,等待发货</option>
														<option {% if data['status']==2 %} selected="selected" {% endif %} value="2">订单已确认,配货中</option>
														<option {% if data['status']==3 %} selected="selected" {% endif %} value="3">已发货,等待用户签收</option>
														<option {% if data['status']==4 %} selected="selected" {% endif %} value="4">已签收,交易完毕</option>
														<option {% if data['status']==-1 %} selected="selected" {% endif %} value="-1">要求退货</option>
														<option {% if data['status']==-2 %} selected="selected" {% endif %} value="-2">已拒绝退货</option>
														<option {% if data['status']==-3 %} selected="selected" {% endif %} value="-3">退货完毕</option>
													</select>
												</div>
											</div>
											<div class="am-form-group default-tpl">
												<label class="am-u-sm-3 am-form-label">配送方式&nbsp;<span class="tpl-form-line-small-title">Directory</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="hidden" id="dispatching" name="dispatching" value="">
													<select data-am-selected="{btnSize: 'sm'}" id="dispatching_select_id" style="display: none;">
														<option value="a">请选择配送方式</option>
														{% for i in shipping_list %}
														<option {% if data['dispatching']==i['id'] %} selected="selected" {% endif %} value="{{i['id']}}">{{i['title']}}</option>
														{% endfor %}
													</select>
												</div>
											</div>
											<div class="am-form-group am-form-icon am-form-feedback">
												<label for="consignee" class="am-u-sm-3 am-form-label">收货人&nbsp;<span class="tpl-form-line-small-title">Consignee</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input ngco_Ojs_bitian3" id="consignee" name="consignee" value="{{data['consignee']}}">
													<i class=""></i>
												</div>
											</div>
											<div class="am-form-group am-form-icon am-form-feedback">
												<label for="mobile" class="am-u-sm-3 am-form-label">收货人手机号码&nbsp;<span class="tpl-form-line-small-title">Mobile
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input ngco_Ojsbi_phone" id="mobile" placeholder="请输入11位手机号码" name="mobile" value="{{data['mobile']}}">
													<i class=""></i>
												</div>
											</div>
											<div class="am-form-group am-form-icon am-form-feedback">
												<label for="address" class="am-u-sm-3 am-form-label">收货人地址&nbsp;<span class="tpl-form-line-small-title">Address
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input ngco_Ojsbi_phone" id="address" placeholder="请输入收货人地址" name="address" value="{{data['address']}}">
													<i class=""></i>
												</div>
											</div>
											<div class="am-form-group">
												<label for="tel" class="am-u-sm-3 am-form-label">收货人固定电话&nbsp;<span class="tpl-form-line-small-title">Tel
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input" id="tel" name="tel" value="{{data['tel']}}">
												</div>
											</div>
											<div class="am-form-group am-form-icon am-form-feedback">
												<label for="email" class="am-u-sm-3 am-form-label">收货人邮箱&nbsp;<span class="tpl-form-line-small-title">Email</span>
												</label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input ngco_Ojs_email" id="email" name="email" value="{{data['email']}}">
													<i class=""></i>
												</div>
											</div>
											<div class="am-form-group">
												<label for="besttime" class="am-u-sm-3 am-form-label">最佳送货时间&nbsp;<span class="tpl-form-line-small-title">Besttime
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input" id="besttime" name="besttime" value="{{data['besttime']}}">
												</div>
											</div>
											<div class="am-form-group">
												<label for="building" class="am-u-sm-3 am-form-label">标志性建筑&nbsp;<span class="tpl-form-line-small-title">Building
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input" id="building" name="building" value="{{data['building']}}">
												</div>
											</div>
											<div class="am-form-group">
												<label for="zipcode" class="am-u-sm-3 am-form-label">邮政编码&nbsp;<span class="tpl-form-line-small-title">Zipcode
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input" id="zipcode" name="zipcode" value="{{data['zipcode']}}">
												</div>
											</div>
											<div class="am-form-group">
												<label for="message" class="am-u-sm-3 am-form-label">客户给商家留言&nbsp;<span class="tpl-form-line-small-title">Message
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input" id="message" name="message" value="{{data['message']}}">
												</div>
											</div>
											<div class="am-form-group">
												<label for="reply" class="am-u-sm-3 am-form-label">商家留言给客户留言&nbsp;<span class="tpl-form-line-small-title">Reply
													</span></label>
												<div class="am-u-sm-6 am-u-sm-pull-3">
													<input type="text" class="tpl-form-input" id="reply" name="reply" value="{{data['reply']}}">
												</div>
											</div>
										</div>
										<div class="am-tab-panel am-fade" id="tab2" style="">
											<div class="am-g">
												<div class="am-u-sm-12">
													<table class="am-table am-table-striped am-table-hover table-main">
														<thead>
															<tr>
																<th class="table-title">商品名称</th>
																<th class="table-title">库存数</th>
																<th class="table-title">单价</th>
																<th class="table-type">购买单价</th>
																<th class="table-type">购买数量</th>
																<th class="table-type">属性选择</th>
																<th class="table-title">金额</th>
															</tr>
														</thead>
														<tbody>
															{% for i in range(lens) %}
															<tr class="shop-info">
																<input type="hidden" name="p_id{{loop.index}}" value="{{product_list[i]['id']}}">
																<td>{{product_list[i]['title']}}</td>
																<td><a href="#">{{product_list[i]['inventory']}}</a></td>
																<td>{{product_list[i]['market']}}</td>
																<td><input type="text" size="6" name="p_price{{loop.index}}" value="{{data['price'][i]}}" /></td>
																<td><input type="text" size="9" name="p_number{{loop.index}}" value="{{data['number'][i]}}" /></td>
																<td><input type="text" size="20" name="p_attribute{{loop.index}}" value="{{data['attribute'][i]}}" /></td>
																<td>{{data['price'][i]*data['number'][i]}}</td>
																<input type="hidden" value="{{data['price'][i]*data['number'][i]}}" class="single-price">
															</tr>
															{% endfor %}
															<tr>
																<td colspan="7" class="statistics">
																	商品总金额：<span class="red" id="sum-price">{{count_money}}</span><br>
																	应付款金额：商品总金额({{count_money}}) × 会员组折扣({{discount}}) + 配送手续费({{data['freight']}}) + 调整金额(0)
																	= <span class="red">{{data['amount']}}</span>
																</td>
															</tr>
														</tbody>
													</table>
												</div>
											</div>
										</div>
									</div>
									<div class="am-g">
										<div class="tpl-form-body tpl-form-line">
											<div class="am-form-group">
												<div class="center_div ngco-W50bai-width text-center" style="margin: auto">
													<input type="hidden" name="action" value="submit">
													<button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ngsh-LJS-tijiao">提交</button>
													<span class="place"></span>
													<a href="shop_order_update?action=edit&id={{data['id']}}" class="am-btn am-btn-primary tpl-btn-bg-color-success ">重置</a>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							
						</div>
					</div>
				</div>
			</form>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
</body>
</html>