自动化立体仓库 - WMS系统
zjj
2025-02-12 d22f020305f8be78bbd255904d3cee1b06aab875
src/main/webapp/static/js/inventoryCheckOrder/inventoryCheckOrder.js
@@ -30,15 +30,15 @@
        where: {order_id: 9999999999},
        cols: [[
            {type: 'checkbox'}
            ,{type: 'numbers', title: '#'}
            ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160}
            ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl'}
            ,{field: 'locNo', align: 'center',title: '库位'}
            ,{field: 'matnr', align: 'center',title: '商品编码', width: 160}
            ,{field: 'maktx', align: 'center',title: '商品名称', width: 200}
            ,{field: 'batch', align: 'center',title: '序列码'}
            ,{field: 'specs', align: 'center',title: '规格'}
            // ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'batch', align: 'center',title: '批次'}
            ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'checkAnfme', align: 'center',title: '盘点数量', style: 'font-weight: bold'}
            // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
            ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'}
            // ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'}
            // ,{field: 'name', align: 'center',title: '名称'}
            // ,{field: 'model', align: 'center',title: '型号'}
            ,{field: 'unit', align: 'center',title: '单位', hide: true}
@@ -48,13 +48,14 @@
            // ,{field: 'itemNum', align: 'center',title: '品项数'}
            // ,{field: 'count', align: 'center',title: '数量'}
            // ,{field: 'weight', align: 'center',title: '重量'}
            // ,{field: 'status$', align: 'center',title: '状态'}
            ,{field: 'profit$', align: 'center',title: '盈亏',templet: '#profitTpl'}
            ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            // ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            // ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            // ,{field: 'memo', align: 'center',title: '备注'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160}
            // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160}
        ]],
        request: {
            pageName: 'curr',
@@ -86,9 +87,52 @@
        return false;
    });
    // 显示弹框
    $('#showFormBtn').on('click', function () {
        // 弹框内容
        var content = `
                <form class="layui-form" id="billForm" style="padding: 20px;">
                    <div class="layui-form-item" style="margin-bottom: 20px;">
                        <label class="layui-form-label" style="width: 80px; font-size: 14px;">库区:</label>
                        <div class="layui-input-block" style="margin-left: 110px;">
                            <select id="warehouseArea" class="layui-input" style="width: 100%;">
                                <option value="堆垛机" selected>堆垛机</option>
                                <option value="四向库">四向库</option>
                                <option value="CTU">CTU</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item" style="text-align: right;">
                        <button type="button" class="layui-btn" id="saveBtn" style="display: inline-block; padding: 0px 20px; font-size: 16px; background-color: #5FB878; border-color: #5FB878; text-align: center;">保存</button>
                    </div>
                </form>
            `;
        // 弹框
        layer.open({
            type: 1,  // 使用 HTML 内容
            title: '添加盘点单',
            content: content,
            area: ['400px', '280px'],  // 弹框大小
            shadeClose: true,  // 点击遮罩关闭
            offset: '100px',
            success: function (layero, index) {
                form.render();
                // 点击保存按钮事件
                $('#saveBtn').on('click', function () {
                    var billNumber = $('#billNumber').val();
                    var warehouseArea = $('#warehouseArea').val();
                });
            }
        });
    });
    /* 表格2头工具栏点击事件 */
    table.on('toolbar(orderDetlTable)', function (obj) {
        // console.log(obj.config.where.order_id);
        var checkStatus = table.checkStatus(obj.config.id).data;
        if (obj.event === 'pakoutPreview') { // 添加
            if (checkStatus.length === 0) {
@@ -108,7 +152,31 @@
                return d.id;
            });
            doDelSensor({ids: ids});
        } else if (obj.event === 'submitERP') { // 提交erp
            $.ajax({
                url: baseUrl + "/mobile/checkOut/submit/auth",
                headers: {'token': localStorage.getItem('token')},
                // contentType: 'application/json;charset=UTF-8',
                data: {
                    orderId: obj.config.where.order_id
                },
                method: 'GET',
                success: function (res) {
                    notice.destroy();
                    if (res.code === 200) {
                        layer.msg(res.msg, {icon: 1});
                        insTb.reload({where: null});
                        insTb2.reload({where: null, page: {curr: 1}});
                    } else if (res.code === 403) {
                        top.location.href = baseUrl + "/";
                    } else {
                        layer.msg(res.msg, {icon: 2})
                    }
                }
            });
        }
    });
    /* 表格2工具条点击事件 */
@@ -126,7 +194,7 @@
    function pakoutPreview(ids) {
        let loadIndex = layer.load(2);
        $.ajax({
            url: baseUrl + "/out/pakout/preview/auth",
            url: baseUrl + "/out/pakout/preview/auth/sxk",
            headers: {'token': localStorage.getItem('token')},
            contentType: 'application/json;charset=UTF-8',
            data: JSON.stringify(ids),