receiptHeaderHistory.html 12.1 KB
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">

<div class="container-div">
    <div class="row">
        <div class="col-sm-12 select-info">
            <ul id="myTab" class="nav nav-tabs">
                <li class="active"><a href="#tabHeader" data-toggle="tab">主表</a></li>
                <li><a href="#tabDetail" data-toggle="tab">明细</a></li>
            </ul>
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade in active" id="tabHeader">
                    <div class="col-sm-12 select-info">
                        <form id="receiptHeader-form">
                            <div class="select-list">
                                <ul>
                                    <li>
                                        入库单号:<input type="text" name="code"/>
                                    </li>
                                    <li>
                                        上游单号:<input type="text" name="referCode"/>
                                    </li>
                                    <li>
                                        <!--入库类型:<input type="text" name="sourceCode"/>-->
                                        入库类型:<select name="type" th:with="type=${@receiptTypeService.getType()}">
                                        <option value="">所有</option>
                                        <option th:each="e : ${type}" th:text="${e['name']}" th:value="${e['code']}"></option></select>
                                    </li>
                                    <li>
                                        <!--头 状 态:<input type="text" name="firstStatus"/>-->
                                        头 状 态:<select name="firstStatus" th:with="firstStatus=${@dict.getType('receiptHeaderStatus')}">
                                        <option value="">所有</option>
                                        <option th:each="e : ${firstStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select>
                                    </li>
                                    <li>
                                        <!--尾 状 态:<input type="text" name="lastStatus"/>-->
                                        尾 状 态:<select name="lastStatus" th:with="lastStatus=${@dict.getType('receiptHeaderStatus')}">
                                        <option value="">所有</option>
                                        <option th:each="e : ${lastStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select>
                                    </li>
                                    <li class="time">
                                        <label>创建时间: </label>
                                        <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>
                                        <span>-</span>
                                        <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/>
                                    </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('receiptHeader-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                                        <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
                                    </li>
                                </ul>
                            </div>
                        </form>
                    </div>
                    <div class="btn-group hidden-xs" id="toolbar" role="group">
                        <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
                           shiro:hasPermission="receipt:receiptHeader:add">
                            <i class="fa fa-plus"></i> 新增
                        </a>
                        <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"
                           shiro:hasPermission="receipt:receiptHeader:remove">
                            <i class="fa fa-trash-o"></i> 删除
                        </a>
                    </div>
                    <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
                </div>

                <div class="tab-pane fade" id="tabDetail">
                    <table id="bootstrap-table1" data-mobile-responsive="true"
                           class="table table-bordered table-hover"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var prefix = ctx + "receipt/receiptHeaderHistory";
    var prefix1 = ctx + "receipt/receiptDetailHistory";
    var editFlag = [[${@permission.hasPermi('receipt:receiptHeader:edit')}]];
    var removeFlag = [[${@permission.hasPermi('receipt:receiptHeader:remove')}]];
    var receiptTypes = [[${@receiptTypeService.getType()}]];
    var receiptHeaderStatus = [[${@dict.getType('receiptHeaderStatus')}]];
    var printFlag = [[${@permission.hasPermi('receipt:receiptHeader:report')}]];
    var addFlag= [[${@permission.hasPermi('receipt:receiptHeader:add')}]];


    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            modalName: "入库历史",
            search: false,
            sortName: "id",
            sortOrder: "desc",
            columns: [{
                checkbox: true
            },
                {
                    field : 'id',
                    title : '入库单id'
                },
                {
                    field : 'code',
                    title : '入库单号'
                },
                {
                    field : 'referCode',
                    title : '关联单号'
                },
                {
                    field : 'referId',
                    title : '关联单号(内部号)'
                },
                {
                    field : 'referType',
                    title : '关联订单类型'
                },
                {
                    field : 'companyCode',
                    title : '货主编码',
                    visible:false
                },
                {
                    field : 'warehouseCode',
                    title : '仓库编码',
                    visible:false
                },
                {
                    field : 'receiptType',
                    title : '入库类型',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        $.each(receiptTypes, function(index, dict) {
                            if (dict.code == value) {
                                actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
                                return false;
                            }
                        });
                        return actions.join('');
                    }
                },
                {
                    field : 'scheduledArriveDate',
                    title : '预计到达日期'
                },
                {
                    field : 'actualArriveDate',
                    title : '实际到达日期'
                },
                {
                    field : 'startCheckinDatetime',
                    title : '开始收货日期'
                },
                {
                    field : 'endCheckinDatetime',
                    title : '结束收货日期'
                },
                {
                    field : 'recvDock',
                    title : '月台货位'
                },
                {
                    field : 'closedAt',
                    title : '关闭时间',
                    visible : false
                },
                {
                    field : 'closedBy',
                    title : '强制关闭用户',
                    visible :false
                },
                {
                    field : 'totalQty',
                    title : '总数量'
                },
                {
                    field : 'totalLines',
                    title : '总行数'
                },
                {
                    field : 'remark',
                    title : '备注',
                    visible : false
                },
                {
                    field : 'uploadStatus',
                    title : '上传状态',
                    visible:false
                },
                {
                    field : 'receiptNote',
                    title : '入库单备注',
                    visible:false
                },
                {
                    field : 'locked',
                    title : '锁定',
                    visible:false
                },
                {
                    field : 'lockedBy',
                    title : '锁定用户',
                    visible:false
                },
                {
                    field : 'firstStatus',
                    title : '头状态',
                    align: 'center',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(receiptHeaderStatus, value);
                    }
                },
                {
                    field : 'lastStatus',
                    title : '尾状态',
                    align: 'center',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(receiptHeaderStatus, value);
                    }
                },
                {
                    field : 'created',
                    title : '创建时间',
                    sortable:true,
                    visible:false
                },
                {
                    field : 'createdBy',
                    title : '创建用户',
                    visible:false
                },
                {
                    field : 'lastUpdated',
                    title : '最后修改时间',
                    sortable:true,
                    visible:false
                },
                {
                    field : 'lastUpdatedBy',
                    title : '更新用户',
                    visible:false
                },
                {
                    field : 'userDef1',
                    title : '自定义字段1',
                    visible: false
                },
                {
                    field : 'userDef2',
                    title : '自定义字段2',
                    visible: false
                },
                {
                    field : 'userDef3',
                    title : '自定义字段3' ,
                    visible: false
                }]
        };
        $.table.init(options);
    });

    function detail(id, code) {
        var url = prefix1+"/list/" + id;
        createtable(url);
    }

    function createtable(url) {
        $("#tabDetail").children().remove();
        $("#myTab li").removeClass("active");
        var height = $(document).height()-100 + 'px';
        var str = '<iframe class="huaheng_iframe" name="iframe" width="100%" height="' + height + '" src="' + url + '" frameborder="0" data-id="' + url + '" seamless></iframe>';
        $("#tabDetail").append(str);
        $(".tab-pane").removeClass("in active");
        $("#myTab li:eq(1)").addClass("active");
        $("#tabDetail").addClass("in active");
    }
</script>
</body>
</html>