自动化立体仓库 - WMS系统
mrzhssss
2022-05-27 c6ab1a516d8398de65512fcd380d89e46ec8e430
src/main/webapp/static/js/order/out.js
@@ -32,7 +32,7 @@
            ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160}
            ,{field: 'matnr', align: 'center',title: '商品编码', width: 160}
            ,{field: 'maktx', align: 'center',title: '商品名称', width: 200}
            ,{field: 'batch', align: 'center',title: '批号'}
            ,{field: 'batch', align: 'center',title: '序列码'}
            ,{field: 'specs', align: 'center',title: '规格'}
            // ,{field: 'anfme', align: 'center',title: '数量'}
            // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
@@ -135,7 +135,7 @@
                        ,title: false
                        ,closeBtn: false
                        ,offset: '100px'
                        ,area: '1200px'
                        ,area: ['1200px', '700px']
                        ,shade: 0.5
                        ,shadeClose: true
                        ,btn: ['立即出库', '稍后处理']
@@ -146,7 +146,7 @@
                            table.render({
                                elem: '#stoPreTab',
                                data: res.data,
                                height: 450,
                                height: 520,
                                page: false,
                                limit: Number.MAX_VALUE,
                                cellMinWidth: 100,
@@ -154,7 +154,7 @@
                                    // {type: 'checkbox', merge: ['orderNo']},
                                    {field: 'orderNo', title: '单据编号', merge: true, align: 'center'},
                                    {field: 'title', title: '商品', merge: true, align: 'center', width: 350},
                                    {field: 'batch', title: '批号', align: 'center'},
                                    {field: 'batch', title: '序列码', align: 'center'},
                                    {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'},
                                    {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
@@ -166,13 +166,36 @@
                                    tableCache = tableData = table.cache.stoPreTab;
                                }
                            });
                            // 修改出库站
                            form.on('select(tbBasicTbStaNos)', function (obj) {
                                let index  = obj.othis.parents('tr').attr("data-index");
                                let data = tableCache[index];
                                data['staNo'] = Number(obj.elem.value);
                                for (let i = 0; i<tableCache.length; i++) {
                                    if (tableCache[i].locNo === data.locNo) {
                                        tableCache[i]['staNo'] = Number(obj.elem.value);
                                    }
                                }
                                // data['staNo'] = Number(obj.elem.value);
                                obj.othis.children().find("input").css("color", "blue");
                                return false;
                            });
                            // 批量修改出库站
                            form.on('submit(batchModifySta)', function () {
                                let stoPreTabData = layui.table.checkStatus('stoPreTab').data;
                                console.log(stoPreTabData)
                                if (stoPreTabData.length < 1) {
                                    layer.msg("请至少选择一条以上合并数据", {icon: 7});
                                    return false;
                                }
                                modifySta(stoPreTabData.map(function (d) {
                                    return d.id;
                                }));
                            });
                            // 批量修改出库站 - 站点选择
                            function modifySta(data) {
                            }
                        }
                        ,yes: function(index, layero){
                            //按钮【立即出库】的回调