#
luxiaotao1123
2022-04-06 9fc5c873bcf8cc68be85f8f9a622aa2c3b86e69d
#
1个文件已修改
34 ■■■■■ 已修改文件
static/js/object/StaTask.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/object/StaTask.js
@@ -10,22 +10,56 @@
    that.run = false;
    that.loaded = 0;
    that.inlet = -1;
    that.outlet = -1;
    let init = function () {
        that.no = staData.no;
        that.inlet = staData.inlet;
        that.outlet = staData.outlet;
    }
    init();
    that.modify = function (staData) {
        if (that.run || that.no === 0) {
            console.error(staData.no + "号输送线更新失败");
            return;
        }
        if (that.loaded === 0 && staData.loaded === 1) {
            // 无货 ===>> 有货
            // 1.入库第一站 【新增】
            if (that.inlet === 1) {
            // 2.来自其他站点的货物 【移动】
            } else {
            }
        }
        if (that.loaded === 1 && staData.loaded === 0) {
            // 有货 ===>> 无货
            // 1.出库最后一站 【移除】
            if (that.outlet === 1) {
            }
        }
        // 实时更新
        that.loaded = staData.loaded;
        that.run = true;
    }
    that.change = function () {
    }
}