<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>查看</title>
    <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/css/public.css}" media="all">
    <link rel="stylesheet" th:href="@{/lib/font-awesome-4.7.0/css/font-awesome.min.css}" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<form class="layui-form" action="" lay-filter="formDemo">
    <div class="layui-form layuimini-form">
        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label required" style="width: 70px">人员姓名</label>
            <div class="layui-input-inline" style="width: 270px">
                <input type="text" id="xm" name="xm" lay-verify="required" lay-reqtext="人员姓名不能为空" autocomplete="off"
                       class="layui-input" disabled>
            </div>
            <label class="layui-form-label required" style="width: 70px">工作地点</label>
            <div class="layui-input-inline" style="width: 270px">
                <input type="text" id="gzdd" name="gzdd" lay-verify="required" autocomplete="off" class="layui-input"
                       disabled>
            </div>
        </div>
        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label required" style="width: 70px">毕业学校</label>
            <div class="layui-input-inline" style="width: 270px">
                <input type="text" id="byxx" name="byxx" lay-verify="required" autocomplete="off" class="layui-input"
                       disabled>
            </div>
            <label class="layui-form-label" style="width: 70px">专业</label>
            <div class="layui-input-inline" style="width: 270px">
                <input type="text" id="zy" name="zy" lay-verify="required" autocomplete="off" class="layui-input"
                       disabled>
            </div>
        </div>
        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label " style="width: 70px">学历</label>
            <div class="layui-input-inline" style="width: 270px">
                <input type="text" name="xl" id="xl" lay-verify="required|date" placeholder="结束日期"
                       lay-reqtext="结束日期不能为空" autocomplete="off" class="layui-input" disabled>
            </div>
            <label class="layui-form-label required" style="width: 70px">身份证号</label>
            <div class="layui-input-inline" style="width: 270px">
                <input type="text" id="sfzh" name="sfzh" lay-verify="required" lay-reqtext="身份证号不能为空" autocomplete="off"
                       class="layui-input" maxlength="18" disabled>
            </div>
        </div>
        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label required" style="width: 60px">聘用时间</label>
            <div class="layui-form-item layui-inline" style="width: auto">
                <div class="layui-input-inline" style="width: 150px">
                    <input type="text" name="qsrq" id="qsrq" lay-verify="required|date" placeholder="开始日期"
                           lay-reqtext="开始日期不能为空" autocomplete="off" class="layui-input" disabled>
                </div>
                <div class="layui-form-mid">-</div>
                <div class="layui-input-inline" style="width: 150px">
                    <input type="text" name="jsrq" id="jsrq" lay-verify="required|date" placeholder="结束日期"
                           lay-reqtext="结束日期不能为空" autocomplete="off" class="layui-input" disabled>
                </div>
                <br>
                <tip>日期格式：yyyy-MM-dd</tip>
            </div>
        </div>
        <div class="right-bottom-btn">
            <button class="layui-btn" lay-filter="cancleBtn">
                <i class="layui-icon layui-icon-close"></i>关闭
            </button>
        </div>
    </div>
</form>

<script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
<script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
<script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
<script th:src="@{/js/lay-config.js}" charset="utf-8"></script>
<script type="text/javascript" th:inline="javascript">
    AjaxUtil.ctx = /*[[@{/}]]*/'';
    layui.use(['form', 'layer', 'laydate'], function () {
        var form = layui.form;

        var tempMember = parent.getMember();
        $("#xm").val(tempMember.xm);
        $("#sfzh").val(tempMember.sfzh);
        $("#qsrq").val(tempMember.qsrq);
        $("#jsrq").val(tempMember.jsrq);
        $("#fysq").val(tempMember.fysq);
        $("#bzfy").val(tempMember.bzfy);
        $("#byxx").val(tempMember.byxx);
        $("#zy").val(tempMember.zy);
        $("#gzdd").val(tempMember.gzdd);
        $("#xl").val(tempMember.xl);
        form.render();
        // 监听取消按钮
        $("button[lay-filter='cancleBtn']").click(function () {
            var iframeIndex = parent.layer.getFrameIndex(window.name);
            parent.layer.close(iframeIndex);
        });
    });
</script>
</body>
</html>