自动化立体仓库 - WMS系统
whycq
2024-11-25 bcb19e8c93c3cabf0d8eb3ee34ed819b3c5a10ef
src/main/webapp/static/js/orderTable.js
@@ -1,19 +1,21 @@
var insTb;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"  // 配置模块所在的目录
}).use(['table','laydate', 'form',  'admin'], function() {
}).use(['table','laydate', 'form',  'admin', 'tableX'], function() {
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var admin = layui.admin;
    var tableX = layui.tableX;
    /****************************************** 左边表 *************************************************/
    var insTb = table.render({
    insTb = table.render({
        elem: '#originTable',
        url: baseUrl + '/order/nav/list/auth',
        height: 'full-100',
        height: 'full-120',
        headers: {token: localStorage.getItem('token')},
        request: {
            pageName: 'curr',
@@ -37,13 +39,27 @@
        //     '</p>'].join(''),
        defaultToolbar: [],
        cols: [[
            // {type: 'number', title: '#'},
            {field: 'orderTime', title: '日期'},
            {type: 'checkbox'},
            {field: 'createTime$', title: '日期'},
            {field: 'orderNo', title: '单据编号', align: 'center'}
        ]],
        done: function (res, curr, count) {
            console.log(res)
            $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
            // 绑定鼠标右键
            tableX.bindCtxMenu('originTable', function (d) {
                return [
                    {
                        icon: 'layui-icon layui-icon-ok',
                        name: '一键出库',
                        click: function (d) {
                            autoOut(d.id);
                        }
                    }
                ]
            })
        }
    });
@@ -56,7 +72,7 @@
    /* 表格重置 */
    form.on('submit(originTbReset)', function (data) {
        insTb.reload({where: null});
        insTb2.reload({where: {host_id: null}, page: {curr: 1}});
        insTb2.reload({where: null, page: {curr: 1}});
        return false;
    });