@using MySystem.Models;
@{
    string RightInfo = ViewBag.RightInfo as string;
    string right = ViewBag.right as string;
    string UserId = ViewBag.UserId as string;
    List<Users> TopUsers = ViewBag.TopUsers as List<Users>;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>创客账户</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
    <script src="/admin/js/jquery-1.10.1.min.js"></script>
    <style>
        .layui-input-inline{
            width: 175px !important;
        }
        .layui-form-label{
            width: 85px !important;
        }
        .layui-inline{
            margin-right: 0px !important;
        }        
        .w100{
            width: 100px !important;
        }
        .ml50{
            margin-left: 50px !important;
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                <div class="layui-form-item">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">创客编号</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="MakerCode" autocomplete="off">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">创客名称</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="RealName" autocomplete="off">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">创建时间</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" readonly name="CreateDateData" id="CreateDate" autocomplete="off">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">顶级创客</label>
                            <div class="layui-input-inline">
                                <select id="TopUserId" name="TopUserId" lay-search="">
                                    <option value="">全部...</option>
                                    @foreach(Users TopUser in TopUsers)
                                    {
                                    <option value="@TopUser.Id">@TopUser.RealName</option>
                                    }
                                </select>
                            </div>
                        </div>
                    
                        <div class="layui-inline">
                            <label class="layui-form-label">账户状态</label>
                            <div class="layui-input-inline">
                                <select id="AccountStatusSelect" name="AccountStatusSelect" lay-search="">
                                    <option value="">全部...</option>
                                    <option value="0">有效</option>
                                    <option value="1">冻结</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">账户总金额</label>
                            <div class="layui-input-inline w100">
                                <input class="layui-input" type="text" name="sTotalAmount" id="sTotalAmount"
                                    autocomplete="off">
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline w100">
                                <input class="layui-input" type="text" name="eTotalAmount" id="eTotalAmount"
                                    autocomplete="off">
                            </div>
                        </div>
                        <div class="layui-inline ml50">
                            <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询
                            </button>
                            <button class="layui-btn" lay-submit lay-filter="LAY-list-front-searchall">
                                <i class="layui-icon layui-icon-list layuiadmin-button-btn"></i>全部
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-card-body">
                <blockquote class="layui-elem-quote layui-text">
                    账户总金额(元)：<span style="color: #f00;" id="TotalAmount">0.00</span>　|　冻结金额(元)：<span style="color: #f00;" id="FreezeAmount">0.00</span>　|　余额(元)：<span style="color: #f00;" id="BalanceAmount">0.00</span>
                </blockquote>
                <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
                <script type="text/html" id="table-list-tools">
                    <a class="layui-btn layui-btn-warm layui-btn-xs" lay-text="{{d.RealName}}账户详情" lay-href="/Admin/UserAccountRecord/Index?right=@right&UserId=@("{{d.Id}}")"><i class="layui-icon layui-icon-read"></i>详情</a>
                    @if (RightInfo.Contains("," + right + "_Freeze,"))
                    {
                        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="closeRemark"><i class="layui-icon layui-icon-edit"></i>冻结备注</a>
                    @("{{#if (d.AccountStatus == 0){ }}")
                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="Close"><i class="layui-icon layui-icon-edit"></i>冻结</a>
                    @("{{#}else{ }}")
                    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="Open"><i class="layui-icon layui-icon-edit"></i>解冻</a>
                    @("{{#} }}")
                    }
                </script>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script src="/layuiadmin/modules_main/UserAccount_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
    <script>
        var UserId = '@UserId';
    </script>
</body>
</html>