From ce163f03ebee5f18d5928c2b607b338df4cf614f Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 30 五月 2024 10:52:16 +0800
Subject: [PATCH] 标签打印

---
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue |   37 +++++++++++++++++++++++++++++++++----
 1 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
index 7b03e20..d1527ea 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -10,10 +10,12 @@
 import {VXETable} from "vxe-table";
 import {toolbarButtonClickEvent} from "@/hook/mouseMove";
 import PrintProcess from '@/views/pp/processCard/PrintProcess.vue'
+import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
 //璇█鑾峰彇
 const {t} = useI18n()
 let router = useRouter()
 const dialogTableVisible = ref(false)
+const dialogTableVisibleLabel = ref(false)
 let selectRecords = ref(null)
 
 //瀹氫箟婊氬姩鏉¢珮搴�
@@ -158,7 +160,8 @@
 
   toolbarConfig: {
     buttons: [
-        {code: 'print', name: '鎵撳嵃', status: 'primary'},
+        {code: 'print', name: '鎵撳嵃娴佺▼鍗�', status: 'primary'},
+        {code: 'printLabel', name: '鎵撳嵃鏍囩', status: 'primary'},
     ],
     // import: false,
     // export: true,
@@ -206,9 +209,25 @@
           }
           router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}})
 
-          // let routeData = router.resolve({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords)}});
-          // window.open(routeData.href, '_blank');
-          //dialogTableVisible.value = true
+          break
+        }
+
+        case 'printLabel': {
+          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
+            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+            return
+          }
+
+          let id = ""
+          for (let i = 0; i < selectRecords.length; i++) {
+            if (i + 1 === selectRecords.length) {
+              id += selectRecords[i].id
+            } else {
+              id += selectRecords[i].id + "|"
+            }
+          }
+          router.push({path: '/main/processCard/PrintLabel', query: {printList: JSON.stringify(selectRecords)}})
+
           break
         }
 
@@ -271,6 +290,15 @@
       <PrintProcess :printList="selectRecords"
           style="width: 100%;height: 100%" />
     </el-dialog>
+
+    <el-dialog
+        v-model="dialogTableVisibleLabel"
+        destroy-on-close
+        title="鏍囩鎵撳嵃"
+        style="width: 80%;height:75% ">
+      <PrintLabel :printList="selectRecords"
+                    style="width: 100%;height: 100%" />
+    </el-dialog>
   </div>
 </template>
 
@@ -279,4 +307,5 @@
   width: 99%;
   height: 100%;
 }
+
 </style>
\ No newline at end of file

--
Gitblit v1.8.0