From 059270c12f452fcc3344b826f35295fd7c20906e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期二, 21 三月 2023 08:31:37 +0800 Subject: [PATCH] # --- static/js/object/StoreGoods.js | 50 ++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 38 insertions(+), 12 deletions(-) diff --git a/static/js/object/StoreGoods.js b/static/js/object/StoreGoods.js index 05b3394..f8b85aa 100644 --- a/static/js/object/StoreGoods.js +++ b/static/js/object/StoreGoods.js @@ -63,13 +63,26 @@ clone.name = item.loc_no + "-" + "Pallet"; break; case 2: - positionX = ref.position.x || 0; - positionY = ref.position.y || 0; - positionZ = ref.position.z || 0; + switch (ref.objectType) { + case 'chain': + positionX = ref.position.x || 0; + positionY = ref.position.y || 0; + positionZ = ref.position.z || 0; - positionX -= 48 - 1; - positionY += 20; - positionZ -= 138 + 20; + positionX -= 48 - 1; + positionY += 20; + positionZ -= 138 + 20; + break + case 'roller': + positionX = ref.position.x || 0; + positionY = ref.position.y || 0; + positionZ = ref.position.z || 0; + + positionY += 20; + break + default: + break + } clone.name = item.wrkNo + "-" + "Pallet"; break; @@ -114,13 +127,26 @@ clone.name = item.loc_no + "-" + "Goods"; break; case 2: - positionX = ref.position.x || 0; - positionY = ref.position.y || 0; - positionZ = ref.position.z || 0; + switch (ref.objectType) { + case 'chain': + positionX = ref.position.x || 0; + positionY = ref.position.y || 0; + positionZ = ref.position.z || 0; - positionX -= 48 - 1; - positionY += 20; - positionZ -= 138 + 20; + positionX -= 48 - 1; + positionY += 20; + positionZ -= 138 + 20; + break + case 'roller': + positionX = ref.position.x || 0; + positionY = ref.position.y || 0; + positionZ = ref.position.z || 0; + + positionY += 20; + break + default: + break + } clone.name = item.wrkNo + "-" + "Goods"; break; -- Gitblit v1.9.1