自动化立体仓库 - WMS系统
#
lsh
2025-04-14 0f4540b504204b36f854c41cc2e89bb34af60211
src/main/webapp/static/js/stoMan/stoQue.js
@@ -7,33 +7,55 @@
    var layDate = layui.laydate;
    var form = layui.form;
    layDate.render({
        elem: '.layui-laydate-range'
        ,type: 'datetime'
        ,range: true
    });
    // 数据渲染
    tableIns = table.render({
        elem: '#stoQue',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/locMast/list/auth',
        page: true,
        limit: 10,
        limit: 20,
        limits: [20, 30, 50, 100, 200, 500],
        even: true,
        toolbar: '#toolbar',
        cellMinWidth: 50,
        cols: [[
            {type: 'checkbox'}
            ,{field: 'locNo', align: 'center',title: '库位号',event: 'locDetl'}
            ,{field: 'locType$', align: 'center',title: '库位状态', width: 180,event: 'locDetl'}
            ,{field: 'whsType$', align: 'center',title: '库位类型',event: 'locDetl'}
            ,{field: 'crnNo', align: 'center',title: '堆垛机号',event: 'locDetl'}
            ,{field: 'row1', align: 'center',title: '排',event: 'locDetl'}
            ,{field: 'bay1', align: 'center',title: '列',event: 'locDetl'}
            ,{field: 'lev1', align: 'center',title: '层',event: 'locDetl'}
            ,{field: 'fullPlt', align: 'center',title: '满板',event: 'locDetl', templet:function(row){
            ,{field: 'locNo', align: 'center',title: '库位号', hide:false}
            ,{field: 'locSts$', align: 'center',title: '库位状态', width: 180, style: 'color: #8E2323', hide:false}
            ,{field: 'whsType$', align: 'center',title: '库位类型', width: 180, style: 'color: #8E2323', hide:false}
            ,{field: 'frozen$', align: 'center',title: '冻结状态',
                templet: function(d) {
                    // 根据条件判断字体颜色
                    if (d.frozen$ === '已冻结') {
                        return '<span style="color: #34a8de;">' +d.frozen$ + '</span>';
                    } else {
                        return '<span">' +d.frozen$ + '</span>';
                    }
                }}
            ,{field: 'frozenMemo', align: 'center',title: '冻结原因'}
            ,{field: 'crnNo', align: 'center',title: '堆垛机号', sort:true, hide:false}
            ,{field: 'row1', align: 'center',title: '排', sort:true, hide:true}
            ,{field: 'bay1', align: 'center',title: '列', sort:true, hide:true}
            ,{field: 'lev1', align: 'center',title: '层', sort:true, hide:true}
            ,{field: 'gro1', align: 'center',title: '组', sort:true, hide:true}
            ,{field: 'fullPlt', align: 'center',title: '满板', templet:function(row){
                    var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'";
                    if(row.fullPlt === 'Y'){html += " checked ";}
                    html += "disabled='disabled' >";
                    return html;
                },width:80}
            ,{field: 'modiUser$', align: 'center',title: '修改人员',event: 'locDetl'}
            ,{field: 'modiTime$', align: 'center',title: '修改时间', width: 180,event: 'locDetl'}
            ,{field: 'barcode', align: 'center',title: '条码号', hide:false}
            ,{field: 'locType1$', align: 'center',title: '高低类型', hide:true}
            ,{field: 'locType2$', align: 'center',title: '宽窄类型', hide:true}
            ,{field: 'locType3$', align: 'center',title: '轻重类型', hide:true}
            ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true}
            ,{field: 'modiTime$', align: 'center',title: '修改时间', width: 180, hide:false}
            ,{ fixed: 'right', title:'操作', align: 'center', toolbar: '#operate'}
        ]],
        request: {
@@ -53,7 +75,7 @@
        },
        done: function(res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl;
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
@@ -86,7 +108,7 @@
            },
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl;
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                limit();
@@ -103,7 +125,7 @@
                alert("还没做");
                break;
            case 'exportData':
                layer.confirm('确定导出Excel吗', function(){
                layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
@@ -132,7 +154,7 @@
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                            } else if (res.code === 403) {
                                top.location.href = baseUrl;
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg)
                            }
@@ -150,10 +172,10 @@
            // 查看明细
            case 'locDetl':
                // locDetl(data.locNo);
                if (data.locType.trim() === ''
                    || data.locType.trim() === 'S'
                    || data.locType.trim() === 'D'
                    || data.locType.trim() === 'O')  {
                if (data.locSts.trim() === ''
                    || data.locSts.trim() === 'S'
                    || data.locSts.trim() === 'D'
                    || data.locSts.trim() === 'O')  {
                    layer.msg("此库位的状态不存在物料");
                    return;
                }
@@ -167,7 +189,7 @@
        locNo = val;
        layer.open({
            type: 2,
            title: '工作档明细',
            title: '库存明细',
            maxmin: true,
            area: [top.detailWidth, top.detailHeight],
            shadeClose: true,
@@ -223,7 +245,7 @@
            },
            done: function(res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl;
                    top.location.href = baseUrl+"/";
                }
                pageCur=curr;
                form.on('checkbox(tableCheckbox)', function (data) {
@@ -265,7 +287,7 @@
            },
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl;
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                if (count === 1){