<!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: 30%">
                <input type="text" id="xh" name="xh" class="layui-input" readonly>
            </div>-->
            <label class="layui-form-label" style="width: 10%">出差人</label>
            <div class="layui-input-inline" style="width: 30%">
                <input type="hidden" id="ccr" name="ccr">
                <input type="text" id="ccrxm" name="ccrxm" class="layui-input" readonly>
            </div>
            <label class="layui-form-label" style="width: 10%">出差地点</label>
            <div class="layui-input-inline" style="width: 30%">
                <input type="text" id="ccdd" name="ccdd" 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: 30%">
                <input type="number" id="ccts" name="ccts" class="layui-input" readonly>
            </div>
            <label class="layui-form-label" style="width: 10%">差补(元)</label>
            <div class="layui-input-inline" style="width: 30%">
                <input type="number" id="cb" name="cb" 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: 122px">
                <input type="text" name="qsrq" id="qsrq" class="layui-input" readonly>
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline" style="width: 122px">
                <input type="text" name="jsrq" id="jsrq" 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: 30%">
                <input type="number" id="zsf" name="zsf" class="layui-input" readonly>
            </div>
            <label class="layui-form-label" style="width: 10%">交通费(元)</label>
            <div class="layui-input-inline" style="width: 30%">
                <input type="number" id="jtf" name="jtf" 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: 30%">
                <input type="number" id="zj" name="zj" class="layui-input" readonly>
            </div>
            <label class="layui-form-label" style="width: 10%">日平均(元)</label>
            <div class="layui-input-inline" style="width: 30%">
                <input type="number" id="rpj" name="rpj" 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: 30%">-->
        <!--                <input type="number" id="bzfyhs" name="bzfyhs" class="layui-input" autocomplete="off">-->
        <!--            </div>-->
        <!--            <label class="layui-form-label" style="width: 10%">报账金额(不含税)</label>-->
        <!--            <div class="layui-input-inline" style="width: 30%">-->
        <!--                <input type="number" id="bzfybhs" name="bzfybhs" class="layui-input" autocomplete="off">-->
        <!--            </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="@{/lib/xm-select-v1.2.2/xm-select.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 form = layui.form;

        var expense = parent.getTravelExpense();
        $("#xh").val(expense.xh);
        $("#ccr").val(expense.ccr);
        $("#ccrxm").val(expense.ccrxm);
        $("#qsrq").val(expense.qsrq);
        $("#jsrq").val(expense.jsrq);
        $("#ccts").val(expense.ccts);
        $("#ccdd").val(expense.ccdd);
        $("#jtf").val(expense.jtf);
        $("#zsf").val(expense.zsf);
        $("#cb").val(expense.cb);
        $("#zj").val(expense.zj);
        $("#rpj").val(expense.rpj);
        $("#xmfzr").val(expense.xmfzr);
        $("#ccsy").val(expense.ccsy);
        $("#bzfyhs").val(expense.bzfyhs);
        $("#bzfybhs").val(expense.bzfybhs);
        form.render();

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