@model Com._9pm2.ClientWeb.Models.OrderArrears
@{
    ViewBag.Title = "客户欠款统计";
}

<script src="~/Scripts/ordercommon.js?vn=20180813"></script>
<script src="../../Scripts/orderarrears.js?vn=20180813"></script>

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


            @Html.TextBox("sBeginDate", null, new { maxlength = "50", @class = "text-date", placeholder = "交易日期" }) ~ @Html.TextBox("sEndDate", null, new { maxlength = "50", @class = "text-date", placeholder = "交易日期" })&nbsp;&nbsp;


            <button class="btn btn-default" id="btnSearch" onclick="return checkField();">搜索</button>
            <button class="btn btn-default" type="button" id="btnExportExcel">下载(Excel)</button>
        </div>

    </form>
</div>
<div class="error-msg"></div>
<div id="Statement">
    <div class="list">
        <table id="tOrder">
            <thead>
                <tr>

                    <th>客户名称</th>
                    <th>欠款订单数</th>
                    <th>欠款金额</th>

                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.List)
                {
                    <tr>

                        <td>@item.CustomerName</td>
                        <td>@item.Number</td>
                        <td>@item.Amount</td>
                    </tr>
                }
                @if (Model.List.Count > 0)
                {
                    <tr class="totalTd">
                        <td>总计(所有页)：</td>
                        <td class="oderAmountTotal">@Model.TotalNumber</td>
                        <td class="oderAmountTotal">@Com._9pm2.ClientWeb.Utilities.NFormat.Format(Model.TotalAmount)</td>

                    </tr>
                }

            </tbody>
        </table>
        @Html.Pager("OrderArrears", "Order", Model.RouterDirectory, Model.PagerConfig, "pagerDiv", "pagerDiv", 8, true, false, true, true, false)
    </div>
</div>

