野心家
2024-12-17 ec34bee74e62cd7aee25c8a207e183572d37454e
zy-asrs-wms/src/main/webapp/static/js/order/order.js
@@ -51,7 +51,7 @@
        limits: [16, 30, 50, 100, 200, 500],
        cols: [[
            {type: 'numbers'},
            {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'},
            {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl',sort:true},
            {field: 'docType$', align: 'center', title: '类型',  minWidth: 160, width: 160},
            {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160},
            {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200},
@@ -104,6 +104,8 @@
            showWrkTrace(data.id);
        } else if (layEvent === 'del') {
            doDel(data.id);
        } else if (layEvent === 'dy') {
            doDy(data.id);
        } else if (layEvent === 'complete') {
            doModify(data.id, 4);
        } else if (layEvent === 'cancel') {
@@ -159,7 +161,7 @@
                        cellMinWidth: 100,
                        cols: [[
                            {type: 'numbers'},
                            {field: 'matnr', title: '商品编码', width: 160},
                            {field: 'matnr', title: '品号', width: 160},
                            {field: 'maktx', title: '商品名称', width: 160},
                            {field: 'batch', title: '序列码'},
                            {field: 'anfme', title: '数量'},
@@ -311,8 +313,8 @@
                    cellMinWidth: 100,
                    cols: [[
                        {type: 'numbers', title: '#'},
                        {field: 'matnr', title: '商品编码', width: 160},
                        {field: 'maktx', title: '商品名称', width: 200},
                        {field: 'matnr', title: '品号', width: 160},
                        {field: 'maktx', title: '名称', width: 200},
                        {field: 'batch', title: '序列码', edit: true},
                        {field: 'specs', title: '规格'},
                        {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
@@ -503,6 +505,40 @@
        });
    }
    // 打印
    function doDy(orderId) {
        layer.confirm('确定要打印吗?', {
            shade: .1,
            skin: 'layui-layer-admin'
        }, function (i) {
            layer.close(i);
            layer.load(2);
            $.ajax({
                url: baseUrl+"/order/dy",
                headers: {'token': localStorage.getItem('token')},
                data: {
                    orderId: orderId
                },
                method: 'POST',
                success: function (res) {
                    layer.closeAll('loading');
                    if (res.code === 200){
                        if (insTbCount === 0) {
                            insTb.reload({page: {curr: 1}});
                        } else {
                            $(".layui-laypage-btn")[0].click();
                        }
                        layer.msg(res.msg, {icon: 1});
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 修改订单状态
    function doModify(orderId, settle) {