@model Com._9pm2.ClientWeb.Model.UserOrderPerformanceDetailReport
@{
    ViewBag.Title = "员工绩效明细";
}

<script src="~/Scripts/ordercommon.js?vn=20180813"></script>
<script src="../../Scripts/userorderperformancedetail.js?vn=20180813"></script>
<style>
    .lead span {
        margin-right: 10px;
    }
</style>
<div class="callout callout-success lead ">
    <span>@string.Format("员工姓名：{0}", Model.UserName)</span>
    @if (!string.IsNullOrEmpty(Model.CBeginDate))
    {
        <span>@string.Format("完工日期：{0} ~ {1}", Model.CBeginDate, Model.CEndDate)</span>
    }
    @if (!string.IsNullOrEmpty(Model.TBeginDate))
            {
        <span>@string.Format("交易日期：{0} ~ {1}", Model.TBeginDate, Model.TEndDate)</span>
    }
</div>

<div id="dSearch" class="divSearch">
    <form method="post">
        <div style="width:100%">

            <button class="btn btn-default" type="button" id="btnExportExcel">下载(Excel)</button>
            <button class="btn btn-default" type="button" onclick="history.go(-1);">返回</button>
        </div>

    </form>
</div>
<div class="error-msg"></div>
<div id="Statement">
    <div class="list">
        <table id="tPerformance">
            <thead>
                <tr>
                    <th style="width:150px">订单编号</th>
                    <th style="width:100px">交易日期</th>
                    <th style="width:100px">完工日期</th>
                    <th>客户名称</th>
                    <th>订单名称</th>
                    <th>步骤名称</th>
                    <th style="width:100px">订单金额</th>
                    <th style="width:100px">订单利润</th>
                    <th style="width:100px">绩效金额</th>

                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.Items)
                {
                    <tr id="@item.OrderNo">
                        <td>@item.OrderNo</td>
                        <td>@item.TransactionDate</td>
                        <td>@item.CompleteDate</td>
                        <td>@item.CustomerName</td>
                        <td>@item.OrderName</td>
                        <td>@item.StepName</td>
                        <td class="text-right">@Com._9pm2.ClientWeb.Utilities.NFormat.Format(item.OrderAmount)</td>
                        <td class="text-right">@Com._9pm2.ClientWeb.Utilities.NFormat.Format(item.OrderProfit)</td>
                        <td class="text-right">@Com._9pm2.ClientWeb.Utilities.NFormat.Format(item.CtAmount)</td>
                    </tr>
                }
                @if (Model.Items.Count > 0)
                {
                    <tr class="totalTd">
                        <td>总计：</td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td class="oderAmountTotal text-right">@Com._9pm2.ClientWeb.Utilities.NFormat.Format(Model.TotalAmount)</td>
                    </tr>
                }

            </tbody>
        </table>
    </div>
</div>

@Html.Partial("OrderDetail", Session["LoginUser"] as Com._9pm2.ClientWeb.Models.LoginUser)
<input type="hidden" id="OrderNo" />
@Html.Hidden("TBeginDate")
@Html.Hidden("TEndDate")
@Html.Hidden("CBeginDate")
@Html.Hidden("CEndDate")
@Html.Hidden("UserId")

