<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('托盘实时信息查询')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>	工位名称：</label>
                            <select name="StationCode" required>
                                <option value="">全部</option>
                                <option th:each="ls : ${list}" th:text="${ls.StationCode}" th:value="${ls.StationID}"></option>
                            </select>
                        </li>
                        <li>
                            托盘RFID码：
                            <input type="text" name="rfidNum"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;查询全部</a>
<!--                            <a class="btn btn-info btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="nanjing:WorkTrayRealTimeInfo:export"><i class="fa fa-download"></i> 导出</a>-->
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-export-js" />
<script th:inline="javascript">
    var prefix = ctx + "nanjing/selectWorkTrayRealTimeInfo";
    var datas = [[${@dict.getType('proState')}]];
    $(function() {
        var options = {
            url: prefix + "/list",
            exportUrl: prefix + "/export",
            modalName: "托盘实时信息查询",
            showExport: true,//工具栏上显示导出按钮
            exportOptions: {
                ignoreColumn: false  //忽略第一列和最后一列
            },
            columns: [
                {
                    field: 'rfidNum',
                    title: '托盘条码'
                },
                {
                    field: 'barCode',
                    title: '系统条码'
                },
                {
                    field: 'barcoderelationship.productBarcode',
                    title: '部件码'
                },
                {
                    field: 'state',
                    title: '状态',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(datas, value);
                    }
                },
                {
                    field: 'updateTime',
                    title: '记录时间'
                },
                ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>