自动化立体仓库 - WMS系统
zhangchao
2024-11-04 c28e6101a5e42a9cdcc51ef6b69599ea15fe2af9
src/main/webapp/static/js/wrkMast/wrkMast.js
@@ -1,6 +1,10 @@
var pageCurr;
var wrkNo;
layui.use(['table','laydate', 'form'], function(){
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).extend({
    dropdown: 'dropdown/dropdown',
}).use(['table', 'laydate', 'form', 'dropdown'], function () {
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
@@ -25,12 +29,14 @@
            ,{field: 'wrkSts$', align: 'center',title: '工作状态'}
            ,{field: 'ioType$', align: 'center',title: '入出库类型'}
            ,{field: 'ioPri', align: 'center',title: '优先级'}
            ,{field: 'crnNo$', align: 'center',title: '堆垛机'}
            ,{field: 'sourceStaNo$', align: 'center',title: '源站'}
            ,{field: 'staNo$', align: 'center',title: '目标站'}
            // ,{field: 'crnNo$', align: 'center',title: '堆垛机'}
            ,{field: 'sourceStaNo', align: 'center',title: '源站'}
            ,{field: 'staNo', align: 'center',title: '目标站'}
            ,{field: 'sourceLocNo$', align: 'center',title: '源库位'}
            ,{field: 'locNo$', align: 'center',title: '目标库位'}
            ,{field: 'barcode', align: 'center',title: '条码'}
            ,{field: 'shuttleNo', align: 'center',title: '小车', width: 70}
            ,{field: 'liftNo', align: 'center',title: '提升机号'}
            ,{field: 'barcode', align: 'center',title: '条码', hide: false}
            ,{field: 'preHave', align: 'center',title: '先入品', hide: true}
            ,{field: 'takeNone', align: 'center',title: '空操作', hide: true}
            // ,{field: 'picking', align: 'center',title: '拣料', templet:function(row){
@@ -66,7 +72,7 @@
            //         return html;
            //     }}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:250}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:290}
        ]],
        request: {
            pageName: 'curr',
@@ -87,6 +93,7 @@
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow', 'visible');//解决layui数据表格中嵌套下拉框显示问题
            pageCurr=curr;
            limit();
            form.on('checkbox(tableCheckbox)', function (data) {
@@ -132,6 +139,7 @@
                var list=[];
                checkStatus.data.map(function (track) {
                    list.push({
                        wrkNo: track.wrkNo,
                        ioTime: track.ioTime,
                        ioPri: track.ioPri
@@ -197,7 +205,7 @@
                    content: 'wrkMast_detail.html',
                    success: function(layero, index){
                        layer.getChildFrame('#data-detail-submit-edit', index).hide();
                       clearFormVal(layer.getChildFrame('#detail', index));
                        clearFormVal(layer.getChildFrame('#detail', index));
                        layer.getChildFrame('##dealDownLine', index).hide();layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                    }
                });
@@ -331,19 +339,52 @@
                    layer.closeAll();
                });
                break;
            //  先入品
            case 'preHave':
                layer.confirm('任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
                    http.post(baseUrl+"/deal/preHave/start", {wrkNo: data.wrkNo}, function (res) {
                        $(".layui-laypage-btn")[0].click();
                        layer.msg(data.wrkNo + res.msg, {icon: 1});
                    })
                    layer.closeAll();
            case 'priWrkMast':
                layer.open({
                    type: 2,
                    title: '维护工作档',
                    maxmin: true,
                    area: ['500px', top.detailHeight],
                    shadeClose: false,
                    content: 'wrkMast_detail.html',
                    success: function(layero, index){
                        layer.getChildFrame('#data-detail-submit-save', index).hide();
                        setFormVal(layer.getChildFrame('#detail', index), data, false);
                        top.convertDisabled(layer.getChildFrame('#locNo', index), true);
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                    }
                });
                break;
            //  空操作
            case 'takeNone':
                layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){
            //穿梭车指令
            case 'shuttleCommand':
                wrkNo = data.wrkNo;
                layer.open({
                    type: 2,
                    title: '穿梭车指令',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
                    content: '../command/shuttleCommand.html',
                    success: function (layero, index) {
                    }
                });
                break;
            //提升机指令
            case 'liftCommand':
                wrkNo = data.wrkNo;
                layer.open({
                    type: 2,
                    title: '提升机指令',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
                    content: '../command/liftCommand.html',
                    success: function (layero, index) {
                    }
                });
                break;
        }
@@ -616,6 +657,7 @@
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow', 'visible');//解决layui数据表格中嵌套下拉框显示问题
            pageCurr=curr;
            if (res.data.length === 0 && count !== 0) {
                tableIns.reload({