<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><!DOCTYPE html>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>新建</title>
    <link rel="stylesheet" href="/lib/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
    <link rel="stylesheet" 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: 90px; margin-left: -20px">常用语</label>
            <div class="layui-input-inline" style="width: 640px">
                <textarea id="cyy" name="cyy" class="layui-textarea" style="width: 100%; height: 100px"></textarea>
            </div>
        </div>
        <div class="layui-form-item layui-inline" style="width: 100%">
            <label class="layui-form-label" style="width: 70px">所属人员id</label>
            <div class="layui-input-inline" style="width: 640px">
                <input type="text" id="account" name="account" class="layui-input" th:value="${userInfo.userId}"
                       readonly>
            </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: 640px">
                <input type="text" id="yhm" name="yhm" class="layui-input" th:value="${userInfo.account}" readonly>
            </div>
        </div>

        <!-- 右侧悬浮按钮 -->
        <div class="right-bottom-btn">
            <button type="button" class="layui-btn" lay-submit lay-filter="saveBtn">
                <i class="layui-icon layui-icon-ok"></i>确定
            </button>
            <button class="layui-btn" lay-filter="cancleBtn">
                <i class="layui-icon layui-icon-close"></i>取消
            </button>
        </div>
    </div>
</form>

<script src="/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="/lib/layui/layui.js" charset="utf-8"></script>
<script src="/lib/coco-message/coco-message.js" charset="utf-8"></script>
<script src="/lib/xm-select-v1.2.2/xm-select.js" charset="utf-8"></script>
<script src="/js/lay-config.js" charset="utf-8"></script>

<script type="text/javascript">
    AjaxUtil.ctx = "\/";
    layui.use(['form', 'tableSelect'], function () {
        var form = layui.form

        //监听提交
        form.on('submit(saveBtn)', function (data) {
            if (data.field.cyy != "") {
                AjaxUtil.post({
                    url: AjaxUtil.ctx + "prjProject/doCyyAdd",
                    data: data.field
                });
            }
            parent.setUpdateFlag();
            parent.setCyyCompany(data.field)
            parent.layer.close(parent.layer.getFrameIndex(window.name));// 关闭子窗口
        });

        // 监听取消按钮
        $("button[lay-filter='cancleBtn']").click(function () {
            var iframeIndex = parent.layer.getFrameIndex(window.name);
            parent.layer.close(iframeIndex);
        });
    });
</script>
</body>
</html>