#@ucenter_layout()

#define css()
<style>

    .box-dashboard {
        position: relative;
        border-radius: 3px;
        background: #ffffff;
        border: 1px solid #d2d6de;
        margin-bottom: 20px;
        width: 100%;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0);
    }

    .box-dashboard .box-header .box-title {
        display: inline-block;
        font-size: 14px;
        margin: 0;
        line-height: 1;
    }

</style>

#end

#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            我的订单
            <small>My Orders</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <form class="form-horizontal actionPanel">
                            <div class="row">
                                <div class="form-group col-xs-4">
                                    <label class="col-sm-3 control-label">商品</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" >
                                    </div>
                                </div>
                                <div class="form-group col-xs-4">
                                    <label  class="col-sm-3 control-label">订单号</label>
                                    <div class="col-sm-9">
                                        <input  class="form-control" >
                                    </div>
                                </div>
                                <div class="form-group col-xs-4">
                                    <button type="submit" class="btn btn-primary ">查询</button>
                                    <button type="reset" class="btn btn-default">重置</button>
                                    <a class="btn"> 更多<i class="fa fa-fw fa-angle-down"></i> </a>
                                </div>
                            </div>
                            <!-- /.box-body -->
                        </form>


                    </div>
                    <!-- /.box-header -->
                    <div class="box-body ">

                        <table class="table table-striped">
                            <tbody>
                            <tr >
                                <th style="text-align: center">商品</th>
                                <th style="text-align: center">数量</th>
                                <th style="text-align: center">单价</th>
                                <th style="text-align: center">总价</th>
                                <th style="text-align: center">操作</th>
                            </tr>


                            #for(order : userOrderPage.list ??)
                            <tr>
                                <td colspan="5" bgcolor="#fff">
                                    <div class="box box-dashboard" style="margin-bottom: 0px">
                                        <div class="box-header with-border">
                                            <div class="col-lg-10">
                                                订单号：#(order.ns ??)
                                                总金额：<span style="padding-right: 20px">#(order.orderRealAmount ??)</span>
                                                支付状态：<span style="padding-right: 20px">#(order.payStatusStr ??)</span>

                                                #if(order.isPaySuccess())
                                                物流状态：<span style="padding-right: 20px">#(order.deliveryStatusStr ??)</span>
                                                #end

                                            </div>
                                            <div class="col-lg-2" style="text-align: right">
                                                <h3 class="box-title">
                                                    #if(order.isUnpay())
                                                    <a href="#(CPATH)/ucenter/checkout/order/#(order.id)" target="_blank">
                                                         去付款
                                                    </a>
                                                    #end
                                                    <a href="#(CPATH)/ucenter/order/detail/#(order.id)">详情</a>
                                                </h3>
                                            </div>
                                        </div>
                                        <!-- /.box-header -->
                                        <div class="box-body no-padding">
                                            <table class="table table-striped">
                                                <tbody>
                                                #for(item : order.items)
                                                <tr>
                                                    <td style="width: 20%;text-align: center">#(item.product_title ??)</td>
                                                    <td style="width: 20%;text-align: center">#(item.product_count ??)</td>
                                                    <td style="width: 20%;text-align: center">#(item.product_price ??)</td>
                                                    <td style="width: 20%;text-align: center">#(item.product_price *  item.product_count ??)</td>
                                                    <td style="width: 20%;text-align: center">
                                                        #if(item.comment_path ??)
                                                        <a href="#(CPATH)/ucenter/order/comment/#(item.id)" target="_blank">评价</a>
                                                        #end

                                                        #if(item.canView())
                                                        <a href="#(CPATH)#(item.view_path ??)itemId=#(item.id)" target="_blank">
                                                            #(item.view_text ??)
                                                        </a>
                                                        #end

                                                        #if(!item.comment_path && !item.canview)
                                                        - -
                                                        #end
                                                    </td>
                                                </tr>
                                                #end
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            #end

                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <div class="row">
                            <div class="col-sm-12">
                                #@_paginate()
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>

    </section>


</div>
#end
