From 3c2017ba96c5eecf911a1320e6ca161f8751d6bf Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 13 三月 2024 16:47:54 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx |    1 -
 zy-asrs-flow/src/pages/map/components/mapSettings.jsx     |   19 +++++++++++++++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx b/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
index 1d2fc3c..a1e496a 100644
--- a/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/mapCopySettings.jsx
@@ -31,7 +31,6 @@
         if (autoIncrement === true && curSprite) {
             switch (curSprite.data?.type) {
                 case Utils.SENSOR_TYPE.SHELF:
-                    console.log(1);
                     if (!curSprite.data?.row || !curSprite.data?.bay) {
                         setAutoIncrementError(intl.formatMessage({ id: 'map.settings.sub.copy.warn.config.shelf', defaultMessage: '璇峰厛璁剧疆璐ф灦鍙傛暟!' }));
                     } else {
diff --git a/zy-asrs-flow/src/pages/map/components/mapSettings.jsx b/zy-asrs-flow/src/pages/map/components/mapSettings.jsx
index d77a77f..1aff3b2 100644
--- a/zy-asrs-flow/src/pages/map/components/mapSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/mapSettings.jsx
@@ -103,8 +103,23 @@
             if (values.autoIncrement && values.type) {
                 switch (values.type) {
                     case Utils.SENSOR_TYPE.SHELF:
-                        console.log(values);
-                        console.log(curSprite);
+                        if (values.incrementValue === 'row') {
+                            if (values.incrementMode === 'descending') {
+                                copiedSprite.data.row = curSprite.data.row - i - 1;
+                            } else {
+                                copiedSprite.data.row = curSprite.data.row + i + 1;
+                            }
+                        }
+                        if (values.incrementValue === 'bay') {
+                            if (values.incrementMode === 'descending') {
+                                copiedSprite.data.bay = curSprite.data.bay - i - 1;
+                            } else {
+                                copiedSprite.data.bay = curSprite.data.bay + i + 1;
+                            }
+                        }
+                        if (copiedSprite.data.row && copiedSprite.data.bay) {
+                            copiedSprite.data.shelfNo = Utils.pureNumStr(copiedSprite.data.row) + '-' + Utils.pureNumStr(copiedSprite.data.bay);
+                        }
                         break;
                     case Utils.SENSOR_TYPE.AGV:
                         break;

--
Gitblit v1.9.1