From e0fc86fda41a8777a0cec5a9de7aa9f1474f5dc8 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 08 十月 2026 17:09:52 +0800
Subject: [PATCH] fix: 库存操作原型绘制。单丝领用,添加字段

---
 src/pages/production/twist/report/index.vue |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/pages/production/twist/report/index.vue b/src/pages/production/twist/report/index.vue
index 7a90a68..18ef6a4 100644
--- a/src/pages/production/twist/report/index.vue
+++ b/src/pages/production/twist/report/index.vue
@@ -221,7 +221,29 @@
   }
 };
 
+// 蹇呴』鏈夌洏鍏烽鐢ㄨ褰曟墠鑳芥姤宸ワ細鎺ュ彛寮傚父鏃朵笉鎷︽埅锛堥伩鍏嶇綉缁滈棶棰橀樆鏂敓浜э級锛�
+// 鍙湁鏄庣‘鏌ヨ鎴愬姛涓旀病鏈変换浣曠洏鍏烽鐢ㄦ椂鎵嶆嫤鎴��
+const ensureReelDish = async () => {
+  try {
+    const { code, data } = await ManageApi.getStrandedWireDish({
+      wireId: paramsId.value,
+      type: "鐩樺叿",
+    });
+    if (code !== 200) return true;
+    const list = Array.isArray(data) ? data : [];
+    if (list.length === 0) {
+      toast.warning("璇峰厛鍦ㄣ�愮洏鍏烽鐢ㄣ�戜腑鎵爜棰嗙敤鐩樺叿锛屽啀杩涜缁炵嚎鎶ュ伐");
+      return false;
+    }
+    return true;
+  } catch (error) {
+    return true;
+  }
+};
+
 const addReport = async () => {
+  // 蹇呴』鏈夌洏鍏烽鐢ㄨ褰曟墠鑳界粸绾挎姤宸�
+  if (!(await ensureReelDish())) return;
   // 妫�鏌ユ槸鍚︽墍鏈夋暟鎹兘宸蹭繚瀛橈紙閮芥湁id锛�
   if (twistReportList.value.length > 0 && twistReportList.value.every((item) => item.id)) {
     // 纭繚涓昏〃鏁版嵁宸茶幏鍙�

--
Gitblit v1.9.3