@model Com._9pm2.ClientWeb.Models.DepositList
@{
    ViewBag.Title = "客户充值";
}

<script src="../../Scripts/customerdeposit.js?vn=20180813"></script>

<div class="divSearch">
    <form method="post" action="/Customer/Deposit">
        <div>
            <div class="div-search-select2">
                @Html.DropDownList("CustomerNo", new SelectList(Model.DdlCustomer, "ItemValue", "ItemText"))
                </div>
                @Html.TextBox("sb", null, new { maxlength = "50", @class = "text-date", placeholder = "充值日期" }) ~ @Html.TextBox("se", null, new { maxlength = "50", @class = "text-date", placeholder = "充值日期" })
                @Html.TextBox("sk", null, new { maxlength = "50", @Style = "width:140px", placeholder = "备注" })
                <button class="btn btn-default" id="btnSearch">搜索</button>
                <button id="btnNew" type="button" class="btn btn-default">账户充值</button>
                <button id="btnReturn" type="button" class="btn btn-default">返回</button>
            </div>

    </form>
</div>
<div class="error-msg"></div>
<div>


</div>
<div class="list">
    <table id="tDeposite">
        <thead>
            <tr>
                <th>客户名称</th>
                <th>充值日期</th>
                <th>实缴金额</th>
                <th>赠送金额</th>
                <th>备注</th>                
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model.Deposits)
            {
                <tr>

                    <td>
                        @item.Customer.CustomerFullName
                    </td>
                    <td>@item.CreateTime.ToString("yyyy-MM-dd")</td>
                    <td>@item.RealAmount</td>
                    <td>@item.FreeAmount</td>
                    <td> @item.Memo</td>                     
                </tr>
            }
            @if (Model.Deposits.Count > 0)
            {
                <tr class="totalTd">
                    <td>总计(所有页):</td>
                    <td>&nbsp;</td>
                    <td class="oderAmountTotal">@Model.TotalRealAmount</td>
                    <td class="oderAmountTotal">@Model.TotalFreeAmount</td>
                    <td>&nbsp;</td>
                </tr>
            }
            
        </tbody>
    </table>
    @Html.Pager("Deposit", "Customer", Model.RouterDirectory, Model.PagerConfig, "pagerDiv", "pagerDiv", 8, true, false, true, true, false)
</div>

<div id="divDeposite" title="客户账户充值" style="display:none">
    <div id="divDepositeContent" style="overflow-y: auto; height: 280px;">
        @using (Html.BeginForm())
        {
            <table class="font85 tableEdit">
                <tr>
                    <td class="label">客户名称</td>
                    <td>
                        @Html.DropDownList("CustomerNo", new SelectList(Model.DdlCustomer, "ItemValue", "ItemText"))
                    </td>
                </tr>                
                <tr>
                    <td class="label">实缴金额</td>
                    <td>
                        @Html.TextBox("RealAmount", null, new { maxlength = "10", @class = "money" })&nbsp;<span class="redStar">*</span>
                    </td>
                </tr>
                <tr>
                    <td class="label">赠送金额</td>
                    <td>
                        @Html.TextBox("FreeAmount", null, new { maxlength = "10", @class = "money"})
                    </td>
                </tr>
                <tr>
                    <td class="label">备注</td>
                    <td>
                        @Html.TextArea("Memo", null, new { maxlength = "200", @style = "height:80px;width:90%;" })
                    </td>
                </tr>
            </table>
        }
    </div>
    <div style="text-align:right;">

        <div class="error-msg"></div>
        <button class="btn btn-primary" type="button"  id="btnSave">保存</button>
        <button class="btn btn-default"  type="button" id="btnCancel">取消</button>

    </div>
</div>  