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 | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/pages/production/twist/receive/monofil.vue b/src/pages/production/twist/receive/monofil.vue
index 1c7a03e..49b261e 100644
--- a/src/pages/production/twist/receive/monofil.vue
+++ b/src/pages/production/twist/receive/monofil.vue
@@ -110,10 +110,6 @@
console.log("code:===========", JSON.parse(code.code));
console.log("id:=============", JSON.parse(code.code).id);
try {
- const { data } = await TwistApi.getScarn({
- outPutId: JSON.parse(code.code).id,
- });
-
// 妫�鏌ユ槸鍚﹀凡閫夋嫨鏍囩
if (!tab.value) {
toast.error("璇峰厛閫夋嫨涓�涓眰");
@@ -127,6 +123,20 @@
toast.error("鏈壘鍒板綋鍓嶉�変腑鐨勫眰");
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: scannedOutputId,
+ twistId: currentLayer.twistId,
+ });
// 妫�鏌ュ綋鍓嶅眰鏄惁宸插瓨鍦ㄨ鍗曚笣
const exists = currentLayer.strandedWireDish?.some(
--
Gitblit v1.9.3