Junjie
2023-05-20 ddee9db870db0459bb0dfbdd86987e86924f7eaa
src/main/webapp/static/wms/js/wrkMast/wrkMast.js
@@ -11,11 +11,13 @@
    var layDate = layui.laydate;
    var form = layui.form;
    $('#wrkNo').val(parent.wrkNo);
    // 数据渲染
    tableIns = table.render({
        elem: '#wrkMast',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl + '/wrkMast/list/auth',
        where: {wrk_no: parent.wrkNo},
        page: true,
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
@@ -24,16 +26,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: 85}
            , {field: 'wrkNo', align: 'center', title: '任务号', sort: true, width: 85}
            , {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 +74,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 +95,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) {
@@ -288,7 +292,7 @@
                // 弹层显示
                layer.open({
                    type: 2,
                    title: '工作档明细',
                    title: '任务档明细',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
@@ -299,7 +303,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 +316,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 +326,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 +340,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 +351,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 +364,7 @@
            //  空操作
            case 'takeNone':
                layer.confirm('任务发送空操作异常!是否。。。。。。。。?', {
                    title: '工作号:' + data.wrkNo,
                    title: '任务号:' + data.wrkNo,
                    shadeClose: true
                }, function () {
                });
@@ -393,6 +397,19 @@
                    }
                    , align: 'right' //右对齐弹出(v2.6.8 新增)
                    , style: 'box-shadow: 1px 1px 10px rgb(0 0 0 / 12%);' //设置额外样式
                });
                break;
            case 'commandShow'://查看指令
                wrkNo = data.wrkNo;
                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 +613,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: '转储请求编号'}