From 99d0bb96043ba5d6db66bbfb00f67ca4e09f3ffb Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 07 三月 2025 09:08:33 +0800
Subject: [PATCH] 小片尺寸和成品尺寸不相同时,打印显示小片信息

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
index 6b4eeb9..3f7f816 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -141,6 +141,7 @@
   },
 ]
 let hidePrintLabels = company.printLabel.hideButton;
+let btnType = company.printBtn;
 
 if (hidePrintLabels == 'true') {
   filteredOptions = lableTypeOptions.filter((option, index) => index !== 2);
@@ -222,6 +223,7 @@
 request.post(`/processCard/selectPrintDetails/${inquiryMode}/${type}`, data.value).then((res) => {
 
   if (res.code == 200) {
+    console.log(res.data.data)
     let newDataCollection = [];
     for (let i = 0; i < res.data.data.length; i++) {
       res.data.data[i].detail.forEach((item) => {
@@ -744,24 +746,32 @@
 }
 
 const hideButton = () => {
-  // 鏍规嵁鏉′欢鍊� hidePrintLabels 杩囨护鎸夐挳鏁扮粍
   gridOptions.toolbarConfig.buttons = gridOptions.toolbarConfig.buttons.filter(button => {
-    // 杩欓噷鏍规嵁 hidePrintLabels 鐨勫�煎喅瀹氭槸鍚﹂殣钘� printLabel 鍜� printLabel2
+    // 濡傛灉 type 涓嶄负绌烘椂锛岄殣钘� print 鎸夐挳
+    if (btnType == 1 && button.code === 'print') {
+      return false;  // 闅愯棌 print 鎸夐挳
+    }
+
+    // 鏍规嵁 hidePrintLabels 鐨勫�煎垽鏂槸鍚﹂殣钘� printLabel銆乸rintLabel2 鍜� customLabel
     if (hidePrintLabels == 'true') {
       return button.code !== 'printLabel' && button.code !== 'printLabel2' && button.code !== 'customLabel';
     } else {
-      return true && button.code !== 'printLike' && button.code !== 'printLabel3' && button.code !== 'printTest'; // 鏄剧ず璇ユ寜閽�
+      // 濡傛灉 hidePrintLabels 涓嶆槸 'true'锛屽垯闅愯棌 printLike銆乸rintLabel3 鍜� printTest
+      return button.code !== 'printLike' && button.code !== 'printLabel3' && button.code !== 'printTest';
     }
-  })
-}
+
+    // 榛樿杩斿洖 true锛岃〃绀轰繚鐣欐寜閽�
+    return true;
+  });
+};
 
 
-// 鐩戝惉鎵撳嵃瀹屾垚浜嬩欢
+
+// 鐩戝惉鎵撳嵃娆℃暟浜嬩欢
 const printNumber = () => {
 
   selectRecordsData.value.printList = selectRecords
-  let printState = 0
-  request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => {
+  request.post(`/processCard/updatePrintNumber`, selectRecordsData.value).then((res) => {
     if (res.code == 200 && res.data === true) {
     } else {
 
@@ -770,7 +780,6 @@
     }
   })
 }
-
 </script>
 
 <template>
@@ -888,7 +897,7 @@
         destroy-on-close
         style="width: 80%;height:75% ">
       <template #header="{ close, titleId, titleClass }">
-        <el-button v-print="printContentLabel" :icon="Printer" circle/>
+        <el-button v-print="printContentLabel" :icon="Printer" circle @click="printNumber"/>
       </template>
       <print-custom-label id="childLabel"
                           :faceOrientation="labelRow.faceOrientation"

--
Gitblit v1.8.0