From f2e14fbd69737ca7717835fcc4e02c0f01de10d4 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期一, 02 二月 2026 10:12:42 +0800
Subject: [PATCH] fix: 修复扫码时code参数格式不一致导致的解析错误
---
src/pages/production/twist/receive/monofil.vue | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/pages/production/twist/receive/monofil.vue b/src/pages/production/twist/receive/monofil.vue
index 9592c45..23ffec7 100644
--- a/src/pages/production/twist/receive/monofil.vue
+++ b/src/pages/production/twist/receive/monofil.vue
@@ -130,7 +130,8 @@
}
// 瑙f瀽鎵爜鏁版嵁锛氬彲鑳藉寘鍚� id(outPutId) 鎴� monofilamentNumber
- const scanData = JSON.parse(code.code);
+ let scanCode = code.code || code;
+ const scanData = JSON.parse(scanCode);
const outPutId = scanData.id;
const monofilamentNumber = scanData.monofilamentNumber;
@@ -195,6 +196,7 @@
}
} catch (error) {
toast.error("浜岀淮鐮佸紓甯革紝璇锋洿鎹簩缁寸爜锛�");
+ console.log(error);
}
};
--
Gitblit v1.9.3