{include file="public/seller_top" /} 

<div class="seller_main w1200">
    {include file="public/seller_left" /}
    <div class="seller_right">
        <div class="seller_items">
            {include file="public/seller_items" /}
        </div>
        

        <div class="alert alert-block mt10">
            <ul class="mt5">
                <li>1、可以对待发货的订单进行发货操作，发货时可以设置收货人和发货人信息，填写一些备忘信息，选择相应的物流服务，打印发货单。</li>
                <li>2、已经设置为发货中的订单，您还可以继续编辑上次的发货信息。</li>
                <li>3、如果因物流等原因造成买家不能及时收货，您可使用点击延迟收货按钮来延迟系统的自动收货时间。</li>
            </ul>
        </div>
        <form method="get" action="" target="_self">
            <table class="search-form">
                <input type="hidden" name="state" value="{$Think.post.state}" />
                <tr>
                    <td></td>
                    <th>{$Think.lang.store_order_add_time}</th>
                    <td class="w240"><input type="text" class="text w70" name="query_start_date" id="query_start_date" value="{$Think.post.query_start_date}" /><label class="add-on"><i class="icon-calendar"></i></label>
                        &nbsp;&#8211;&nbsp;
                        <input id="query_end_date" class="text w70" type="text" name="query_end_date" value="{$Think.post.query_end_date}" /><label class="add-on"><i class="icon-calendar"></i></label></td>
                    <th>{$Think.lang.store_order_buyer}</span></th>
                    <td class="w100"><input type="text" class="text w80" name="buyer_name" value="{$Think.post.buyer_name}" /></td>
                    <th>{$Think.lang.store_order_order_sn}</th>
                    <td class="w160"><input type="text" class="text w150" name="order_sn" value="{$Think.post.order_sn}" /></td>
                    <td class="w70 tc">
                        <label class="submit-border">
                            <input type="submit" class="submit"value="{$Think.lang.store_order_search}" />
                        </label>
                    </td>
                </tr>
            </table>
        </form>
        <table class="dssc-default-table order deliver">
            <?php if (is_array($order_list) and !empty($order_list)) { ?>
            <?php foreach($order_list as $order_id => $order) {?>
            <tbody>
                <tr>
                    <td colspan="21" class="sep-row"></td>
                </tr>
                <tr>
                    <th colspan="21"><span class="ml5">{$Think.lang.store_order_order_sn}{$Think.lang.ds_colon}<strong><?php echo $order['order_sn']; ?></strong></span><span>{$Think.lang.store_order_add_time}{$Think.lang.ds_colon}<em class="goods-time"><?php echo date("Y-m-d H:i:s",$order['add_time']); ?></em></span>
                        <?php if (!empty($order['extend_order_common']['shipping_time'])) {?>
                        <span>发货时间{$Think.lang.ds_colon}<em class="goods-time"><?php echo date("Y-m-d H:i:s",$order['extend_order_common']['shipping_time']); }?></em></span> <span class="fr mr10">
                            <?php if ($order['shipping_code'] != ''){?>
                            <a href="{:url('/home/sellerdeliver/search_deliver',['order_sn'=>$order.order_sn])}" class="dssc-btn-mini"><i class="icon-compass"></i>{$Think.lang.store_order_show_deliver}</a>
                            <?php }?>
                            <a href="{:url('/home/sellerorderprint/index',['order_id'=>$order.order_id])}" target="_blank"  class="dssc-btn-mini" title="{$Think.lang.store_show_order_printorder}"/><i class="icon-print"></i>{$Think.lang.store_show_order_printorder}</a></span></th>
                </tr>
                <?php $i = 0; ?>
                <?php foreach($order['goods_list'] as $k => $goods) { ?>
                <?php $i++; ?>
                <tr>
                    <td class="bdl w10"></td>
                    <td class="w50"><div class="pic-thumb"><a href="<?php echo $goods['goods_url'];?>" target="_blank"><img src="<?php echo thumb($goods, 60); ?>" /></a></div></td>
                    <td class="tl"><dl class="goods-name">
                            <dt><a target="_blank" href="<?php echo $goods['goods_url'];?>"><?php echo $goods['goods_name']; ?></a></dt>
                            <dd><strong>￥<?php echo $goods['goods_price']; ?></strong>&nbsp;x&nbsp;<em><?php echo $goods['goods_num']; ?></em>件</dd>
                        </dl></td>

                    <!-- S 合并TD -->
                    <?php if (($order['goods_count'] > 1 && $k == 0) || ($order['goods_count'] == 1)){?>
                    <td class="bdl bdr order-info w500" rowspan="<?php echo $order['goods_count'];?>"><dl>
                            <dt>{$Think.lang.store_deliver_buyer_name}{$Think.lang.ds_colon}</dt>
                            <dd><?php echo $order['buyer_name']; ?> <span member_id="<?php echo $order['buyer_id'];?>"></span>
                                <?php if(!empty($order['extend_member']['member_qq'])){?>
                                <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo $order['extend_member']['member_qq'];?>&site=qq&menu=yes" title="QQ: <?php echo $order['extend_member']['member_qq'];?>"><img border="0" src="http://wpa.qq.com/pa?p=2:<?php echo $order['extend_member']['member_qq'];?>:52" style=" vertical-align: middle;"/></a>
                                <?php }?>
                                <?php if(!empty($order['extend_member']['member_ww'])){?>
                                <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=<?php echo $order['extend_member']['member_ww'];?>&site=cntaobao&s=2&charset=utf-8" class="vm" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=<?php echo $order['extend_member']['member_ww'];?>&site=cntaobao&s=2&charset=utf-8" alt="Wang Wang" style=" vertical-align: middle;"/></a>
                                <?php }?>
                            </dd>
                        </dl>
                        <dl>
                            <dt>收货人{$Think.lang.ds_colon}</dt>
                            <dd>
                                <div class="alert alert-info m0">
                                    <p><i class="icon-user"></i><?php echo $order['extend_order_common']['reciver_name']?><span class="ml30" title="<?php echo '电话';?>"><i class="icon-phone"></i><?php echo $order['extend_order_common']['reciver_info']['phone'];?></span></p>
                                    <p class="mt5" title="{$Think.lang.store_deliver_buyer_address}"><i class="icon-map-marker"></i><?php echo $order['extend_order_common']['reciver_info']['address'];?></p>
                                    <?php if ($order['extend_order_common']['order_message'] != '') {?>
                                    <p class="mt5" title="{$Think.lang.store_deliver_buyer_address}"><i class="icon-map-marker"></i><?php echo $order['extend_order_common']['order_message'];?></p>
                                    <?php } ?>
                                </div>
                            </dd>
                        </dl>
                        <dl>
                            <dt>{$Think.lang.store_deliver_shipping_amount}{$Think.lang.ds_colon} </dt>
                            <dd>
                                <?php if (!empty($order['shipping_fee']) && $order['shipping_fee'] != '0.00'){?>
                                ￥<?php echo $order['shipping_fee'];?>
                                <?php }else{?>
                                {$Think.lang.ds_common_shipping_free}
                                <?php }?>
                                <?php if (empty($order['lock_state'])) {?>
                                <?php if ($order['order_state'] == ORDER_STATE_PAY) {?>
                                <span><a href="{:url('/home/sellerdeliver/send',['order_id'=>$order.order_id])}" class="dssc-btn-mini dssc-btn-green fr"><i class="icon-truck"></i>{$Think.lang.store_order_send}</a></span>
                                <?php } elseif ($order['order_state'] == ORDER_STATE_SEND){?>
                                <span>
                                    <a href="javascript:void(0)" class="dssc-btn-mini dssc-btn-orange ml5 fr" uri="{:url('/home/sellerdeliver/delay_receive',['order_id'=>$order.order_id])}" dialog_width="480" dialog_title="延迟收货" nc_type="dialog" dialog_id="seller_order_delay_receive" id="order<?php echo $order['order_id']; ?>_action_delay_receive" /><i class="icon-time"></i></i>延迟收货</a>
                                    <a href="{:url('/home/sellerdeliver/send',['order_id'=>$order.order_id])}" class="dssc-btn-mini dssc-btn-acidblue fr"><i class="icon-edit"></i>{$Think.lang.store_deliver_modify_info}</a>
                                </span>
                                <?php }?>
                                <?php }?>
                            </dd>
                        </dl></td>
                    <?php } ?>
                    <!-- E 合并TD -->
                </tr>

                <!-- S 赠品列表 -->
                <?php if (!empty($order['zengpin_list']) && $i == count($order['goods_list'])) { ?>
                <tr>
                    <td class="bdl w10"></td>
                    <td colspan="2" class="tl">
                        <div class="dssc-goods-gift">赠品：
                            <ul>
                                <?php foreach ($order['zengpin_list'] as $k => $zengpin_info) { ?>
                                <li><a title="赠品：<?php echo $zengpin_info['goods_name'];?> * <?php echo $zengpin_info['goods_num'];?>" href="<?php echo $zengpin_info['goods_url'];?>" target="_blank"><img src="<?php echo $zengpin_info['goods_image'];?>"/></a></li>
                                <?php } ?>
                            </ul>
                        </div>
                    </td>
                </tr>
                <?php } ?>
                <!-- E 赠品列表 -->

                <?php } ?>
                <?php } } else { ?>
                <tr>
                    <td colspan="21" class="norecord"><div class="warning-option"><i class="icon-warning-sign"></i><span>{$Think.lang.no_record}</span></div></td>
                </tr>
                <?php } ?>
            </tbody>
            <tfoot>
                <?php if (!empty($order_list)) { ?>
                <tr>
                    <td colspan="21"><div class="pagination"></div></td>
                </tr>
                <?php } ?>
            </tfoot>
        </table>
        <script type="text/javascript">
                        $(function(){
                        $('#query_start_date').datepicker({dateFormat: 'yy-mm-dd'});
                                $('#query_end_date').datepicker({dateFormat: 'yy-mm-dd'});
                                });
        </script> 
















    </div>
</div>
{include file="public/mall_footer" /}