#
luxiaotao1123
2022-04-07 0b75b43cca6c04f49ddeae6d873ac53185e390bc
#
2个文件已修改
40 ■■■■ 已修改文件
static/js/object/CrnTask.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/object/StaTask.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/object/CrnTask.js
@@ -51,6 +51,7 @@
    that.pallet = null;
    that.goods = null;
    that.wrkNo = null;
    that.sourceLocNo = null;
    that.locNo = null;
@@ -94,13 +95,17 @@
            that.crnFork = getArrVal(object.objects, "name", that.crnNo + "-fork");
            // return;
        }
        // 出库 / 移库
        if (crnData.sourceLocNo != null) {
            that.sourceLocNo = crnData.sourceLocNo;
            that.pallet = getArrVal(object.objects, "name", crnData.sourceLocNo + "-Pallet");
            that.goods = getArrVal(object.objects, "name", crnData.sourceLocNo + "-Goods");
        }
        if (crnData.locNo != null) {
            that.locNo = crnData.locNo;
        } else {
            // 入库
            if (crnData.wrkNo != null) {
                that.pallet = getArrVal(object.objects, "name", crnData.wrkNo + "-Pallet");
                that.goods = getArrVal(object.objects, "name", crnData.wrkNo + "-Goods");
            }
        }
        if (JSON.stringify(crnData.position) === JSON.stringify(that.position)) {
@@ -125,11 +130,15 @@
        that.position = crnData.position;
        that.forkPos = crnData.forkPos;
        that.loadPos = crnData.loadPos;
        that.sourceLocNo = crnData.sourceLocNo;
        that.locNo = crnData.locNo;
        that.wrkNo = crnData.wrkNo;
        // 根据货叉上下定位 判断堆垛机取放货作业 -----------------------------------------------
        // 上定位 ===>> 下定位    放货完成
        if (that.preLoadPos === 1 && that.loadPos === 0) {
            // 入库 / 移库
            if (that.locNo != null) {
                if (that.pallet != null) {
                    that.pallet.name = that.locNo + "-Pallet";
@@ -137,12 +146,21 @@
                if (that.goods != null) {
                    that.goods.name = that.locNo + "-Goods";
                }
            } else {
                // 出库
                if (crnData.wrkNo != null) {
                    if (that.pallet != null) {
                        that.pallet.name = crnData.wrkNo + "-Pallet";
                    }
                    if (that.goods != null) {
                        that.goods.name = crnData.wrkNo + "-Goods";
                    }
                }
            }
        // 下定位 ===>> 上定位    取货完成
        } else {
        }
        // create Route ------------------------------------------------
static/js/object/StaTask.js
@@ -9,6 +9,7 @@
    that.no = 0;
    that.run = false;
    that.loaded = 0;
    that.wrkNo = null;
    that.inlet = -1;
    that.outlet = -1;
@@ -51,14 +52,21 @@
            // 1.出库最后一站 【移除】
            if (that.outlet === 1) {
                let pallet = getArrVal(that.object.objects, "name", that.wrkNo + "-Pallet");
                if (pallet != null) {
                    that.object.removeObject(that.wrkNo + "-Pallet");
                }
                let goods = getArrVal(that.object.objects, "name", that.wrkNo + "-Goods");
                if (goods != null) {
                    that.object.removeObject(that.wrkNo + "-Goods");
                }
            }
        }
        // 实时更新
        that.loaded = staData.loaded;
        that.wrkNo = staData.wrkNo;
        // that.run = true;
    }