<!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>
                                <input type="text" name="fdate"/>
                            </li>
                            <li>
                                <label>调拨单号：</label>
                                <input type="text" name="fbillNo"/>
                            </li>
                            <li>
                                <label>单据类型：</label>
                                <input type="text" name="fbillTypeID"/>
                            </li>
                            <li>
                                <label>调入货主类型：</label>
                                <input type="text" name="fownerTypeIdHead"/>
                            </li>
                            <li>
                                <label>调入货主：</label>
                                <input type="text" name="fownerIdHead"/>
                            </li>
                            <li>
                                <label>调出货主类型：</label>
                                <input type="text" name="fownerTypeOutIdHead"/>
                            </li>
                            <li>
                                <label>调出货主：</label>
                                <input type="text" name="fownerOutIdHead"/>
                            </li>
                            <li>
                                <label>调拨方向：</label>
                                <input type="text" name="ftransferDirect"/>
                            </li>
                            <li>
                                <label>物料编码：</label>
                                <input type="text" name="fmaterialId"/>
                            </li>
                            <li>
                                <label>物料名称：</label>
                                <input type="text" name="fmaterialName"/>
                            </li>
                            <li>
                                <label>调出仓库：</label>
                                <input type="text" name="fsrcStockId"/>
                            </li>
                            <li>
                                <label>调入仓库：</label>
                                <input type="text" name="fdestStockId"/>
                            </li>
                            <li>
                                <label>单位：</label>
                                <input type="text" name="funitID"/>
                            </li>
                            <li>
                                <label>数量：</label>
                                <input type="text" name="fqty"/>
                            </li>
                            <li>
                                <label>成本：</label>
                                <input type="text" name="fprice"/>
                            </li>
                            <li>
                                <label>同步状态  0成功   -1 失败：</label>
                                <input type="text" name="sendFlag"/>
                            </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>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:TransferDirect:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:TransferDirect:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:TransferDirect:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:TransferDirect:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:TransferDirect:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:TransferDirect:remove')}]];
        var prefix = ctx + "system/TransferDirect";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "金蝶直接调拨单",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '流水id',
                    visible: false
                },
                {
                    field: 'fDate',
                    title: '日期'
                },
                {
                    field: 'fbillNo',
                    title: '调拨单号'
                },
                {
                    field: 'fbillTypeID',
                    title: '单据类型'
                },
                {
                    field: 'fownerTypeIdHead',
                    title: '调入货主类型'
                },
                {
                    field: 'fownerIdHead',
                    title: '调入货主'
                },
                {
                    field: 'fownerTypeOutIdHead',
                    title: '调出货主类型'
                },
                {
                    field: 'fownerOutIdHead',
                    title: '调出货主'
                },
                {
                    field: 'ftransferDirect',
                    title: '调拨方向'
                },
                {
                    field: 'fmaterialId',
                    title: '物料编码'
                },
                {
                    field: 'fmaterialName',
                    title: '物料名称'
                },
                {
                    field: 'fsrcStockId',
                    title: '调出仓库'
                },
                {
                    field: 'fdestStockId',
                    title: '调入仓库'
                },
                {
                    field: 'funitID',
                    title: '单位'
                },
                {
                    field: 'fqty',
                    title: '数量'
                },
                {
                    field: 'fprice',
                    title: '成本'
                },
                {
                    field: 'sendFlag',
                    title: '同步状态  0成功   -1 失败'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>
