自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-18 e4e8132629c4d8d9ea3ac585b3f22793be000fa5
#
3个文件已修改
45 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/pakStore/stockAdjust.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
@@ -16,17 +16,17 @@
    public static class LocDetlAdjust {
        // 物料号
        private String matNo;
        private String matnr;
        // 变更数量
        private Double count;
        public String getMatNo() {
            return matNo;
        public String getMatnr() {
            return matnr;
        }
        public void setMatNo(String matNo) {
            this.matNo = matNo;
        public void setMatnr(String matnr) {
            this.matnr = matnr;
        }
        public Double getCount() {
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -469,13 +469,19 @@
            throw new CoolException("库位不存在");
        }
        for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) {
            if (Cools.isEmpty(adjust.getMatnr())) {
                throw new CoolException(BaseRes.PARAM);
            }
            LocDetl sqlParam = new LocDetl();
            sqlParam.setLocNo(locMast.getLocNo());
            sqlParam.setMatnr(adjust.getMatNo());
            sqlParam.setMatnr(adjust.getMatnr());
            LocDetl one = locDetlService.selectOne(new EntityWrapper<>(sqlParam));
            // 保存新库存明细
            if (Cools.isEmpty(one)) {
                MatCode matCode = matCodeService.selectById(adjust.getMatNo());
                if (adjust.getCount() == 0){
                    continue;
                }
                MatCode matCode = matCodeService.selectById(adjust.getMatnr());
                LocDetl locDetl = new LocDetl();
                locDetl.setLocNo(locMast.getLocNo());
                locDetl.setMatnr(matCode.getMatNo());
@@ -512,7 +518,7 @@
                        sqlParam1.setModiUser(userId);
                        if (!locDetlService.update(sqlParam1, new EntityWrapper<LocDetl>()
                                .eq("loc_no", locMast.getLocNo())
                                .eq("matnr", adjust.getMatNo()))) {
                                .eq("matnr", adjust.getMatnr()))) {
                            throw new CoolException("修改库存明细失败");
                        }
                    }
src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -19,7 +19,6 @@
        cols: [[
            {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'}
            ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'locNo$', align: 'center',title: '库位号'}
            ,{field: 'matnr', align: 'center',title: '物料'}
            ,{field: 'lgnum', align: 'center',title: '仓库号'}
            ,{field: 'tbnum', align: 'center',title: '转储请求编号'}
@@ -79,7 +78,7 @@
                        success: function (res) {
                            if (res.code === 200){
                                layer.msg(currLocNo + res.msg);
                                reset();
                                init(currLocNo)
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            }else {
@@ -115,6 +114,15 @@
            layer.msg("请输入库位号");
            return;
        }
        init(locNo);
    });
    // 重置事件
    form.on('submit(reset)', function (data) {
        reset();
    });
    function init(locNo) {
        http.post(baseUrl + "/locDetl/list/auth", {locNo: locNo,limit: 1000}, function (res) {
            matCodeData = [];
            let data = res.data.records;
@@ -126,12 +134,7 @@
            locTips(true, locNo);
            tableReload();
        })
    });
    // 重置事件
    form.on('submit(reset)', function (data) {
        reset();
    });
    }
    function reset() {
        clearFormVal($('#search-box'));
@@ -230,7 +233,9 @@
            count: initCountVal,
            anfme: initAnfmeVal,
            removeBtn: true,
            matnr: data[i].matNo
            matnr: data[i].matNo,
            maktx: data[i].matName,
            altme: data[i].str1,
        })
    }
    matCodeData.push.apply(matCodeData,applyData);