From 4f4776073ecd124e2e7879ca7594abca69690646 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Wed, 13 May 2026 15:29:43 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E7=94=9F=E6=88=90=E5=9B=BE=E7=89=87?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 8 ++++----
src/views/wallet/wallet-recharge-invoice/index.vue | 6 ++++++
.../wallet/wallet-recharge-invoice/print-dialog.vue | 13 +++++++++++--
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/.env.development b/.env.development
index 726b6ea..6549a56 100644
--- a/.env.development
+++ b/.env.development
@@ -11,15 +11,15 @@ ENV = 'development'
# VITE_ADMIN_PROXY_PATH = http://123.157.250.162:8089/api/ # 测试线上
# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期
# VITE_ADMIN_PROXY_PATH = http://localhost:9999/
-VITE_ADMIN_PROXY_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
-# VITE_ADMIN_PROXY_PATH = https://stgl.pj.gov.cn/api # 正式环境线上
+# VITE_ADMIN_PROXY_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
+VITE_ADMIN_PROXY_PATH = https://stgl.pj.gov.cn/api # 正式环境线上
# 图片访问基础地址
# VITE_IMAGE_BASE_PATH = http://123.157.250.162:8089/api/ # 测试线上
# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期
# VITE_IMAGE_BASE_PATH = http://localhost:9999
-VITE_IMAGE_BASE_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
-# VITE_IMAGE_BASE_PATH = https://stgl.pj.gov.cn/api/ # 正式环境线上
+# VITE_IMAGE_BASE_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
+VITE_IMAGE_BASE_PATH = https://stgl.pj.gov.cn/api/ # 正式环境线上
# 代码生成服务地址
VITE_GEN_PROXY_PATH = http://192.168.110.156:5003
diff --git a/src/views/wallet/wallet-recharge-invoice/index.vue b/src/views/wallet/wallet-recharge-invoice/index.vue
index 4775841..06d093d 100644
--- a/src/views/wallet/wallet-recharge-invoice/index.vue
+++ b/src/views/wallet/wallet-recharge-invoice/index.vue
@@ -86,6 +86,12 @@
:downloadName="`${row.code}-${row.deptOrUser}-${row.payeeDept}-发票-${row.updateTime}`" />
+
+
+
+
+
diff --git a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue
index 6c27221..9f2f20e 100644
--- a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue
+++ b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue
@@ -247,6 +247,13 @@ const waitForFrames = async (count: number) => {
}
}
+const captureFilter = (node: Node) => {
+ if (!(node instanceof HTMLElement)) return true
+ if (node.classList.contains("el-loading-mask")) return false
+ if (node.classList.contains("el-loading-spinner")) return false
+ return true
+}
+
const withReceiptCaptureStyle = async (fn: () => Promise) => {
const el = receiptRef.value
if (!el) return fn()
@@ -278,8 +285,9 @@ const genImage = async (): Promise => {
return await htmlToImage.toBlob(receiptRef.value!, {
canvasWidth: 661.5,
canvasHeight: 359.1,
- backgroundColor: "transparent",
+ backgroundColor: "#ffffff",
pixelRatio: 3,
+ filter: captureFilter,
})
}).catch((error) => {
console.error(error)
@@ -374,7 +382,8 @@ const handlePrint = async () => {
canvasWidth: 661.5,
canvasHeight: 359.1,
pixelRatio: 4,
- backgroundColor: "transparent",
+ backgroundColor: "#ffffff",
+ filter: captureFilter,
})
})
printJS({ printable: pngBase64, type: "image", targetStyles: ["*"], maxWidth: 661.5 })