@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<body>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <blockquote class="layui-elem-quote layui-text">
                注意!IP地址格式：192.168.0.1；192.168.0.*
            </blockquote>
            <div class="layui-form layuimini-form" lay-filter="adminform" text-aglin:center>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">策略类型</label>
                    <div class="layui-input-block">
                        <select id="F_Type" name="F_Type">
                            <option value="false">拒绝访问</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">起始IP</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_StartIP" name="F_StartIP" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">结束IP</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_EndIP" name="F_EndIP" value="" class="layui-input ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">到期时间</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_EndTime" name="F_EndTime" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">有效</label>
                    <div class="layui-input-block">
                        <input type="checkbox" checked="" id="F_EnabledMark" name="F_EnabledMark" lay-skin="switch" lay-filter="switchTest" lay-text="ON|OFF">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text layui-hide">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea id="F_Description" name="F_Description" class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
    layui.use(['jquery', 'form', 'laydate', 'common', 'optimizeSelectOption'], function () {

        var form = layui.form,
            $ = layui.$,
            common = layui.common,
            laydate = layui.laydate;
        var keyValue = $.request("keyValue");
        //权限字段
        common.authorizeFields('adminform');
        $(function () {
            common.ajax({
                url: "/SystemSecurity/FilterIP/GetFormJson",
                dataType: "json",
                data: { keyValue: keyValue },
                async: false,
                success: function (data) {
                    common.val('adminform', data);
                    common.setReadOnly('adminform');
                    form.render();
                }
            });
        });
        wcLoading.close();
    });
</script>

