自动化立体仓库 - WMS系统
#
Junjie
2025-07-28 9df1652a644882443cc7c14297f3bd7af76582a1
src/main/webapp/static/js/pakStore/stockOut.js
@@ -2,7 +2,8 @@
var locDetlData = [];
function getCol() {
    var cols = [
        {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
        {field: 'countWeight', align: 'center',title: '出库辅数量', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
        ,{field: 'count', align: 'center',title: '出库数量', width: 130,  style:'color: blue;font-weight: bold'}
        ,{field: 'anfme', align: 'center',title: '库存数量'}
        ,{field: 'locNo$', align: 'center',title: '库位号'}
    ];
@@ -55,6 +56,27 @@
                    layer.msg("出库数量不得大于库存数量", {icon: 2});
                    modify = false;
                }
            }
        }
        if (obj.field === 'countWeight'){
            let vle = Number(obj.value);
            if (isNaN(vle)) {
                layer.msg("请输入数字", {icon: 2});
                modify = false;
            } else {
                if (vle <= 0) {
                    layer.msg("数量必须大于零", {icon: 2});
                    modify = false;
                }
                if (vle > Number(data.weight)) {
                    layer.msg("出库数量不得大于库存数量", {icon: 2});
                    modify = false;
                }
                let arr = data.origin.split("/")
                let mainAnfme = vle * parseFloat(arr[1]) * parseFloat(arr[0])
                let flooredNum = Math.floor(mainAnfme * 10000) / 10000; // 截断到小数点后4位
                data.count = flooredNum
            }
        }
        if (modify) {
@@ -170,6 +192,7 @@
            data.splice(i--, 1);
        } else {
            data[i]["count"] = data[i]["anfme"];
            data[i]["countWeight"] = data[i]["weight"];
        }
    }
    locDetlData.push.apply(locDetlData, data);