From 3bfff48245e0eb8affcbf2a16fb2c75eb1cff8bb Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 14 四月 2025 11:10:40 +0800
Subject: [PATCH] 模拟计算发送数据处理

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue |   65 +++++++++++++++++++++++++-------
 1 files changed, 50 insertions(+), 15 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 ed5aeec..6d5c173 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) => {
@@ -335,6 +337,20 @@
       filterMethod: filterChanged, width: 100
     },
     {
+      field: 'width',
+      title: t('order.width'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged, width: 100
+    },
+    {
+      field: 'height',
+      title: t('order.height'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      filterMethod: filterChanged, width: 100
+    },
+    {
       field: 'glassNumber',
       title: t('reportingWorks.glassNumber'),
       filters: [{data: ''}],
@@ -443,6 +459,7 @@
     let lableTitle = lableType.text
     if ($grid) {
       switch (code) {
+        //鎵撳嵃娴佺▼鍗�
         case 'print': {
           if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
             ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -464,7 +481,7 @@
           dialogTableVisible.value = true
           break
         }
-
+        //鏍囩鎵撳嵃 甯稿窞
         case 'printLabel': {
           if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
             ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -486,6 +503,7 @@
 
           break
         }
+        //鏍囩鎵撳嵃2 甯稿窞
         case 'printLabel2': {
           if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
             ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -535,6 +553,7 @@
           })
           break
         }
+        //鑷畾涔夋垚鍝佹爣绛炬墦鍗�
         case 'customLabel': {
           if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
             ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -553,6 +572,7 @@
               id += selectRecords[i].id + "|"
             }
           }
+          //鎴愬搧鏍囩1
           if (lableTypes == 1) {
             labelRow.value.list = JSON.stringify(selectRecords)
             labelRow.value.faceOrientation = faceOrientation
@@ -561,7 +581,9 @@
             lastList.value = []
             if (company.label === 1) {
               dialogTableVisibleLabel.value = true
-            } else if (company.label === 2) {
+            }
+            //甯稿窞椤圭洰
+            else if (company.label === 2) {
               router.push({
                 path: '/main/processCard/PrintCustomLabelCZ',
                 query: {
@@ -574,7 +596,9 @@
               })
             }
 
-          } else if (lableTypes == 2) {
+          }
+          //鎴愬搧鏍囩2
+          else if (lableTypes == 2) {
             labelRow.value.list = JSON.stringify(selectRecords)
             labelRow.value.faceOrientation = faceOrientation
             labelRow.value.type = type
@@ -582,7 +606,9 @@
             lastList.value = []
             if (company.label === 1) {
               dialogTableVisibleCustomLabel.value = true
-            } else if (company.label === 2) {
+            }
+            //甯稿窞椤圭洰
+            else if (company.label === 2) {
               router.push({
                 path: '/main/processCard/PrintCustomLabelSemiCZ',
                 query: {
@@ -594,7 +620,9 @@
                 }
               })
             }
-          } else if (lableTypes == 3) {
+          }
+          //鎴愬搧鏍囩3
+          else if (lableTypes == 3) {
             router.push({
               path: '/main/processCard/PrintLabel1',
               query: {
@@ -730,24 +758,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 {
 
@@ -756,7 +792,6 @@
     }
   })
 }
-
 </script>
 
 <template>
@@ -874,7 +909,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