{T "content","head",TPLID}


<div class="white-section">
    <!--订单内容-->
    <link type="text/css" rel="stylesheet" href="{R}css/style_address.css">
    <form method="post" action="{WEBURL}index.php?m=order&v=confirm">
    <div id="contenter">
        <div class="jet">
            <div class="shipping-address">
                <h3 style="font-weight:500; margin:40px 0px 16px 0px;">选择收货地址</h3>
                <div class="list">
                    {loop $address_result $r}
                    <div class="addr {if $n==1}addr-active{/if} " {if $n>4}style='display:none'{/if} onclick="change_add({$r['addressid']},this);">
                        <div class="inner">
                            <div class="addr-hd">{$r['province']}{$r['city']}({$r['addressee']}收)</div>
                            <div class="addr-bd">{$r['area']} {$r['address']} {if $r['mobile']}{$r['mobile']}{else}{$r['tel']}{/if} </div>
                            <div class="addr-toolbar"><a title="修改地址">修改</a></div>
                        </div>
                        <ins class="curmarker"></ins>
                        <a class="defaultaddress" id="def{$r['addressid']}" {if $n!=1}style="display:none;"{/if}>默认地址</a>
                    <a class="setdefault" onclick="setdefault({$r['addressid']},this);">设为默认</a> </div>
                    {/loop}

                </div>
                <div class="control"><a href="javascript:;" id="new_address" style="display: none;" onclick="open_address();" class="new_address">+ 新增收货地址</a>
                    <a href="javascript:;" onclick="showall_address(this);" class="showAll">显示全部</a> <a href="index.php?m=order&f=address&v=listing&acbar=3" class="manageAddr" target="_blank">管理收货地址</a> </div>
            </div>
            <h4 class="font_size14" style="font-weight:700;margin:40px 0px 16px 0px;">确认订单信息</h4>
            <div class="orders">
                <table class="grid-bundle grid-TmallSeller">
                    <thead>
                    <tr>
                        <th class="tube-title">商品</th>
                        <th class="tube-price">积分</th>
                        <th class="tube-price">现金</th>
                        <th class="tube-amount">数量</th>
                        <th class="tube-promo">优惠</th>
                        <th class="tube-postage">配送方式</th>
                    </tr>
                    <tr class="row-border">
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td class="tube-postage"></td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr class="grid-main">
                        <td colspan="5" class="tube-main"><table>
                            <tbody>
                            <tr class="grid-order">
                                <td class="tube-img"><a class="img" href="#"><img src="{$goods['thumb']}" style="max-width: 50px;max-height: 50px;"></a></td>
                                <td class="tube-master"><p class="item-title"><a href="#">{$goods['title']}</a></p></td>
                                <td class="tube-sku"></td>
                                <td class="tube-price">{$goods['point']}点</td>
                                <td class="tube-price">{$goods['price']}元</td>
                                <td class="tube-amount"><div class="tc-amount">{$quantity}</div></td>
                                <td class="tube-promo">-</td>
                            </tr>
                            </tbody>
                        </table></td>
                        <td class="tube-postage tube-postage-coverage">
                            <div class="cage postage">
                                <label class="hd">
                                    普通配送 （免邮）</label>

                            </div>

                        </td>
                    </tr>
                    </tbody>

                </table>
            </div>
            <div class="checkbar">
                <div class="checkbar">
                    <div class="due">
                        <div class="realPay"><p class="money"><span class="hd">实付：</span><span class="bd"><span class="tc-rmb"></span><strong class="font-Arial">{intval($goods['point']*$quantity)}点 {if $type} + {sprintf('%.2f',$goods['price']*$quantity)}元{/if}</strong></span></p></div>
                </div>
            </div>
                {loop $form_fields $fields}
                <input type="hidden" name="{$fields}" value="{$goods[$fields]}">
                {/loop}
                <input type="hidden" name="addressid" id="addressid" value="{$addressid}">
                <input type="hidden" name="secret_key" value="{$secret_key}">
                <input type="hidden" name="type" value="{$type}">
                <input type="hidden" name="quantity" value="{$quantity}">
                <input type="submit" name="submit" id="copy-button" value="提交订单" class="btn btn-primary btn-lg" style="margin-bottom: 60px;">
        </div>

    </form>
    </div>
<!--订单内容-->

</div>
<link rel="stylesheet" href="{R}js/dialog/ui-dialog.css" />
<script src="{R}js/dialog/dialog-plus.js"></script>
<script src="{R}js/base.js"></script>
<script type="text/javascript">
    function setdefault(addressid,obj) {
        $.post("index.php?m=order&f=address&v=setdefault&addressid="+addressid, { js: "1"},
        function(data){
            $('.addr').removeClass('addr-active');
            $(obj).parent().addClass('addr-active');
            $("#addressid").val(addressid);
            $(".defaultaddress").css('display','none');
            $("#def"+addressid).css('display','');

        });
    }
    function change_add(addressid,obj) {
        $('.addr').removeClass('addr-active');
        $(obj).addClass('addr-active');
        $("#addressid").val(addressid);
    }
    function open_address() {
        openiframe('index.php?m=order&f=address&v=add', 'edit', '新增收货地址', 660, 430);
    }
    function showall_address(obj) {
        //$('.addr').css('display','');
        $('.addr').animate({opacity: 'show',height: '100%' }, 1000);
        $(obj).css('display','none');
        $('#new_address').css('display','');
    }
</script>

{T "content","foot",TPLID}