<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>订单详情 - KGCMS</title>
	<link rel="stylesheet" href="{{kg['tpl_url']}}mobile/css/checkout_mobile.css">
	<script src="{{kg['tpl_url']}}mobile/js/jquery-3.2.1.min.js"></script>
	<script src="{{kg['tpl_url']}}mobile/js/weui.min.js"></script>
	<script src="{{kg['tpl_url']}}mobile/js/zepto.min.js"></script>
	<script src="{{kg['tpl_url']}}mobile/js/common.js"></script>
    <script src="{{kg['tpl_url']}}mobile/layer_mobile/layer.js"></script>
    <script src="{{kg['tpl_url']}}mobile/js/checkout_mobile.js"></script>
</head>
<body ontouchstart>
	{% include 'component_header_mobile.tpl' %}
	<div class="box" >
		<div class="weui-tab__panel">
			<div class="weui-cells_form">
                	<!-- 以下三种情况:一种选中设置默认地址,二种选中没有设置默认地址,三种即没选中也没设置默认地址 -->
                {% for row in kg['address'] %}
                {%if row['select']%}
                <div class="weui-cells" >				
					<div class="weui-cell" style="display: block;" >
						<div class="weui-cell__hd">
                            <label>{{row['consignee']}}</label>
                            <label style="margin-left: 16px;" >{{row['mobile']}}</label>
                        </div>
                        <div class="weui-cell__hd text-default" style="font-size: 14px;margin-top: 5px;">
                            <span><i class="fa fa-map-marker"></i></span>
                            <div style="display: inline-block;">{{row['areap']}} {{row['areac']}} {{row['aread']}} {{row['address']}}</div>
                        </div> 
                    </div>
                
				
				</div>
                {%endif%}
				{% endfor %}
     
                <div class="weui-cells">	
                    {% for pid in kg['order']['pid'] %}
                    <div class="weui-cell" >
                        <div class="weui-cell__hd"><img src="{{kg['order']['specipic'][loop.index0]}}" style="width: 64px;"></div>
                        <div class="weui-cell__bd" style="padding-left:10px">	
                            <div class="text-overflow">{{kg['order']['title'][loop.index0]}}</div>		
                            <div class="text-default" style="font-size: 14px;">
                                数量： {{kg['order']['number'][loop.index0]}}
                                {% for var in kg['order']['speci_param'][loop.index0] %}
                                {{var[0]}}：{{var[1]}}
                                {% endfor %}
                            </div>
                            <div> <span><i class="fa fa-jpy"></i></span> {{kg['order']['price'][loop.index0]}}</div>		
                        </div>           
                    </div>
                    {% endfor %}		
                </div>


                <div class="weui-cells">
					<div class="weui-cell" data="{{kg['order']}}">
						<div class="weui-cell__hd "><label class="weui-label">订单号</label></div>
                        <div class="weui-cell__bd text-danger">{{kg['order']['oid']}}</div>
                    </div>
                    <div class="weui-cell" >
                        <div class="weui-cell__hd "><label class="weui-label">下单时间</label></div>
                        <div class="weui-cell__bd">{{kg['order']['addtime']}}</div>			
                    </div>
					<div class="weui-cell">
                        <div class="weui-cell__hd "><label class="weui-label">订单状态</label></div>
                        {% if kg['order']['status'] == -4 %}
                        <div class="weui-cell__hd text-danger ">订单已取消</div>	
                        {% elif kg['order']['status']<4 and kg['order']['status']>-4 and kg['order']['status']!=0%}
                        <div class="weui-cell__hd text-success  ">已支付，等待发货</div>	
                        {% elif kg['order']['status'] == 0 %}
                        <div class="weui-cell__hd  text-warm ">等待支付</div>	
                        {%else%}
                        <div class="weui-cell__hd">已签收，交易完毕</div>	
                        {%endif%}
                        <!-- {%if kg['order']['status_msg']%} 
                        <div class="weui-cell__bd "></div>		
                        {%else%}
                        <div class="weui-cell__bd text-danger">订单已取消</div>
                        {%endif%}	 -->
                    </div>

                    <div class="weui-cell">
                        <div class="weui-cell__hd "><label class="weui-label">支付方式</label></div>
                        <div class="weui-cell__bd">
                            {% if kg['order']['payment'] == 1 %} <img src="{{kg['tpl_url']}}images/kgpay.png" alt="余额支付" style="width: 124px;"> {%endif%}
                            {% if kg['order']['payment'] == 2 %} <img src="{{kg['tpl_url']}}images/wxpay.png" alt="微信支付" style="width: 124px;"> {%endif%}
                            {% if kg['order']['payment'] == 3 %}  <img src="{{kg['tpl_url']}}images/alipay.png" alt="支付宝支付" style="width: 124px;"> {%endif%}                                
                        </div>			
					</div>
                    {% for shipping in kg['shipping'] %}
                    {% if shipping['select'] == 1 %}
                    <div class="weui-cell" >
						<div class="weui-cell__hd "><label class="weui-label">快递方式</label></div>
                        <div class="weui-cell__bd">	{{shipping['title']}}</div>
                        <!-- <span>{{shipping['description']}}</span> -->
                    </div>	
                    
                    <div class="weui-cell  weui-cells_checkbox" >
                        <div class="weui-cell__hd "><label class="weui-label">快递支付方式</label></div>
                        <div class="weui-cell__bd" >
                            <label class="weui-cell" for="topay" style="padding: 0;">
                                <div class="weui-cell__hd">
                                    <input type="checkbox" class="weui-check" name="topay" id="topay" {% if kg['order']['customer'] and shipping['topay'] %}checked="checked"{% endif %} {% if not shipping['topay'] or kg['action'] %}disabled="disabled"{% endif %} value="1">
                                    <i class="weui-icon-checked"></i>
                                </div>
                                <div class="weui-cell__bd">
                                    <p>手续费到付</p>
                                </div>
                            </label>
                            <label class="weui-cell" for="insure" style="padding: 0;">
                                <div class="weui-cell__hd">
                                    <input type="checkbox" class="weui-check" name="insure" id="insure"  {% if kg['action'] %}disabled="disabled"{% endif %} {% if kg['order']['vouch'] %}checked="checked"{% endif %}  value="1">
                                    <i class="weui-icon-checked"></i>
                                </div>
                                <div class="weui-cell__bd">
                                    <p>否需要保价</p>
                                </div>
                            </label>
                          
                        </div>
                    </div>
                    <div class="weui-cell" >
                        <div class="weui-cell__hd "><label class="weui-label">订单留言</label></div>
                        <div class="weui-cell__bd">
                            <textarea rows="3" cols="5" initattrh="0" name="message" class="weui-textarea" placeholder="请输入订单留言信息" onkeyup="if(value.length&gt;255){value=value.substr(0,255);}"></textarea>
                        </div>			
                    </div>
                    <div class="weui-cell" >
                        <div class="weui-cell__hd "><label class="weui-label">商家回复</label></div>
                        <div class="weui-cell__bd">
                            暂无回复(暂无数据)
                        </div>			
                    </div>         
                    {% endif %}
                    {% endfor %}      
                
                </div>

                
               
				<div class="weui-cells" >
                    <div class="weui-cell hide">
                        <div class="weui-cell__hd "><label class="weui-label">可用资金</label></div>
                        <div class="weui-cell__bd"><span><i class="fa fa-jpy"></i></span> {{kg['user']['money']}} <a href="recharge_mobile">(立即充值)</a></div>			
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd "><label class="weui-label">商品总金额</label></div>
                        <div class="weui-cell__bd"><span><i class="fa fa-jpy"></i></span> {{kg['order']['product_total']}}</div>			
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd "><label class="weui-label">配送手续费</label></div>
                        <div class="weui-cell__bd"><span><i class="fa fa-jpy"></i></span> {{kg['order']['freight']}}</div>			
                    </div>
                    <div class="weui-cell" >
                        <div class="weui-cell__hd "><label class="weui-label">促销优惠</label></div>
                        <div class="weui-cell__bd"><span><i class="fa fa-jpy"></i></span> 0.00(暂无数据)</div>			
                    </div>
                    <div class="weui-cell" >
                        <div class="weui-cell__hd "><label class="weui-label">应付总金额</label></div>
                        <div class="weui-cell__bd text-danger"><span><i class="fa fa-jpy"></i></span> {{kg['order']['amount']}}</div>			
                    </div>         
                </div>
                <div class="weui-cells" >
                    {% for shipping in kg['shipping'] %}
                    {% if shipping['select'] == 1 %}
                    <div class="weui-cell" >
                        <div class="weui-cell__hd "><label class="weui-label">保价费用</label></div>
                        <div class="weui-cell__bd text-danger"><span><i class="fa fa-jpy"></i></span> {{shipping['insure_price']}}</div>			
                    </div>
                    <div class="weui-cell" >
                        <div class="weui-cell__hd "><label class="weui-label">手续费</label></div>
                        <div class="weui-cell__bd text-danger"><span><i class="fa fa-jpy"></i></span> {{shipping['freight']}}</div>			
                    </div>
                    {% endif %}
                    {% endfor %}
                 </div>
            </div>
		</div>
    </div>

    {% include 'component_footer_mobile.tpl' %}
 </body>