From 7de69a5359e32e650b605483f7eef43de987ba1f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 11 八月 2022 13:49:58 +0800
Subject: [PATCH] #
---
static/js/object/StaTask.js | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/static/js/object/StaTask.js b/static/js/object/StaTask.js
index 0a92b7d..4c72efc 100644
--- a/static/js/object/StaTask.js
+++ b/static/js/object/StaTask.js
@@ -7,6 +7,8 @@
that.object = object;
that.no = 0;
+ that.objectType = null;
+ that.isDel = false;
that.readyIn = false;
that.run = false;
that.loaded = 0;
@@ -24,7 +26,11 @@
let item = getArrVal(conveyObjects.objects, "no", that.no+"");
if (!that.position && item) {
+ that.objectType = item.objectType;
that.position = item.position;
+ }
+ if (!item) {
+ that.isDel = true;
}
}
init();
@@ -34,28 +40,32 @@
return;
}
+ // 娣诲姞
if (staData.loaded === 1 && staData.wrkNo && staData.wrkNo !== '0' && that.wrkNo !== staData.wrkNo) {
- if (that.loaded === 1) {
+ if (that.outlet !== 1) { // 鐢卞爢鍨涙満鍑哄簱锛屼笉闇�瑕佹坊鍔爉odel
+ if (that.loaded === 1) {
+ console.log("sta_" + that.no + " remove锛�" + that.wrkNo + "-Pallet锛� " + that.wrkNo + "-Goods");
+ that.object.removeObject(that.wrkNo + "-Pallet");
+ that.object.removeObject(that.wrkNo + "-Goods");
+ }
- that.object.removeObject(that.wrkNo + "-Pallet");
- that.object.removeObject(that.wrkNo + "-Goods");
+ InitPallet(that.object, [{wrkNo: staData.wrkNo}], {position: that.position, objectType: that.objectType}, 2);
+ InitGoods(that.object, [{wrkNo: staData.wrkNo}], {position: that.position, objectType: that.objectType}, 2);
}
-
- InitPallet(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2);
- InitGoods(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2);
}
+ // 绉婚櫎
if (staData.loaded === 0) {
if (that.loaded === 1 && that.wrkNo && that.wrkNo !== '0') {
-
- that.object.removeObject(that.wrkNo + "-Pallet");
- that.object.removeObject(that.wrkNo + "-Goods");
+ if (that.inlet !== 1) { // 鍫嗗灈鏈洪渶瑕佹惉杩愶紝涓嶈兘鐩存帴绉婚櫎
+ that.object.removeObject(that.wrkNo + "-Pallet");
+ that.object.removeObject(that.wrkNo + "-Goods");
+ }
}
}
that.loaded = staData.loaded;
that.wrkNo = staData.wrkNo;
-
}
}
--
Gitblit v1.9.1