<!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 class="is-required">时间区间： </label>
                            <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime" required/>
                            <span>-</span>
                            <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime" required/>
                        </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>
                            <label>状态：</label>
                            <select name="state" th:with="type=${@dict.getType('proState')}">
                                <option value="">全部</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>类型：</label>
                            <select name="productType" th:with="type=${@dict.getType('productType')}">
                                <option value="">全部</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>产品条码：</label>
                            <input type="text" name="semiBarcode"/>
                        </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:ProRpList: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/selectProRpList";
    $(function() {
        var options = {
            url: prefix + "/getData",
            exportUrl: prefix + "/export",
            modalName: "ProRpList",
            pagination:false,
            showExport: true,//工具栏上显示导出按钮
            exportOptions: {
                ignoreColumn: false  //忽略第一列和最后一列
            },
            pageSize:100,
            columns: [
                {
                    field: 'barcode',
                    title: '系统条码'
                },
                {
                    field: 'productName',
                    title: '机种名称'
                },
                {
                    field: 'semiBarcode',
                    title: '产品条码'
                },
                {
                    field: 'state',
                    title: '状态'
                },
                {
                    field: 'currentStation',
                    title: '当前工位'
                },
                {
                    field: 'NGStation',
                    title: 'NG工位'
                },
                {
                    field: 'finishFlag',
                    title: '完成标志'
                },
                {
                    field: 'namePlateInfo',
                    title: '标签Y/N'
                },
                {
                    field: 'isDis',
                    title: '返修Y/N'
                },
                {
                    field: 'beginTime',
                    title: '开始时间'
                },
                {
                    field: 'endTime',
                    title: '结束时间'
                },
                ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>