自动化立体仓库 - WMS系统
#1
lsh
4 天以前 1ca8b748a3541b88b12b7e9e7f5f77a5c8df7fd2
src/main/webapp/static/js/order/order.js
@@ -43,6 +43,7 @@
        cols: [[
            {type: 'numbers'},
            {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'},
            {field: 'po', title: '单据编号', templet: '#orderNoTpl'},
            {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},
@@ -95,7 +96,9 @@
        } else if (layEvent === 'del') {
            doDel(data.id);
        } else if (layEvent === 'complete') {
            doModify(data.id, data.orderNo, 4);
            doModify(data.id, data.orderNo, 6);
        } else if (layEvent === 'continueExecution') {
            doModify99(data.id, data.orderNo, 99);
        } else if (layEvent === 'look') {
            var $a = $(obj.tr).find('a[lay-event="look"]');
            var offset = $a.offset();
@@ -122,12 +125,13 @@
                        cellMinWidth: 100,
                        cols: [[
                            {type: 'numbers'},
                            {field: 'matnr', title: '商品编码', width: 160},
                            {field: 'maktx', title: '商品名称', width: 160},
                            {field: 'batch', title: '批号'},
                            {field: 'anfme', title: '数量'},
                            {field: 'workQty', title: '作业数量'},
                            {field: 'qty', title: '完成数量', style: 'font-weight: bold'},
                            {field: 'matnr', title: 'sku', width: 160},
                            {field: 'maktx', title: '名称', width: 80},
                            {field: 'standby1', title: 'po'},
                            {field: 'standby2', title: 'upc'},
                            {field: 'anfme', title: '数量', width: 80},
                            {field: 'qty', title: '上报数量', style: 'font-weight: bold'},
                            {field: 'workQty', title: '历史上报数量'},
                            // {field: 'unit', title: '单位'},
                            // {
                            //     field: 'createTime$', title: '创建时间', sort: true, templet: function (d) {
@@ -135,8 +139,7 @@
                            //     },  width: 180
                            // },
                            // {field: 'inQty', title: '已入库量'},
                            // {field: 'color', title: '颜色'},
                            {field: 'specs', title: '规格'}
                            // {field: 'color', title: '颜色'}
                        ]],
                        request: {
                            pageName: 'curr',
@@ -234,10 +237,12 @@
                    cellMinWidth: 100,
                    cols: [[
                        {type: 'numbers', title: '#'},
                        {field: 'matnr', title: '商品编码', width: 160},
                        {field: 'maktx', title: '商品名称', width: 200},
                        {field: 'batch', title: '批号', edit: true},
                        {field: 'specs', title: '规格'},
                        {field: 'matnr', title: 'sku', width: 160},
                        {field: 'maktx', title: '名称', width: 80},
                        // {field: 'batch', title: '批号', edit: true},
                        // {field: 'specs', title: '规格'},
                        {field: 'standby1', title: 'po'},
                        {field: 'standby2', title: 'upc'},
                        {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
                        {field: 'workQty', title: '作业数量',  minWidth: 100, width: 100},
                        // {field: 'unit', title: '单位', width: 80},
@@ -439,7 +444,45 @@
    // 修改订单状态
    function doModify(orderId, orderNo, settle) {
        layer.confirm('确定要手动完结吗?', {
        layer.confirm('确定要彻底结束单据吗?(将转为历史档案)', {
            shade: .1,
            skin: 'layui-layer-admin'
        }, function (i) {
            layer.close(i);
            layer.load(2);
            console.log(orderId);
            console.log(settle);
            $.ajax({
                url: baseUrl+"/order/update/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {
                    id: orderId,
                    orderNo: orderNo,
                    settle: settle
                },
                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 doModify99(orderId, orderNo, settle) {
        layer.confirm('确定要继续执行吗?(会将未执行数量重新生成执行单据)', {
            shade: .1,
            skin: 'layui-layer-admin'
        }, function (i) {
@@ -501,7 +544,7 @@
                                var traceCharts = echarts.init(document.getElementById('wrkTraceCharts'));
                                var traceOptions = {
                                    title: {
                                        text: '作业/总量', x: 'center', y: '38%',
                                        text: '总量/待上报/已上报', x: 'center', y: '38%',
                                        textStyle: {fontSize: 18, color: '#262626', fontWeight: 'normal'},
                                        subtextStyle: {fontSize: 36, color: '#10B4E8'},
                                        itemGap: 20
@@ -514,13 +557,13 @@
                                // 赋值
                                traceCharts.setOption({
                                    title: {
                                        subtext: res.data.wrkQty+"/"+res.data.totalQty
                                        subtext: res.data.totalQty+"/"+res.data.endQty+"/"+res.data.wrkQty
                                    },
                                    series: [
                                        {
                                            data: [
                                                {name: '已作业', value: res.data.wrkQty},
                                                {name: '未作业', value: res.data.totalQty-res.data.wrkQty-res.data.lackQty},
                                                {name: '已作业', value: res.data.wrkQty+res.data.endQty},
                                                {name: '未作业', value: res.data.totalQty-res.data.wrkQty-res.data.endQty-res.data.lackQty},
                                                {name: '库存不足', value: res.data.lackQty},
                                            ]
                                        }