@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<!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, maximum-scale=1">
    <style>

        .layui-form-item .layui-input-company {
            width: auto;
            padding-right: 10px;
            line-height: 38px;
        }
    </style>
</head>
<body>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <div class="layui-form layuimini-form" lay-filter="adminform">
                <div class="layui-form-item">
                    <label class="layui-form-label required">账号</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Account" name="F_Account" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label required">姓名</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_RealName" name="F_RealName" autocomplete="off" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label ">性别</label>
                    <div class="layui-input-block">
                        <select id="F_Gender" name="F_Gender">
                            <option value="true">男</option>
                            <option value="false">女</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label required">生日</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Birthday" name="F_Birthday" autocomplete="off" value="" lay-verify="required" 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_MobilePhone" name="F_MobilePhone" autocomplete="off" placeholder="请输入手机号" 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_Email" name="F_Email" autocomplete="off" placeholder="请输入邮箱" value="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea id="F_Description" name="F_Description" autocomplete="off" class="layui-textarea" placeholder="请输入备注信"></textarea>
                    </div>
                </div>

                <div class="layui-form-item" style="text-align:center">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="saveBtn">确认保存</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.use(['jquery', 'form', 'laydate', 'common', 'optimizeSelectOption'], function () {

            var form = layui.form,
                $ = layui.$,
                common = layui.common,
                laydate = layui.laydate;
            $(function () {
                common.ajax({
                    url: "/SystemOrganize/User/GetUserFormJson",
                    dataType: "json",
                    async: false,
                    success: function (data) {
                        common.val('adminform', data);
                        //$('#F_Birthday').val(new Date(data.F_Birthday).Format("yyyy-MM-dd"));
                    }
                });
                form.render();
            });
            wcLoading.close();
            //执行一个laydate实例
            laydate.render({
                elem: '#F_Birthday'
                , btns: ['clear', 'now']
                , trigger: 'click',
                format: 'yyyy-MM-dd',
            });
            //监听提交
            form.on('submit(saveBtn)', function (data) {
                var postData = data.field;
                common.submitForm({
                    url: "/SystemOrganize/User/SubmitUserForm",
                    param: postData,
                    close: false,
                    success: function () {

                    }
                })
                return false;
            });
        });
    </script>
</body>
</html>