<!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" style="width: 10%">人员</label>
            <div class="layui-input-inline" style="width: 25%">
                <input type="text" id="ryxm" name="ryxm" class="layui-input" readonly>
            </div>
            <label class="layui-form-label" style="width: 10%">单位</label>
            <div class="layui-input-inline" style="width: 35%">
                <input type="text" id="dwmc" name="dwmc" class="layui-input" readonly>
            </div>
        </div>

        <div class="layui-form-item layui-inline" style="width: 100%">
<!--            <label class="layui-form-label" style="width: 10%">单位类型</label>
            <div class="layui-input-inline" style="width: 25%">
                <input type="text" id="dwlxmc" name="dwlxmc" class="layui-input" readonly>
            </div>-->
            <label class="layui-form-label" style="width: 10%">学历</label>
            <div class="layui-input-inline" style="width: 25%">
                <input type="text" id="xlmc" name="xlmc" class="layui-input" readonly>
            </div>
            <label class="layui-form-label" style="width: 10%">职称</label>
            <div class="layui-input-inline" style="width: 35%">
                <input type="text" id="zcmc" name="zcmc" class="layui-input" readonly>
            </div>
        </div>

        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label" style="width: 10%">项目角色</label>
            <div class="layui-input-inline" style="width: 25%">
                <input type="text" id="xmjsmc" name="xmjsmc" class="layui-input" readonly>
            </div>
            <label class="layui-form-label" style="width: 10%">本项目分工</label>
            <div class="layui-input-inline" style="width: 35%">
                <input type="text" id="bxmfg" name="bxmfg" class="layui-input" readonly>
            </div>
        </div>

        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label" style="width: 10%">投入工作总月数</label>
            <div class="layui-input-inline" style="width: 25%">
                <input type="number" id="trgzzys" name="trgzzys" class="layui-input" readonly>
            </div>

        </div>

<!--
        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label" style="width: 10%">顺序编号</label>
            <div class="layui-input-inline" style="width: 250px">
                <input type="text" id="sxbh" name="sxbh" class="layui-input" readonly>
            </div>

        </div>
-->
        <!-- 右侧悬浮按钮 -->
        <div class="right-bottom-btn">
            <!--            <button class="layui-btn" lay-filter="preBtn">-->
            <!--                <i class="layui-icon layui-icon-prev"></i>上一条-->
            <!--            </button>-->
            <!--            <button class="layui-btn" lay-filter="nextBtn">-->
            <!--                <i class="layui-icon layui-icon-next"></i>下一条-->
            <!--            </button>-->
            <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'], function () {

        var prjMember = parent.getMember();
        $("#ryxm").val(prjMember.ryxm);
        $("#dwmc").val(prjMember.dwmc);
        $("#dwlxmc").val(prjMember.dwlxmc);
        $("#zcmc").val(prjMember.zcmc);
        $("#xlmc").val(prjMember.xlmc);
        $("#xmjsmc").val(prjMember.xmjsmc);
        $("#bxmfg").val(prjMember.bxmfg);
        $("#sxbh").val(prjMember.sxbh);
        $("#trgzzys").val(prjMember.trgzzys);

        // var index = parent.getMemberIndex();
        // var prjMembers = parent.getMembers();
        // setPrjMember(prjMembers[index]);
        //
        // // 监听上一条按钮
        // $("button[lay-filter='preBtn']").click(function () {
        //     if(index > 0) {
        //         parent.setMemberIndex(index-1);
        //         layui.reload();
        //     }
        // });
        // // 监听下一条按钮
        // $("button[lay-filter='nextBtn']").click(function () {
        //     if(index < prjMembers.length-1) {
        //         parent.setMemberIndex(index-1);
        //         layui.reload();
        //     }
        // });
        // 监听取消按钮
        $("button[lay-filter='cancleBtn']").click(function () {
            var iframeIndex = parent.layer.getFrameIndex(window.name);
            parent.layer.close(iframeIndex);
        });
    });
</script>
</body>
</html>