@model Com._9pm2.ClientWeb.Model.OrderCostReport
@{
    ViewBag.Title = "订单成本分析";
}
<script src="../../Scripts/chartordercost.js?vn=20180813"></script>
<style>
    th, td {
        height: 24px;
        padding-left: 5px !important;
    }
    h3 {
        border-bottom: 2px solid #3c8dbc;
        padding-bottom: 10px;
        margin-top: 0;
    }

    h4 {
        margin-top: 20px;
    }

    .list {
        margin-bottom: 20px;
        padding: 10px 10px 10px 10px;
        background-color: white;
        box-sizing: border-box;
    }
</style>

<form method="post">
    <div class="divSearch" id="dSearch">
        <div>
            &nbsp;&nbsp;交易日期：@Html.TextBox("BeginDate", null, new { maxlength = "50", @class = "text-date", placeholder = "交易日期" }) ~@Html.TextBox("EndDate", null, new { maxlength = "50", @class = "text-date", placeholder = "交易日期" })
            <button class="btn btn-default" id="btnSearch" onclick="return search()">搜索</button>
            <span style="top:10px;position:relative;margin-right:10px;margin-left:10px;">
          
            </span>
            <span class="redStar"></span>

        </div>
    </div>
</form>
 
    <div class="list">
        <h3>综合分析：</h3>
        <table class="">

            <tbody>
                <tr>
                    <td style="width:120px;" >订单总数量：</td>
                    <td>@Model.BasicInfo.TotalNumber</td>
                </tr>

                <tr>
                    <td >订单总金额：</td>
                    <td>@Model.BasicInfo.TotalAmount</td>
                </tr>
                <tr>
                    <td>订单总成本：</td>
                    <td>@Model.BasicInfo.TotalCost</td>
                </tr>
                <tr>
                    <td >订单总毛利：</td>
                    <td>@Model.BasicInfo.TotalProfit</td>
                </tr>
                <tr>
                    <td >订单毛利率：</td>
                    <td>@string.Format("{0:P}", Model.BasicInfo.ProfitRatio)</td>
                </tr>

                </tbody>

</table>
        <br />

        <h3>成本明细：</h3>
        <table id="tReport">
            <thead>
                <tr>
                    <th style="width:20%">费用名称</th>
                    <th style="width:40%">费用金额</th>
                    <th style="width:40%">占比</th>
                </tr>
            </thead>
            <tbody>

                @foreach (var d in Model.List)
                {
                    <tr>
                        <td>@d.Name</td>
                        <td>@d.Value</td>
                        <td>@string.Format("{0:P}", d.Percent)</td>
                    </tr>
                }

            </tbody>
        </table>

    </div>
 