From 0d6e0f0efa92c9347884c83170ec8d47dd5f5ef4 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 13 十一月 2025 16:03:48 +0800
Subject: [PATCH] fix: 扫码18层的单丝12层也能扫上。

---
 src/pages/production/components/ProductionCard.vue     |    2 +-
 src/pages/production/twist/receive/monofil.vue         |   14 +++++++++++++-
 src/pages/production/twist/receive/steelCore/index.vue |    4 ++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/pages/production/components/ProductionCard.vue b/src/pages/production/components/ProductionCard.vue
index f5a9a84..108eae9 100644
--- a/src/pages/production/components/ProductionCard.vue
+++ b/src/pages/production/components/ProductionCard.vue
@@ -1,6 +1,6 @@
 <template>
   <wd-row>
-    <wd-col v-for="(item, index) in data" :key="index" :span="item.span ?? 12" class="my-1">
+    <wd-col v-for="(item, index) in data" :key="index" :span="24" class="my-1">
       <view class="flex w-full h-[20px]">
         <view class="text-[#646874] pl-1 mr-3">{{ item.label }}</view>
         <view class="font-medium pr-1" :style="{ color: item.color ?? color }">
diff --git a/src/pages/production/twist/receive/monofil.vue b/src/pages/production/twist/receive/monofil.vue
index 9456e8e..ebf1542 100644
--- a/src/pages/production/twist/receive/monofil.vue
+++ b/src/pages/production/twist/receive/monofil.vue
@@ -123,8 +123,20 @@
       toast.error("鏈壘鍒板綋鍓嶉�変腑鐨勫眰");
       return;
     }
+
+    // 瑙f瀽鎵爜鏁版嵁
+    const scanData = JSON.parse(code.code);
+
+    // 鍒ゆ柇灞傜骇鏄惁鍖归厤
+    if (scanData.layer && scanData.layer !== currentLayer.twistedLayer) {
+      toast.error(
+        `棰嗙敤灞傜骇涓嶅锛屽綋鍓嶅眰鏄細${currentLayer.twistedLayer}锛岄鐢ㄥ崟涓濆眰鏄細${scanData.layer}`
+      );
+      // return;
+    }
+
     const { data } = await TwistApi.getScarn({
-      outPutId: JSON.parse(code.code).id,
+      outPutId: scanData.id,
       twistId: currentLayer.twistId,
     });
 
diff --git a/src/pages/production/twist/receive/steelCore/index.vue b/src/pages/production/twist/receive/steelCore/index.vue
index 676f782..fd54201 100644
--- a/src/pages/production/twist/receive/steelCore/index.vue
+++ b/src/pages/production/twist/receive/steelCore/index.vue
@@ -232,4 +232,8 @@
   display: flex;
   justify-content: space-between;
 }
+
+:deep(.wd-button__content) {
+  color: #0d867f;
+}
 </style>

--
Gitblit v1.9.3