From 55eea2b7a994dea01c6b3ba948071c048a6b68f0 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Fri, 29 Nov 2024 17:21:03 +0800 Subject: [PATCH] =?UTF-8?q?0412=20=E6=96=B0=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/Abnormal/AbnormalFeedBack.vue | 2 +- .../print/print_package_TCPlabel-NOOREVIEW.js | 119 +++++ .../print/print_package_label-NOOREVIEW.js | 2 +- src/views/modules/production/bagLabelsTCP.vue | 455 ++++++++++++++++++ src/views/modules/production/inspect.vue | 1 + 5 files changed, 577 insertions(+), 2 deletions(-) create mode 100644 src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js create mode 100644 src/views/modules/production/bagLabelsTCP.vue diff --git a/src/views/modules/Abnormal/AbnormalFeedBack.vue b/src/views/modules/Abnormal/AbnormalFeedBack.vue index 0fa1508..450d4f9 100644 --- a/src/views/modules/Abnormal/AbnormalFeedBack.vue +++ b/src/views/modules/Abnormal/AbnormalFeedBack.vue @@ -226,7 +226,7 @@ - + diff --git a/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js b/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js new file mode 100644 index 0000000..597d0a4 --- /dev/null +++ b/src/views/modules/print/print_package_TCPlabel-NOOREVIEW.js @@ -0,0 +1,119 @@ +/*调用js打印标签*/ +import getLodop from '@/utils/LodopFuncs.js' +/*打印材料卷标签*/ +export function printTCPPackageLabelNoPreview(printList) { + const LODOP = getLodop() + if (LODOP) { + //LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", ""); + LODOP.SET_LICENSES("", "AF8A5800B823CC8E18BCF67B925E7BF0", "", ""); + // LODOP.SET_PRINTER_INDEXA("小标签打印机"); + //循环调用打印机 + for(let i = 0; i < printList.length; i++){ + let printData = printList[i]; + LODOP.NewPage(); + LODOP.SET_PRINT_PAGESIZE(0,1000,700,""); + // LODOP.ADD_PRINT_BARCODE(133,286,130,88,"QRCode",printData.partSpec); + LODOP.ADD_PRINT_BARCODE(133,286,130,88,"QRCode",`${printData.site};${printData.partNo};${printData.unitQty};${printData.seqNo};${printData.printId}`); + LODOP.ADD_PRINT_TEXT(93,18,123,25,"Product No:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(94,141,241,25,printData.partSpec); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(153,18,128,24,"Cust.P/O:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(153,141,145,25,printData.orderRef4); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(115,18,123,25,"FQC:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(115,141,111,25,printData.inspector); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(175,18,125,25,"MFG Lot:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(175,141,142,25,printData.batchNo); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(67,18,121,25,"Product Desc:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(67,141,243,24,printData.partDesc); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.SET_PRINT_STYLEA(0,"LineSpacing",-5); + LODOP.ADD_PRINT_TEXT(197,18,128,25,"MFG Date:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(197,141,144,25,printData.receiveDate); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(216,18,191,19,"Manufactured by "+printData.keyInfoStr2); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",7); + LODOP.ADD_PRINT_TEXT(24,212,149,20,"IATF:16949 Certified"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",7); + LODOP.SET_PRINT_STYLEA(0,"Alignment",3); + LODOP.ADD_PRINT_TEXT(135,18,58,25,"Q.T.Y:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",11); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_LINE(37,12,36,364,0,1); + LODOP.ADD_PRINT_LINE(216,12,215,364,0,1); + LODOP.ADD_PRINT_TEXT(135,141,120,25,printData.unitQty + printData.umid); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(217,243,130,20,"Vendor I.D.:"+printData.siteName); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",7); + LODOP.ADD_PRINT_TEXT(228,18,348,30,printData.siteAdress); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",7); + LODOP.ADD_PRINT_TEXT(250,18,351,20,printData.sitePhone); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",7); + LODOP.ADD_PRINT_TEXT(41,18,143,25,"Product Code:"); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + LODOP.ADD_PRINT_TEXT(113,229,144,26,"Job No:"+printData.seqNo); + LODOP.SET_PRINT_STYLEA(0,"FontName","Arial"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",12); + LODOP.SET_PRINT_STYLEA(0,"Alignment",3); + LODOP.SET_PRINT_STYLEA(0,"Bold",1); + if(printData.code=='CODE128') { + LODOP.ADD_PRINT_BARCODE(40,143,236,23, "128A",printData.partSpec); + }else { + LODOP.ADD_PRINT_BARCODE(40,143,236,23, "Code39",printData.partSpec); + } + LODOP.SET_PRINT_STYLEA(0,"ShowBarText",0); + // LODOP.ADD_PRINT_IMAGE(4,18,114,31,""); + LODOP.ADD_PRINT_IMAGE(4,18,114,31,``); + // LODOP.ADD_PRINT_IMAGE(4,18,114,31,``); + LODOP.SET_PRINT_STYLEA(0,"Stretch",1); + } + + // LODOP.PRINT_DESIGN(); + LODOP.PREVIEW(); + // LODOP.PRINT(); + console.log("操作成功!") + } +} + diff --git a/src/views/modules/print/print_package_label-NOOREVIEW.js b/src/views/modules/print/print_package_label-NOOREVIEW.js index 832ea74..cfa11d4 100644 --- a/src/views/modules/print/print_package_label-NOOREVIEW.js +++ b/src/views/modules/print/print_package_label-NOOREVIEW.js @@ -111,7 +111,7 @@ export function printPackageLabelNoPreview(printList) { } // LODOP.PRINT_DESIGN(); - // LODOP.PREVIEW();v + // LODOP.PREVIEW(); LODOP.PRINT(); console.log("操作成功!") } diff --git a/src/views/modules/production/bagLabelsTCP.vue b/src/views/modules/production/bagLabelsTCP.vue new file mode 100644 index 0000000..2a3c568 --- /dev/null +++ b/src/views/modules/production/bagLabelsTCP.vue @@ -0,0 +1,455 @@ + + + + + diff --git a/src/views/modules/production/inspect.vue b/src/views/modules/production/inspect.vue index 22a1bc8..35c2586 100644 --- a/src/views/modules/production/inspect.vue +++ b/src/views/modules/production/inspect.vue @@ -18,6 +18,7 @@ +