<!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('入库记录报表')"/>
    <link th:href="@{/ruoyi/css/ry-ui-custom.css?v=4.7.3}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row" style="height: auto !important;">
        <div class="col-sm-12 pr0 pl0 shadow">
            <div class="ibox float-e-margins ">
                <div class="ibox-title">
                    <div class="col-sm-10  pl0 pr0">
                        <h8>入库记录报表</h8>
                    </div>
                    <div class="col-sm-2 pl20">
                        <a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="stsDescribe()">状态说明</a>
                        <a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.table.exportExcel()"
                           shiro:hasPermission="business:inreport:export">导出入库记录报表</a>
                    </div>
                </div>
                <div class="ibox-content ibox-content-1" style="margin: 0;height: 150px">
                    <div class="btn-group-sm" id="toolbar" role="group">
                        <form id="formId">
                            <div class="select-list">
                                <ul>
                                    <li>
                                        日期范围：
                                        <input type="text" id="startDate" name="startDate" class="time-input"
                                               placeholder="开始时间">
                                        --
                                        <input type="text" id="endDate" name="endDate" class="time-input"
                                               placeholder="结束时间">
                                    </li>
                                    <li>
                                        <input type="text" name="search" placeholder="物料/批次/订单号/托盘号"/>
                                    </li>
                                    <li>
                                        <a class="btn btn-primary btn-rounded btn-sm"
                                           onclick="$.table.search('formId')"><i
                                                class="fa fa-search"></i>&nbsp;搜索</a>
                                        <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('formId')"><i
                                                class="fa fa-refresh"></i>&nbsp;重置</a>
                                    </li>
                                </ul>
                            </div>
                        </form>
                    </div>
                    <div class="col-sm-12 select-table table-striped">
                        <table id="bootstrap-table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('business:inreport:edit')}]];
    var removeFlag = [[${@permission.hasPermi('business:inreport:remove')}]];
    var prefix = ctx + "business/inreport";

    /**
     * 表格初始化
     */
    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "入库记录报表",
            showSearch: false,
            showToggle: false,
            showRefresh: false,
            showColumns: true,
            // TODO
            columns: [
                {
                    field: 'wmsorderid',
                    title: '订单号',
                    sortable: true
                },
                {
                    field: 'goodsid',
                    title: '物料编号',
                    sortable: true
                },
                {
                    field: 'goodsname',
                    title: '物料描述',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return $.table.tooltip(value);
                    }
                },
                {
                    field: 'produclotid',
                    title: '生产批号',
                    sortable: true
                },
                {
                    field: 'shelfNum',
                    title: '数量',
                    sortable: true
                },
                {
                    field: 'productionDate',
                    title: '生产日期',
                    sortable: true
                },
                {
                    field: 'expirationDate',
                    title: '有效日期',
                    sortable: true
                },
                {
                    field: 'providerId',
                    title: '供应商编号',
                    sortable: true
                },
                {
                    field: 'wgh',
                    title: '重量',
                    sortable: true
                },
                {
                    field: 'locationId',
                    title: '库位',
                    sortable: true
                },
                {
                    field: 'instand',
                    title: '入库站台',
                    sortable: true
                },
                {
                    field: 'ctl',
                    title: '入库容器',
                    sortable: true
                },
                {
                    field: 'userName',
                    title: '操作人员',
                    sortable: true
                },
                {
                    field: 'createDate',
                    title: '创建日期',
                    sortable: true
                }
            ]
        };
        $.table.init(options);
    });

    /**
     * 状态说明
     */
    function stsDescribe() {
        // TODO
        $.modal.open(
            "状态说明",
            prefix + "/stsDescribe",
            500,
            400,
            null);
    }
</script>
</body>
</html>
<style>
    .inner_row_style {
        margin-left: 0px;
        margin-right: 0px;
        padding-top: 5px;
    }
</style>