From e268cb55fa740e5775bdeccc7c60e71c9cfdf30b Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 30 十月 2025 10:15:16 +0800
Subject: [PATCH] 重复扫码验证
---
src/pages/production/twist/receive/monofil.vue | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/pages/production/twist/receive/monofil.vue b/src/pages/production/twist/receive/monofil.vue
index 526969d..49b261e 100644
--- a/src/pages/production/twist/receive/monofil.vue
+++ b/src/pages/production/twist/receive/monofil.vue
@@ -124,8 +124,17 @@
return;
}
console.log("tab.value:===========3", currentLayer);
+ // 鍦ㄥ彂璧疯姹傚墠锛屽厛鏍¢獙璇ュ崟涓濇槸鍚﹀凡鍦ㄥ綋鍓嶆垨鍏朵粬灞傜骇琚鐢�
+ const scannedOutputId = JSON.parse(code.code).id;
+ const alreadyUsed = nodeList.value.some((node) =>
+ (node.strandedWireDish || []).some((item: any) => item.outputId === scannedOutputId)
+ );
+ if (alreadyUsed) {
+ toast.error("璇ュ崟涓濆凡棰嗙敤锛岃鍕块噸澶嶆壂鐮�");
+ return;
+ }
const { data } = await TwistApi.getScarn({
- outPutId: JSON.parse(code.code).id,
+ outPutId: scannedOutputId,
twistId: currentLayer.twistId,
});
--
Gitblit v1.9.3