<!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" />
        <link rel="stylesheet" href="{$Think.config.url_domain_root}static/home/css/seller.css">
        <style type="text/css">
            body { background: #FFF none;
            }
        </style>
        <script type="text/javascript" src="{$Think.config.url_domain_root}static/plugins/jquery-2.1.4.min.js" charset="utf-8"></script>
        <script type="text/javascript" src="{$Think.config.url_domain_root}static/home/js/common.js" charset="utf-8"></script>
        <script type="text/javascript" src="{$Think.config.url_domain_root}static/plugins/jquery.poshytip.min.js" charset="utf-8"></script>
        <script type="text/javascript" src="{$Think.config.url_domain_root}static/plugins/jquery.printarea.js" charset="utf-8"></script>
        <title>{$Think.lang.member_printorder_print}--<?php echo $store_info['store_name'];?>{$Think.lang.member_printorder_title}</title>
    </head>

    <body>
        <?php if (!empty($order_info)){?>
        <div class="print-layout">
            <div class="print-btn" id="printbtn" title="{$Think.lang.member_printorder_print_tip}"><i></i><a href="javascript:void(0);">{$Think.lang.member_printorder_print}</a></div>
            <div class="a5-size"></div>
            <dl class="a5-tip">
                <dt>
                    <h1>A5</h1>
                    <em>Size: 210mm x 148mm</em></dt>
                <dd>{$Think.lang.member_printorder_print_tip_A5}</dd>
            </dl>
            <div class="a4-size"></div>
            <dl class="a4-tip">
                <dt>
                    <h1>A4</h1>
                    <em>Size: 210mm x 297mm</em></dt>
                <dd>{$Think.lang.member_printorder_print_tip_A4}</dd>
            </dl>
            <div class="print-page">
                <div id="printarea">
                    <?php foreach ($goods_list as $item_k =>$item_v){?>
                    <div class="orderprint">
                        <div class="top">
                            <?php if (empty($store_info['store_label'])){?>
                            <div class="full-title"><?php echo $store_info['store_name'];?> {$Think.lang.member_printorder_title}</div>
                            <?php }else {?>
                            <div class="logo" ><img src="<?php echo $store_info['store_label']; ?>"/></div>
                            <div class="logo-title"><?php echo $store_info['store_name'];?>{$Think.lang.member_printorder_title}</div>
                            <?php }?>
                        </div>
                        <table class="buyer-info">
                            <tr>
                                <td class="w200">{$Think.lang.member_printorder_truename}{$Think.lang.ds_colon}<?php echo $order_info['extend_order_common']['reciver_name'];?></td>
                                <td>电话{$Think.lang.ds_colon}<?php echo @$order_info['extend_order_common']['reciver_info']['phone'];?></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td colspan="3">{$Think.lang.member_printorder_address}{$Think.lang.ds_colon}<?php echo @$order_info['extend_order_common']['reciver_info']['address'];?></td>
                            </tr>
                            <tr>
                                <td>{$Think.lang.member_printorder_orderno}{$Think.lang.ds_colon}<?php echo $order_info['order_sn'];?></td>
                                <td>{$Think.lang.member_printorder_orderadddate}{$Think.lang.ds_colon}<?php echo @date('Y-m-d',$order_info['add_time']);?></td>
                                <td><?php if (isset($order_info['shippin_code'])){?>
                                    <span>{$Think.lang.member_printorder_shippingcode}{$Think.lang.ds_colon}<?php echo $order_info['shipping_code'];?></span>
                                    <?php }?></td>
                            </tr>
                        </table>
                        <table class="order-info">
                            <thead>
                                <tr>
                                    <th class="w40">{$Think.lang.member_printorder_serialnumber}</th>
                                    <th class="tl">{$Think.lang.member_printorder_goodsname}</th>
                                    <th class="w70 tl">{$Think.lang.member_printorder_goodsprice}({$Think.lang.currency_zh})</th>
                                    <th class="w50">{$Think.lang.member_printorder_goodsnum}</th>
                                    <th class="w70 tl">{$Think.lang.member_printorder_subtotal}({$Think.lang.currency_zh})</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($item_v as $k=>$v){?>
                                <tr>
                                    <td><?php echo $k;?></td>
                                    <td class="tl"><?php echo $v['goods_name'];?></td>
                                    <td class="tl">{$Think.lang.currency}<?php echo $v['goods_price'];?></td>
                                    <td><?php echo $v['goods_num'];?></td>
                                    <td class="tl">{$Think.lang.currency}<?php echo $v['goods_all_price'];?></td>
                                </tr>
                                <?php }?>
                                <tr>
                                    <th></th>
                                    <th colspan="2" class="tl">{$Think.lang.member_printorder_amountto}</th>
                                    <th><?php echo $goods_all_num;?></th>
                                    <th class="tl">{$Think.lang.currency}<?php echo $goods_total_price;?></th>
                                </tr>
                            </tbody>
                            <tfoot>
                                <tr>
                                    <th colspan="10"><span>{$Think.lang.member_printorder_totle}{$Think.lang.ds_colon}{$Think.lang.currency}<?php echo $goods_total_price;?></span><span>{$Think.lang.member_printorder_freight}{$Think.lang.ds_colon}{$Think.lang.currency}<?php echo $order_info['shipping_fee'];?></span><span>{$Think.lang.member_printorder_privilege}{$Think.lang.ds_colon}{$Think.lang.currency}<?php echo $promotion_amount;?></span><span>{$Think.lang.member_printorder_orderamount}{$Think.lang.ds_colon}{$Think.lang.currency}<?php echo $order_info['order_amount'];?></span><span>{$Think.lang.member_printorder_shop}{$Think.lang.ds_colon}<?php echo $store_info['store_name'];?></span>
                                        <?php if (!empty($store_info['store_qq'])){?>
                                        <span>QQ：<?php echo $store_info['store_qq'];?></span>
                                        <?php }elseif (!empty($store_info['store_ww'])){?>
                                        <span>{$Think.lang.member_printorder_shopww}{$Think.lang.ds_colon}<?php echo $store_info['store_ww'];?></span>
                                        <?php }?></th>
                                </tr>
                            </tfoot>
                        </table>
                        <?php if (empty($store_info['store_stamp'])){?>
                        <div class="explain">
                            <?php echo $store_info['store_printdesc'];?>
                        </div>
                        <?php }else {?>
                        <div class="explain">
                            <?php echo $store_info['store_printdesc'];?>
                        </div>
                        <div class="seal"><img src="<?php echo $store_info['store_stamp'];?>" onload="javascript:DrawImage(this, 120, 120);"/></div>
                        <?php }?>
                        <div class="tc page">{$Think.lang.member_printorder_pagetext_1}<?php echo $item_k;?>{$Think.lang.member_printorder_pagetext_2}/{$Think.lang.member_printorder_pagetext_3}<?php echo count($goods_list);?>{$Think.lang.member_printorder_pagetext_2}</div>
                    </div>
                    <?php }?>
                </div>
                <?php }?>
            </div>
        </div>
    </body>
    <script>
                            $(function() {
                                $("#printbtn").click(function() {
                                    $("#printarea").printArea();
                                });
                            });

                            //打印提示
                            $('#printbtn').poshytip({
                                className: 'tip-yellowsimple',
                                showTimeout: 1,
                                alignTo: 'target',
                                alignX: 'center',
                                alignY: 'bottom',
                                offsetY: 5,
                                allowTipHover: false
                            });
    </script>
</html>