From 60bb766baab8b2abd3e0ef63079582f7bd983536 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 19 八月 2022 09:23:04 +0800
Subject: [PATCH] #
---
static/js/object/CrnTask.js | 46 ++++++++++++++++++++++++++++++++--------------
1 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/static/js/object/CrnTask.js b/static/js/object/CrnTask.js
index 5f564bd..de21fd6 100644
--- a/static/js/object/CrnTask.js
+++ b/static/js/object/CrnTask.js
@@ -11,13 +11,13 @@
const yOffset1 = -116;
const zOffset1 = -475;
-const palletX = -18;
-const palletY = 2;
-const palletZ = -46;
+const palletX = -2;
+const palletY = 0;
+const palletZ = -25;
-const goodsX = -17;
-const goodsY = 5;
-const goodsZ = -6;
+const goodsX = -2;
+const goodsY = 22;
+const goodsZ = -25;
// 鍫嗗灈鏈哄綋鍓嶈繍琛岀姸鎬佸璞�
function CrnTask(crnData, object) {
@@ -51,6 +51,7 @@
that.pallet = null;
that.goods = null;
+ that.wrkNo = null;
that.sourceLocNo = null;
that.locNo = null;
@@ -84,23 +85,27 @@
}
if (that.crnBody===null) {
that.crnBody = getArrVal(object.objects, "name", that.crnNo + "-body");
- // return;
+ return;
}
if (that.crnLoad===null) {
that.crnLoad = getArrVal(object.objects, "name", that.crnNo + "-load");
- // return;
+ return;
}
if (that.crnFork===null) {
that.crnFork = getArrVal(object.objects, "name", that.crnNo + "-fork");
- // return;
+ 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 ------------------------------------------------
--
Gitblit v1.9.1