From 0b75b43cca6c04f49ddeae6d873ac53185e390bc Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期四, 07 四月 2022 13:08:36 +0800 Subject: [PATCH] # --- static/js/object/CrnTask.js | 28 +++++++++++++++++++++++----- static/js/object/StaTask.js | 12 ++++++++++-- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/static/js/object/CrnTask.js b/static/js/object/CrnTask.js index 5f564bd..ffda0fb 100644 --- a/static/js/object/CrnTask.js +++ b/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 ------------------------------------------------ diff --git a/static/js/object/StaTask.js b/static/js/object/StaTask.js index aec8b53..6680755 100644 --- a/static/js/object/StaTask.js +++ b/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; } -- Gitblit v1.9.1