王佳豪
2021-07-13 0ac8fe78532fa2decaeed4a9e3b6715ccc271e90
1.出库作业支持捡料出库
3个文件已修改
92 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/pakStore/stockOut.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pakStore/locDetlQuery.html 82 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -285,6 +285,13 @@
            }
            // 生成工作档明细
            for (LocDetlDto detlDto : dto.getLocDetlDtos()) {
                // 如果为捡料出库需要判断托盘码是否为空
                if (ioType == 103) {
                    String zpallet = detlDto.getLocDetl().getZpallet();
                    if (Cools.isEmpty(zpallet)) {
                        throw new CoolException("拣料出库必须含有托盘码");
                    }
                }
                // 出库时,数量为0的直接忽略
                if (detlDto.getCount() == null || detlDto.getCount() <= 0.0D) {
                    continue;
src/main/webapp/static/js/pakStore/stockOut.js
@@ -3,7 +3,7 @@
function getCol() {
    var cols = [
        // {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
        {field: 'anfme', align: 'center',title: '数量'}
        {field: 'anfme', align: 'center',title: '数量', edit: 'text', style: 'color: blue;font-weight: bold'}
        ,{field: 'locNo$', align: 'center',title: '库位号'}
    ];
    arrRemove(detlCols,  'field', 'anfme');
@@ -106,6 +106,7 @@
                        if (count > locDetlData[i]["anfme"]) {
                            layer.msg("不能超过原数量");
                        } else {
                            locDetlData[i]["anfme"] = count;
                            locDetlData[i]["count"] = count;
                        }
                        break;
src/main/webapp/views/pakStore/locDetlQuery.html
@@ -51,39 +51,18 @@
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="matnr" placeholder="物料号"  autocomplete="off">
                <input class="layui-input" type="text" name="matnr" placeholder="商品编号"  autocomplete="off">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="maktx" placeholder="物料名称" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="type" placeholder="物料类别" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="lgnum" placeholder="规格" autocomplete="off">
                <input class="layui-input" type="text" name="maktx" placeholder="物料描述" autocomplete="off">
            </div>
        </div>
        <!-- 日期范围 -->
        <div class="layui-inline" style="width: 300px;">
        <div class="layui-inline" style="width: 300px">
            <div class="layui-input-inline">
                <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px">
            </div>
        </div>
        <br />
        <div class="layui-inline" style="margin-left: 30px">
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="supplier" placeholder="通知单号" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="mnemonic" placeholder="生产单号" autocomplete="off">
            </div>
        </div>
        <!-- 待添加 -->
@@ -162,8 +141,14 @@
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                $('.layui-form-checkbox').css("pointer-events", "none");
                $('td[data-field="0').css("cursor", "pointer")
                form.on('checkbox(tableCheckbox)', function (data) {
                    var _index = $(data.elem).attr('table-index')||0;
                    if(data.elem.checked){
                        res.data[_index][data.value] = 'Y';
                    }else{
                        res.data[_index][data.value] = 'N';
                    }
                });
            }
        });
@@ -177,26 +162,6 @@
                        layer.msg("请选择数据");
                        return;
                    }
                    var locNos = [];
                    data.forEach(function(elem) {
                        locNos.push(elem.locNo);
                    });
                    $.ajax({
                        url: baseUrl+"/locDetl/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: {locNos:locNos},
                        method: 'POST',
                        async: false,
                        success: function (res) {
                            if (res.code === 200) {
                                data = res.data;
                            } else if (res.code === 403) {
                                top.location.href = baseUrl + "/";
                            } else {
                                layer.msg(res.msg)
                            }
                        }
                    })
                    parent.addTableData(data);
                    break;
            }
@@ -222,20 +187,6 @@
        });
    })
    var b = true;
    $(function(){
        $(document.body).on('click','td[data-field="0"]',function(){
            var locNo = $(this).next().children("div").html();
            if (b) {
                b = false;
                $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click();
                setTimeout(function () {
                    b = true;
                }, 200)
            }
        });
    })
    function tableReload(child) {
        var searchData = {};
        $.each($('#search-box [name]').serializeArray(), function() {
@@ -251,8 +202,15 @@
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                $('.layui-form-checkbox').css("pointer-events", "none");
                $('td[data-field="0').css("cursor", "pointer")
                if (res.data.length === 0 && count !== 0) {
                    locDetlTableIns.reload({
                        where: searchData,
                        page: {
                            curr: pageCurr-1
                        }
                    });
                    pageCurr -= 1;
                }
            }
        });
    }