<!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 class="select-time">
                            <label>时间区间： </label>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
                        </li>
                        <li>
                            <label>机种类型：</label>
                            <select name="ProductId">
                                <option value="">所有</option>
                                <option th:each="ls:${list}" th:value="${ls.productID}" th:text="${ls.productName}"></option>
                            </select>
                        </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="nanjingProductChangeInfo: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/SelectProductChangeInfo";
    $(function() {
        var options = {
            url: prefix + "/list",
            exportUrl: prefix + "/export",
            modalName: "机种更换信息查询",
            showExport: true,//工具栏上显示导出按钮
            exportOptions: {
                ignoreColumn: false  //忽略第一列和最后一列
            },
            columns: [
                {
                    field: 'id',
                    title: '序号'
                },
                {
                    field: 'tBdProductinfo.productName',
                    title: '机种名称',
                },
                {
                    field: 'personInCharge',
                    title: '生产负责人'
                },
                {
                    field: 'beginTime',
                    title: '开始时间'
                },
                {
                    field: 'endTime',
                    title: '结束时间'
                },
                {
                    field:'user.userName',
                    title:'操作人'
                }
                ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>