From 12f3b0853833c331d010d4230b9809484b3c04ed Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Tue, 4 Jun 2024 16:19:30 +0800 Subject: [PATCH] uu --- pages/print/courierNote.vue | 40 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/pages/print/courierNote.vue b/pages/print/courierNote.vue index b946f5f..47f4343 100644 --- a/pages/print/courierNote.vue +++ b/pages/print/courierNote.vue @@ -35,26 +35,22 @@ - 打印配置 - 注意:当打印出来寄件分拨或未端分拨返回为空时,请等待5分钟后再补 打印 - - - 打印联选择 - - - - + + + 打印配置 + + 打印预览 + 注意:当打印出来寄件分拨或未端分拨返回为空时,请等待5分钟后再补 打印 + - @@ -203,10 +199,9 @@ }, async handleSubmit() { - let res = await this.getRealGetWaybillPrintData() - const imageUrl = res?.data?.map(t=> t.imageUrl) || [] + const imgUrls = await this.getPrintImages() this.$refs.curPrint.startPrint({ - imageUrl: imageUrl.filter(v=> !!v), + imageUrl: imgUrls.filter(v=> !!v), paperWidth: 480, }) }, @@ -226,6 +221,17 @@ let res = await apiService.getRealGetWaybillPrintData({ ...param, _loading: true }) return res + }, + async getPrintImages() { + let res = await this.getRealGetWaybillPrintData() + const imgUrls = res?.data?.map(t=> t.imageUrl) || [] + return imgUrls + }, + async handlePreview(){ + const imgUrls = await this.getPrintImages() + uni.previewImage({ + urls: imgUrls + }) } } }