From 646135b9c54d6ccf5d47af30bf208bdfe5005017 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 09 十二月 2025 10:31:44 +0800
Subject: [PATCH] fix: 二维码内容简化,只传一个id。根据id查询详细信息。
---
src/pages/production/twist/receive/monofil.vue | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/pages/production/twist/receive/monofil.vue b/src/pages/production/twist/receive/monofil.vue
index b4998fc..de0bfc2 100644
--- a/src/pages/production/twist/receive/monofil.vue
+++ b/src/pages/production/twist/receive/monofil.vue
@@ -129,19 +129,31 @@
return;
}
- // 瑙f瀽鎵爜鏁版嵁
+ // 瑙f瀽鎵爜鏁版嵁锛岀幇鍦ㄤ簩缁寸爜鍙寘鍚玦d
const scanData = JSON.parse(code.code);
+ const outPutId = scanData.id;
- // 鍒ゆ柇灞傜骇鏄惁鍖归厤
- if (scanData.layer && scanData.layer !== currentLayer.twistedLayer) {
+ if (!outPutId) {
+ toast.error("浜岀淮鐮佹牸寮忛敊璇紝缂哄皯id淇℃伅");
+ return;
+ }
+
+ // 璋冪敤鎺ュ彛鑾峰彇鎷変笣璇︾粏淇℃伅
+ const { data: tagData } = await TwistApi.getTagByIdLs({
+ outPutId: outPutId,
+ });
+
+ // 鍒ゆ柇灞傜骇鏄惁鍖归厤锛堝鏋滄帴鍙h繑鍥炵殑鏁版嵁涓湁layer瀛楁锛�
+ if (tagData.layer && tagData.layer !== currentLayer.twistedLayer) {
toast.error(
- `棰嗙敤灞傜骇涓嶅锛屽綋鍓嶅眰鏄細${currentLayer.twistedLayer}锛岄鐢ㄥ崟涓濆眰鏄細${scanData.layer}`
+ `棰嗙敤灞傜骇涓嶅锛屽綋鍓嶅眰鏄細${currentLayer.twistedLayer}锛岄鐢ㄥ崟涓濆眰鏄細${tagData.layer}`
);
// return;
}
+ // 璋冪敤鍗曚笣棰嗙敤鎵爜鎺ュ彛
const { data } = await TwistApi.getScarn({
- outPutId: scanData.id,
+ outPutId: outPutId,
twistId: currentLayer.twistId,
});
--
Gitblit v1.9.3