{template "header.html"}
<link href="{THEME_PATH}assets/mall/css/mall.css" rel="stylesheet" type="text/css" />
<div class="note note-danger">
    <p>
        <label style="margin-right:20px">{dr_lang('订单编号')}：<b>{$order.sn}</b> {dr_mall_order_source($order.source)}</label>
        <label class="fc-mall-order-status">{dr_lang('订单状态')}：{order_info_status($order)}</label>
    </p>
</div>
<div class="portlet-body">
    <div class="mt-element-step">
        <div class="row step-line fc-mall-order-step">
            <div class="col-md-1">
            </div>
            <div class="col-md-2 mt-step-col first done">
                <div class="mt-step-number bg-white"><i class="fa fa-shopping-cart"></i></div>
                <div class="mt-step-title uppercase font-grey-cascade">拍下商品</div>
                <div class="mt-step-content font-grey-cascade">{dr_date($order._inputtime)}</div>
            </div>
            <div class="col-md-2 mt-step-col {if $order.pay_time}done{/if}">
                <div class="mt-step-number bg-white"><i class="fa fa-rmb"></i></div>
                <div class="mt-step-title uppercase font-grey-cascade">付款到平台</div>
                <div class="mt-step-content font-grey-cascade">{dr_date($order.pay_time)}</div>
            </div>
            <div class="col-md-2 mt-step-col  {if $order.deliver_time}done{/if}">
                <div class="mt-step-number bg-white"><i class="fa fa-truck"></i></div>
                <div class="mt-step-title uppercase font-grey-cascade">商家发货</div>
                <div class="mt-step-content font-grey-cascade">{dr_date($order.deliver_time)}</div>
            </div>
            <div class="col-md-2 mt-step-col  {if $order.receipt_time}done{/if}">
                <div class="mt-step-number bg-white"><i class="fa fa-handshake-o"></i></div>
                <div class="mt-step-title uppercase font-grey-cascade">确认收货</div>
                <div class="mt-step-content font-grey-cascade">{dr_date($order.receipt_time)}</div>
            </div>
            <div class="col-md-2 mt-step-col  {if $order.comment_time}done{/if} last">
                <div class="mt-step-number bg-white"><i class="fa fa-comments"></i></div>
                <div class="mt-step-title uppercase font-grey-cascade">评价</div>
                <div class="mt-step-content font-grey-cascade">{dr_date($order.comment_time)}</div>
            </div>
            <div class="col-md-1">
            </div>
        </div>
    </div>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {dr_form_hidden()}
    <input type="hidden" name="ids[]" value="{$order.id}" />
    <div class="portlet bordered light">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green">{dr_lang('订单信息')}</span>
            </div>
        </div>
        <div class="portlet-body form">

            <div class="form-body">

                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">{dr_lang('买家')}</label>
                            <div class="col-md-7">
                                <p class="form-control-static">{Function_list::author($order.username)}</p>
                            </div>
                        </div>
                    </div>
                    <!--/span-->
                    <div class="col-md-6">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">{dr_lang('卖家')}</label>
                            <div class="col-md-7">
                                <p class="form-control-static">{Function_list::author($order.sell_username)}</p>
                            </div>
                        </div>
                    </div>
                    <!--/span-->
                </div>
                <!--/row-->
                <!--/row-->
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">{dr_lang('付款状态')}</label>
                            <div class="col-md-7">
                                <p class="form-control-static" style="cursor: pointer" >{order_pay_status($order)}</p>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">{dr_lang('发货状态')}</label>
                            <div class="col-md-7">
                                <p class="form-control-static" style="cursor: pointer" >{order_deliver_status($order)}</p>
                            </div>
                        </div>
                    </div>
                    <!--/span-->
                </div>
                <!--/row-->
            </div>
        </div>
    </div>
    <div class="portlet bordered light">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green">{dr_lang('送货信息')}</span>
            </div>
        </div>
        <div class="portlet-body form">

            <div class="form-body">

                <div class="row fc-mall-col-2">
                    <div class="col-md-6">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">{dr_lang('联系人')}</label>
                            <div class="col-md-7">
                                <p class="form-control-static">{$order.name}</p>
                            </div>
                        </div>
                    </div>
                    <!--/span-->
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-md-3 control-label">{dr_lang('联系电话')}</label>
                            <p class="form-control-static">{$order.name}</p>
                        </div>
                    </div>
                    <!--/span-->
                </div>
                <div class="row fc-mall-col-2">
                    <div class="col-md-6">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">{dr_lang('电子邮箱')}</label>
                            <div class="col-md-7">
                                <p class="form-control-static">{$order.email}</p>
                            </div>
                        </div>
                    </div>
                    <!--/span-->
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-md-3 control-label">{dr_lang('详细地址')}</label>
                            <p class="form-control-static">{$order.address}</p>
                        </div>
                    </div>
                    <!--/span-->
                </div>

                <!--/row-->
            </div>
        </div>
    </div>
    {if $order.remark}
    <div class="portlet bordered light">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green">{dr_lang('买家留言')}</span>
            </div>
        </div>
        <div class="portlet-body form">

            <div class="form-body">

                {$order.remark}

            </div>
        </div>
    </div>
    {/if}
    <div class="portlet bordered light ">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green"><a href="{$order.mall_url}" target="_blank">{$order.mall_name}</a></span>
            </div>
        </div>

        <div class="portlet-body form">

            <table class="table fc-head-table margin-top-20 table-bordered table-striped table-bordered">
                <thead>
                <tr>
                    <th width="100" class=" text-center">{dr_lang('商品')}</th>
                    <th>{dr_lang('详情')}</th>
                    <th width="150" class=" text-center">{dr_lang('活动')}</th>
                    <th width="110" class=" text-center">{dr_lang('单价')}</th>
                    <th width="80" class=" text-center">{dr_lang('数量')}</th>
                    <th width="110" class=" text-center">{dr_lang('总价')}</th>
                </tr>
                </thead>
                <tbody>
                {loop $goods $i $t}
                {php $sku_name=dr_string2array($t.sku_name);}
                <tr>
                    <td class="text-center">
                        <a href="{$t.url}" title="{$t.title}"><img width="90" src="{dr_get_file($t.thumb)}"></a>
                    </td>
                    <td class="cart_description">
                        <p style="margin-bottom: 10px"> <a href="{$t.url}" title="{$t.title}">{dr_strcut($t.title, 150)}</a></p>
                        {loop $sku_name $i $c}
                        <small>{$i}: {$c} </small>
                        {/loop}
                        <p style="margin-bottom:0px;{if $sku_name}margin-top: 10px;{/if} color: #ccc">{dr_lang('货号')}：{$t.sn}</p>
                    </td>
                    <td class="pprice" style="text-align:center">
                        {if $t.p_name}
                        <p>{$t.p_name}</p>
                        <p class="product-price-group"> <span class="promotion">{$t.p_info}</span></p>
                        {else}
                        {dr_lang('无')}
                        {/if}
                    </td>
                    <td class="price pprice" style="text-align: center">
                        {if $t.yuan}
                        <p>￥<span class="regular-price">{number_format($t.price, 2)}</span>元</p>
                        <p class="pyuan">￥<span>{number_format($t.yuan, 2)}</span>元</p>
                        {else}
                        ￥<span class="regular-price">{number_format($t.price, 2)}</span>元
                        {/if}
                    </td>
                    <td class="qty" style="text-align:center">
                        {$t.num}
                    </td>
                    <td style="text-align:center">
                        <p class="price">￥<span>{number_format($t.total, 2)}</span>元</p>
                    </td>
                </tr>
                {/loop}
                </tbody>
            </table>

            <div class="row">
                <div class="col-md-6"> </div>
                <div class="col-md-6">
                    <div class="well">
                        <div class="row static-info align-reverse">
                            <div class="col-md-6 name"> 返现金额：</div>
                            <div class="col-md-6 value">￥<span class="regular-price">{number_format($give_money, 2)}</span>元 </div>
                        </div>
                        <div class="row static-info align-reverse">
                            <div class="col-md-6 name"> {dr_lang('优惠')}：</div>
                            <div class="col-md-6 value"> ￥<span>{number_format($order.discount, 2)}</span>元 </div>
                        </div>
                        {if $order.promotion_name}
                        <div class="row static-info align-reverse">
                            <div class="col-md-6 name"> {$order.promotion_name}：</div>
                            <div class="col-md-6 value">{$order.promotion_info} </div>
                        </div>
                        {/if}
                        <div class="row static-info align-reverse">
                            <div class="col-md-6 name"> {dr_lang('运费')}：</div>
                            <div class="col-md-6 value"> ￥<span>{number_format($order.freight, 2)}</span>元 </div>
                        </div>
                        <div class="row static-info align-reverse">
                            <div class="col-md-6 name"> {dr_lang('买家实付')}：</div>
                            <div class="col-md-6 value"> ￥<span>{number_format($order.money, 2)}</span>元 </div>
                        </div>
                        <div class="row static-info align-reverse">
                            <div class="col-md-6 name"> {dr_lang('平台分成')}：</div>
                            <div class="col-md-6 value"> ￥<span>{number_format($order.income_money, 2)}</span>元 </div>
                        </div>
                        <div class="row static-info align-reverse">
                            <div class="col-md-6 name"> {dr_lang('商家实得金额')}：</div>
                            <div class="col-md-6 value font-blue"> ￥<span>{number_format($my_money, 2)}</span>元 </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    {if $order.comment}

    <link rel="stylesheet" type="text/css" href="{THEME_PATH}assets/comment/css/embed.css" />
    <script type="text/javascript" src="{THEME_PATH}assets/comment/embed.js"></script>
    <div class="portlet bordered light">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green">{dr_lang('买家评论')}</span>
            </div>
        </div>
        <div class="portlet-body form">

            {loop $goods $item}
            <div class="row">
                <div class="col-md-2 text-center" style="padding-top: 20px">
                    <a href="{$item.url}" target="_blank" title="{$item.title}"><img width="150" src="{dr_get_file($item.thumb)}"></a>
                </div>
                <div class="col-md-8">


                    <div class="form-body">

                        <div class="form-group">
                            <div class="col-md-12">
                                <p style="margin-bottom: 10px"> <a href="{$item.url}" title="{$item.title}">{dr_strcut($item.title, 150)}</a></p>
                                {loop $item.sku_name $i $c}
                                <small>{$i}: {$c} </small>
                                {/loop}
                                <p style="margin-bottom:0px;{if $sku_name}margin-top: 10px;{/if} color: #ccc">{dr_lang('货号')}：{$item.sn}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="fc-mall-order-comment">
                                <div class="ds-review" style=" margin: 0;" id="dr_review_post">
                                    <ul>
                                        {loop $review.option $i $name}
                                        <li>
                                            <span class="opname">{$name}（{intval($comment[$item.content.id]['sort'.$i])}）：</span>
                                            <span class="commstar">
                                                {loop $review.value $ii $v}
                                                <a id="dr_review_value_{$i}_{$ii}" class="dr_review_value_{$i} star{$ii}" href="javascript:;" title="{$v}">&nbsp;</a>
                                                {/loop}
                                            </span>
                                        </li>
                                        <script>
                                            dr_review_value({$i}, {intval($comment[$item.content.id]['sort'.$i])})
                                        </script>
                                        {/loop}
                                    </ul>
                                </div>
                                <div class="ds-clear"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-12">
                                {nl2br($comment[$item.content.id][content])}
                            </div>
                        </div>
                        {if $comment[$item.content.id][image]}
                        <div class="form-group">
                            <div class="col-md-12">
                                <div class="row">
                                    {loop $comment[$item.content.id][image][file] $i $file}
                                    <div class="col-sm-12 col-md-6">
                                        <div class="thumbnail">
                                            <img src="{dr_get_file($file)}" style="width: 100%; height: 200px; display: block;" data-src="{dr_get_file($file)}">
                                            <div class="caption">
                                                <h5>{$comment[$item.content.id][image][title][$i]}</h5>
                                            </div>
                                        </div>
                                    </div>
                                    {/loop}
                                </div>
                            </div>
                        </div>
                        {/if}
                    </div>

                </div>
            </div>
            {/loop}

        </div>
    </div>
    {/if}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green">{dr_lang('跟踪记录')}</span>
            </div>
        </div>
        <div class="portlet-body form">

            <table class="table fc-head-table margin-top-20 table-bordered table-striped table-bordered">
                <thead>
                <tr>
                    <th width="160" class=" text-center">{dr_lang('操作时间')}</th>
                    <th width="150" class=" text-center">{dr_lang('操作人')}</th>
                    <th width="180" class=" text-center">{dr_lang('订单状态')}</th>
                    <th>{dr_lang('记录')}</th>
                </tr>
                </thead>
                <tbody>
                {loop $op_log $t}
                <tr>
                    <td class="text-center">
                        {dr_date($t.inputtime)}
                    </td>
                    <td class="text-center">
                        {Function_list::author($t.username)}
                    </td>
                    <td class="text-center">
                        {order_info_status($t)}
                    </td>
                    <td>
                        {$t.log}
                    </td>
                </tr>
                {/loop}
                </tbody>
            </table>

        </div>
    </div>


</form>
{template "footer.html"}