1
zhang
2025-06-30 8d5c70aef9cbacbcc412d73c4b730e21f94e6514
src/main/webapp/static/wms/js/wrkMast/wrkMast.js
@@ -1,5 +1,7 @@
var pageCurr;
var wrkNo;
var wmsWrkNo;
var ioTime;
layui.config({
    base: baseUrl + "/static/wms/layui/lay/modules/"
}).extend({
@@ -11,11 +13,14 @@
    var layDate = layui.laydate;
    var form = layui.form;
    $('#wrkNo').val(parent.wrkNo);
    $('#wmsWrkNo').val(parent.wmsWrkNo);
    // 数据渲染
    tableIns = table.render({
        elem: '#wrkMast',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl + '/wrkMast/list/auth',
        where: {wrk_no: parent.wrkNo, wms_wrk_no: parent.wmsWrkNo},
        page: true,
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
@@ -24,16 +29,18 @@
        cellMinWidth: 50,
        cols: [[
            {type: 'checkbox'}
            , {field: 'wrkNo', align: 'center', title: '工作号', sort: true, width: 85}
            , {field: 'ioTime$', align: 'center', title: '工作时间', sort: true, width: 160}
            , {field: 'wrkSts$', align: 'center', title: '工作状态'}
            , {field: 'ioType$', align: 'center', title: '入出库类型'}
            , {field: 'wmsWrkNo', align: 'center', title: 'WMS任务号', sort: true, width: 120}
            , {field: 'wrkNo', align: 'center', title: '任务号', sort: true, width: 120}
            , {field: 'ioTime$', align: 'center', title: '任务时间', sort: true, width: 160}
            , {field: 'durationTime', align: 'center', title: '持续时长', width: 160}
            , {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: 'sourceLocNo$', align: 'center', title: '源库位'}
            , {field: 'locNo$', align: 'center', title: '目标库位'}
            , {field: 'sourceLocNo$', align: 'center', title: '起始点'}
            , {field: 'locNo$', align: 'center', title: '目标点'}
            , {field: 'barcode', align: 'center', title: '条码'}
            , {field: 'preHave', align: 'center', title: '先入品', hide: true}
            , {field: 'takeNone', align: 'center', title: '空操作', hide: true}
@@ -70,7 +77,7 @@
            //         return html;
            //     }}
            , {fixed: 'right', title: '操作', align: 'left', toolbar: '#operate', width: 120}
            , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 110}
        ]],
        request: {
            pageName: 'curr',
@@ -91,7 +98,7 @@
            if (res.code === 403) {
                top.location.href = baseUrl + "/";
            }
            $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow','visible');
            $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow', 'visible');//解决layui数据表格中嵌套下拉框显示问题
            pageCurr = curr;
            limit();
            form.on('checkbox(tableCheckbox)', function (data) {
@@ -283,12 +290,13 @@
            // 明细展示
            case 'detlShow':
                wrkNo = data.wrkNo;
                ioTime =  data.ioTime;
                // 表格下方显示
                // locDetl(data.wrkNo);
                // 弹层显示
                layer.open({
                    type: 2,
                    title: '工作档明细',
                    title: '任务档明细',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
@@ -299,7 +307,7 @@
                break;
            // 完成
            case 'complete':
                layer.confirm('确认完成该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () {
                layer.confirm('确认完成该笔任务档?', {title: '任务号:' + data.wrkNo, shadeClose: true}, function () {
                    http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 1}, function (res) {
                        $(".layui-laypage-btn")[0].click();
                        layer.msg(data.wrkNo + res.msg);
@@ -312,7 +320,7 @@
            case 'cancel':
                if (data.pdcType === "Y") {
                    layer.confirm('当前任务关联ERP销售单,取消将重新生成出库作业,是否继续?', {
                        title: '工作号:' + data.wrkNo,
                        title: '任务号:' + data.wrkNo,
                        shadeClose: true
                    }, function () {
                        http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) {
@@ -322,8 +330,8 @@
                        layer.closeAll();
                    });
                } else {
                    layer.confirm('确认取消该笔工作档?', {
                        title: '工作号:' + data.wrkNo,
                    layer.confirm('确认取消该笔任务档?', {
                        title: '任务号:' + data.wrkNo,
                        shadeClose: true
                    }, function () {
                        http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) {
@@ -336,7 +344,7 @@
                break;
            //  拣料入库
            case 'pick':
                layer.confirm('拣料入库该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () {
                layer.confirm('拣料入库该笔任务档?', {title: '任务号:' + data.wrkNo, shadeClose: true}, function () {
                    http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 3}, function (res) {
                        $(".layui-laypage-btn")[0].click();
                        layer.msg(data.wrkNo + res.msg);
@@ -347,7 +355,7 @@
            //  先入品
            case 'preHave':
                layer.confirm('任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!', {
                    title: '工作号:' + data.wrkNo,
                    title: '任务号:' + data.wrkNo,
                    shadeClose: true
                }, function () {
                    http.post(baseUrl + "/deal/preHave/start", {wrkNo: data.wrkNo}, function (res) {
@@ -360,7 +368,7 @@
            //  空操作
            case 'takeNone':
                layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {
                    title: '工作号:' + data.wrkNo,
                    title: '任务号:' + data.wrkNo,
                    shadeClose: true
                }, function () {
                });
@@ -393,6 +401,20 @@
                    }
                    , align: 'right' //右对齐弹出(v2.6.8 新增)
                    , style: 'box-shadow: 1px 1px 10px rgb(0 0 0 / 12%);' //设置额外样式
                });
                break;
            case 'commandShow'://查看指令
                wrkNo = data.wrkNo;
                wmsWrkNo = data.wmsWrkNo;
                layer.open({
                    type: 2,
                    title: 'WMS任务指令',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
                    content: '../commandManage/commandManage.html',
                    success: function (layero, index) {
                    }
                });
                break;
        }
@@ -596,8 +618,8 @@
            cellMinWidth: 50,
            cols: [[
                {type: 'checkbox'}
                , {field: 'wrkNo', align: 'center', title: '工作号'}
                , {field: 'ioTime$', align: 'center', title: '工作时间'}
                , {field: 'wrkNo', align: 'center', title: '任务号'}
                , {field: 'ioTime$', align: 'center', title: '任务时间'}
                , {field: 'matnr', align: 'center', title: '物料'}
                , {field: 'lgnum', align: 'center', title: '仓库号'}
                , {field: 'tbnum', align: 'center', title: '转储请求编号'}