<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 引入公用部分 -->
    <script th:replace="common/head::static"></script>
    <!-- 游戏数据用户相关样式 -->
    <link th:href="@{/sys/aComUser/css/user.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="layui-row layui-col-space15">
    <!-- 树 -->
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">背包列表</div>
            <div class="layui-card-body">
                <!-- 表格主体 -->
                <table class="layui-hide" id="mainTable" lay-filter="test"></table>
                <!-- 模板 -->
                <script type="text/html" id="mainTableToolbarDemo">
                    <div class="layui-form" action="">
                        <div class="layui-form-item">
                            <div class="layui-inline tool-btn">
                                <button class="layui-btn layui-btn-sm" lay-event="addNewRow">新增</button>
                            </div>
                            <div class="layui-inline" style="width: 500px;">
                                <input type="text" id="queryByAddress" name="queryByAddress" placeholder="输入钱包地址"
                                       autocomplete="off" class="layui-input">
                            </div>
                            <button class="layui-btn layui-btn-sm" style="padding: 0 10px;" lay-event="query">查询<i
                                    class="layui-icon layui-icon-search"></i></button>
                        </div>
                    </div>
                </script>

                <script type="text/html" id="mainTableBarDemo">
                    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑<i class="layui-icon layui-icon-edit"></i></a>
                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                </script>


                <!--<script type="text/html" id="itemTypeTpl">-->
                <!--    <select id="demoCity1" class="layui-border" lay-ignore>-->
                <!--        <option th:each="prop,iterStat : ${propList}"  th:value="${prop.id}" th:text="${prop.itemName }">-->
                <!--        </option>-->
                <!--    </select>-->
                <!--</script>-->
            </div>
        </div>

    </div>
    <!-- 操作表单 -->
    <div class="layui-col-md12" style="display:none;" id="show_div">
        <div class="layui-card">
            <!--<div class="layui-card-header">操作表单</div>-->
            <div class="layui-card-body">
                <form id="comForm" class="layui-form layui-form-pane" lay-filter="comForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="userId" autocomplete="off" placeholder="userId"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item" id="tableId">
                        <label class="layui-form-label">背包ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="id" autocomplete="off" placeholder="id"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">物品ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="itemId" autocomplete="off" placeholder="itemId"
                                   class="layui-input" readonly="readonly" lay-verify="required|positiveInteger">
                        </div>
                    </div>
                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">类型（1:货币，2：矿石，3：材料）</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="itemType" autocomplete="off" placeholder="itemType"-->
                    <!--               class="layui-input" >-->
                    <!--    </div>-->
                    <!--</div>-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">类型</label>
                        <div class="layui-input-block">
                            <select name="itemType" id="itemType" lay-verify="required" lay-filter="xmFilter">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">标记分类</label>
                        <div class="layui-input-block">
                            <input type="text" name="itemTag" autocomplete="off" placeholder="itemTag"
                                   class="layui-input" lay-verify="required|positiveInteger">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">物品名字</label>
                        <div class="layui-input-block">
                            <input type="text" name="itemName" autocomplete="off" placeholder="itemName"
                                   class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">图片</label>
                        <div class="layui-input-block">
                            <input type="text" name="pictureName" autocomplete="off" placeholder="pictureName"
                                   class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">物品数量</label>
                        <div class="layui-input-block">
                            <input type="text" name="amount" autocomplete="off" placeholder="amount"
                                   class="layui-input" lay-verify="required|positiveInteger">
                        </div>
                    </div>
                    <div class="layui-form-item" id="tableTime">
                        <div class="layui-inline">
                            <label class="layui-form-label">创建时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="createTime" autocomplete="off" class="layui-input"
                                       readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item" id="tableTime">
                        <div class="layui-inline">
                            <label class="layui-form-label">更新时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="updateTime" autocomplete="off" class="layui-input"
                                       readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <!-- 隐藏域 -->
                    <!--<input type="text" name="userId" hidden="hidden"/>-->

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a id="saveBtn" class="layui-btn" type="submit" lay-submit lay-filter="comFilter">保存</a>
                            <!--<a id="addBtn" class="layui-btn" type="submit" lay-submit lay-filter="comAddFilter">新增</a>-->
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>

    <div class="layui-col-md12" style="display:none;" id="show_add_div">
        <div class="layui-card">
            <div class="layui-card-body">
                <form id="addForm" class="layui-form layui-form-pane" lay-filter="addForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">当前用户ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="userId" autocomplete="off" placeholder="userId"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">物品</label>
                        <div class="layui-input-block">
                            <select name="id" id="id" lay-verify="required" lay-filter="idFilter">
                                <option th:each="prop : ${propList}"  th:value="${prop.id}" th:text="${prop.name}">
                                </option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a id="addBtn" class="layui-btn" type="submit" lay-submit lay-filter="comAddFilter">新增</a>
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>

    <!--<div class="layui-col-md12">-->
    <!--    <div class="layui-card">-->
    <!--        <div class="layui-card-header">用户仓库操作列表</div>-->
    <!--        <div class="layui-card-body">-->
    <!--            &lt;!&ndash; 表格主体 &ndash;&gt;-->
    <!--            <table class="layui-hide" id="comPlayerLogTable" lay-filter="test"></table>-->
    <!--            &lt;!&ndash; 模板 &ndash;&gt;-->
    <!--            <script type="text/html" id="comPlayerLogTableToolbarDemo">-->
    <!--                <div class="layui-btn-container">-->
    <!--                    <button class="layui-btn layui-btn-sm" lay-event="playerLogReload">刷新</button>-->
    <!--                </div>-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--</div>-->

    <!--<div class="layui-col-md12">-->
    <!--    <div class="layui-card">-->
    <!--        <div class="layui-card-header">用户偷取操作列表</div>-->
    <!--        <div class="layui-card-body">-->
    <!--            &lt;!&ndash; 表格主体 &ndash;&gt;-->
    <!--            <table class="layui-hide" id="comPlayerProfitTable" lay-filter="test"></table>-->
    <!--            &lt;!&ndash; 模板 &ndash;&gt;-->
    <!--            <script type="text/html" id="comPlayerProfitTableToolbarDemo">-->
    <!--                <div class="layui-btn-container">-->
    <!--                    <button class="layui-btn layui-btn-sm" lay-event="playerProfitReload">刷新</button>-->
    <!--                </div>-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--</div>-->

</div>
</body>
<script type="text/javascript" th:inline="javascript">
    console.log("propList:",[[${propList}]]);
</script>
<!-- js -->
<script th:src="@{/sys/aComUser/js/userPlayerBackpack.js}"></script>
</html>