自动化立体仓库 - WMS系统
skyouc
2 天以前 644b6194f8e5bfbe8d4c431eb53e6b3d36026351
src/main/webapp/static/js/locCache/locCache.js
@@ -23,13 +23,11 @@
        cols: [[{type: 'checkbox'}, {field: 'locNo', align: 'center', title: '库位号', width: 120}
            , {field: 'barcode', align: 'center', title: '托盘码'}
            , {field: 'areaName', align: 'center', title: '库区名称'}
            // , {field: 'whsType$', align: 'center', title: '库位类型'}
            , {field: 'locSts', align: 'center', title: '库位状态'}
            , {field: 'locSts$', align: 'center', title: '库位状态'}
            , {field: 'row1', align: 'center', title: '排'}
            , {field: 'bay1', align: 'center', title: '列'}
            , {field: 'lev1', align: 'center', title: '层'}
            // , {field: 'locType', align: 'center', title: '库位类型'}
            , {field: 'sort', align: 'center', title: '优先级'}
            , {field: 'sort', align: 'center', title: '优先级', sort: true}
            , {field: 'modiUser$', align: 'center', title: '修改人员'}
            , {field: 'modiTime$', align: 'center', title: '修改时间'}
            , {field: 'appeUser$', align: 'center', title: '创建者'}
@@ -38,6 +36,8 @@
            , {field: 'frozenMemo', align: 'center', title: '冻结备注', hide: true}
            , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 160}]
        ],
        request: {
            pageName: 'curr', pageSize: 'limit'
        },
@@ -151,7 +151,6 @@
    // 初始化保存
    form.on('submit(initDo)', function (data) {
        console.log(data.field)
        $.ajax({
            url: baseUrl + "/locCache/init/auth",
            headers: {'token': localStorage.getItem('token')},
@@ -172,6 +171,49 @@
        })
    });
    // 修改优先级
    form.on('submit(updateProi)', function (data) {
        var checkStatus = table.checkStatus('locCache').data;
        if (checkStatus.length === 0) {
            layer.msg('请选择需要修改的数据信息', {icon: 2});
            return false;
        }
        var sortVal = data.field.identifying;
        var loadIndex = layer.load(2);
        var promises = checkStatus.map(function (item) {
            return new Promise(function (resolve, reject) {
                $.ajax({
                    url: baseUrl + "/locCache/update/auth",
                    headers: {'token': localStorage.getItem('token')},
                    data: {
                        id: item.id,
                        locNo: item.locNo,
                        sort: sortVal
                    },
                    method: 'POST',
                    success: function (res) {
                        if (res.code === 200) resolve(res);
                        else reject(res);
                    },
                    error: function (err) {
                        reject(err);
                    }
                });
            });
        });
        Promise.all(promises).then(function () {
            layer.close(loadIndex);
            layer.closeAll();
            layer.msg("修改成功");
            tableReload(false);
        }).catch(function (err) {
            layer.close(loadIndex);
            layer.msg("修改失败: " + (err.msg || "未知错误"));
        });
        return false;
    });
    function batchModifies() {
        layer.open({
            type: 1,