From b4cc60637bfa27edde1becce5e9c1b2a67ccfb5f Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Fri, 29 Dec 2023 16:01:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A7=E6=9E=B6=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goodsShelf/basicdataGoodsShelf.vue | 110 ++++++++++-------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue index 9ed8364a..ca2cfa25 100644 --- a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue +++ b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue @@ -3,33 +3,33 @@
- + - - - + + +
- - - - - - - - -
+ + + + + + + + +
- 搜 索 - 清 空 + 搜 索 + 清 空
@@ -38,7 +38,7 @@
- +
新 增 - +
@@ -350,7 +356,7 @@ -
+
@@ -1357,23 +1363,29 @@ export default { this.$message.warning('请选择至少一条数据'); return; } - getPrintTemplate(this.ids).then(res => { - let templateData = res.data.data; - // let templateData = "res.data.data"; - console.log(templateData); - LODOP.PRINT_INITA('测试预览功能'); - // LODOP.PRINT_INITA("测试预览功能"); - // LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4'); - LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Deli DL-888T'); - LODOP.SET_PRINT_PAGESIZE(2, '210mm', '50mm', ''); - LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1); - // // 设置打印后自动关闭 - LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1); - // // data就是一段html文本 - LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', templateData); - LODOP.PREVIEW(); //预览(预览打印无脚标) + const nodeList = document.querySelectorAll('.printNode > div'); + + // getPrintTemplate(this.ids).then(res => { + // let templateData = res.data.data; + // let templateData = "res.data.data"; + // console.log(templateData); + LODOP.PRINT_INITA('测试预览功能'); + // LODOP.PRINT_INITA("测试预览功能"); + // LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4'); + LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Deli DL-888T'); + LODOP.SET_PRINT_PAGESIZE(2, '210mm', '50mm', ''); + LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1); + + // // 设置打印后自动关闭 + LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1); + // // data就是一段html文本 + nodeList.forEach(val => { + LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', val.innerHTML); + LODOP.NewPage(); }); + LODOP.PREVIEW(); //预览(预览打印无脚标) + // }); }, rowDel(row) { this.$confirm('确定将选择数据删除?', { @@ -1479,17 +1491,15 @@ export default { }, }; -