From b7924c34a4f66406c181c712e3546d3a47cbfc4f Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 30 一月 2026 10:22:18 +0800
Subject: [PATCH] fix: 优化绞线报工台账字段

---
 src/pages/production/detail/twistDetail.vue |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/pages/production/detail/twistDetail.vue b/src/pages/production/detail/twistDetail.vue
index 0f7be88..b5c9d27 100644
--- a/src/pages/production/detail/twistDetail.vue
+++ b/src/pages/production/detail/twistDetail.vue
@@ -9,6 +9,7 @@
         totalAmount: 'totalAmount',
         amount: 'amount',
         unAmount: 'unAmount',
+        segmentLengthNote: 'segmentLengthNote',
       }"
     />
     <view class="mx-3">
@@ -46,24 +47,29 @@
 
 const paramsId = ref();
 const cardData = reactive({
+  type: "缁炵嚎",
   deviceModel: undefined,
   model: undefined,
   systemNo: undefined,
   totalAmount: undefined,
   amount: undefined,
   unAmount: undefined,
+  segmentLengthNote: undefined,
 });
+const detailData = ref<any>({});
 
 const getDetailData = async (id: string) => {
   const { data } = await TwistApi.getTwistDetailById({
     id: id,
   });
+  detailData.value = data;
   cardData.deviceModel = data.deviceModel;
   cardData.model = data.model;
   cardData.systemNo = data.systemNo;
   cardData.totalAmount = data.totalLength;
   cardData.amount = data.length;
   cardData.unAmount = data.unLength;
+  cardData.segmentLengthNote = data.segmentLengthNote;
 };
 
 // 鑾峰彇骞剁紦瀛樼敓浜у噯澶嘔D
@@ -84,7 +90,18 @@
 };
 
 // 澶勭悊鎶ュ伐鐐瑰嚮
-const handleReportClick = () => {
+const handleReportClick = async () => {
+  // 鍏堣姹傞獙璇佸彉鏇存帴鍙�
+  try {
+    const { code } = await TwistApi.verifyChanges({ projectId: detailData.value.projectId });
+    if (code !== 200) {
+      return;
+    }
+  } catch (error) {
+    console.error("楠岃瘉鍙樻洿澶辫触:", error);
+    return;
+  }
+
   const prepareId = getPrepareId();
   console.log("缁炵嚎琛ㄦ牸鎶ュ伐妫�鏌� - prepareId鍊�:", prepareId);
 

--
Gitblit v1.9.3