From 9a5c167f99649b610eb36c39e75017517073a6a4 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期二, 12 八月 2025 07:58:31 +0800
Subject: [PATCH] 打印方法修改(可编辑标签内容)

---
 UI-Project/src/views/hollow/PrintCustomLabelTwo.vue |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/UI-Project/src/views/hollow/PrintCustomLabelTwo.vue b/UI-Project/src/views/hollow/PrintCustomLabelTwo.vue
index b3bcf02..623b583 100644
--- a/UI-Project/src/views/hollow/PrintCustomLabelTwo.vue
+++ b/UI-Project/src/views/hollow/PrintCustomLabelTwo.vue
@@ -95,7 +95,7 @@
 )
 
 //淇敼鐩稿悓浜у搧鍚嶇О鏍囩
-const updateProductName = (event, index, id) => {
+const updateProductName = (event, id, index) => {
   console.log(event, index, id)
   // 鍒涘缓鏄犲皠瀵硅薄
   const propertyMapping = {};
@@ -111,7 +111,7 @@
   const keys = Object.keys(propertyMapping);
 
   // 鏍规嵁 index 鑾峰彇瀵瑰簲鐨勫睘鎬у悕
-  const propertyName = keys[index];
+  const propertyName = keys[id];
 
   // 濡傛灉鏄犲皠涓病鏈夎 index锛岀洿鎺ヨ繑鍥�
   if (!propertyName) {
@@ -122,9 +122,9 @@
   // 閬嶅巻 lastList 骞舵洿鏂板搴旂殑灞炴��
   props.lastList.forEach(obj => {
     // 鑾峰彇鍓嶇紑鍜� orderId
-    const prefix = props.lastList[id].processId.substring(0, 11);
+    const prefix = props.lastList[index].processId.substring(0, 11);
     const orderId = obj.orderId;
-    const glassNumber = props.lastList[id].glassNumber
+    const glassNumber = props.lastList[index].glassNumber
     // 鏍规嵁 propertyName 鏇存柊灞炴��
     if (propertyName === 'productAbbreviation' && prefix === obj.processId.substring(0, 11)) {
       obj.productAbbreviation = result;
@@ -174,12 +174,12 @@
 <template>
   <div id="print" class="printFlowCard_semi">
 
-    <template v-for="(item1, id) in props.lastList">
+    <template v-for="(item1, index) in props.lastList">
       <div class="entirety_semi">
         <div class="row4">{{ faceOrientation }}</div>
-        <div v-for="(item, id ,index) in labelList" class="contentRow">
+        <div v-for="(item, id) in labelList" class="contentRow">
           <div contenteditable="true" v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1"
-            @input="updateProductName($event, id, id)">{{ item.title }}锛歿{ item1[item.name] }}</div>
+            @input="updateProductName($event, id, index)">{{ item.title }}锛歿{ item1[item.name] }}</div>
           <!--        <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2">{{ item1[item.name] }}</div>-->
         </div>
         <!-- <div v-html="company.printLabel.customSemi(item1)"></div> -->

--
Gitblit v1.8.0