From 0032fcf6634235d94d3f32c53ed2c628fba0be03 Mon Sep 17 00:00:00 2001 From: weiwei Date: Thu, 26 Jun 2025 11:15:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E7=9B=96=E7=AB=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wallet/wallet-recharge-invoice/index.vue | 2 +- .../wallet-recharge-invoice/print-dialog.vue | 26 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/views/wallet/wallet-recharge-invoice/index.vue b/src/views/wallet/wallet-recharge-invoice/index.vue index 2d9120b..ba72c10 100644 --- a/src/views/wallet/wallet-recharge-invoice/index.vue +++ b/src/views/wallet/wallet-recharge-invoice/index.vue @@ -82,7 +82,7 @@ :loading="getReceiptDataLoading" @click="previewInvoice(row)" > - 打印发票 + 开发票 删除 diff --git a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue index 9a53190..706789e 100644 --- a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue +++ b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue @@ -62,6 +62,7 @@ 收款人
(签名) - + + {{ receiptData.payeeUser }}
@@ -99,8 +101,10 @@ @@ -128,6 +132,7 @@ interface ReceiptData { payeeUser: string remark: string totalPriceCnStr: string + picUrl: string } const visible = ref(false) @@ -136,6 +141,7 @@ const receiptRef = ref(null) const deptOrUserInput = ref(null) const timer = ref(null) const isStamping = ref(false) +const printButtonDisabled = ref(false) const receiptData = ref({ itemJson: "", // 款项json code: "", // 发票代码(七位数) @@ -146,6 +152,7 @@ const receiptData = ref({ payeeDept: "", // 收款单位 payeeUser: "", // 收款人 remark: "", // 备注 + picUrl: "", // 发票图片地址 }) const applyId = ref() const saveProgress = ref(0) @@ -163,12 +170,14 @@ const receiptDataItems = computed(() => { const totalPrice = computed(() => displayPrice(receiptData.value.totalPrice)) const openDialog = (data: ReceiptData, id: any) => { + if (!data.picUrl) { + printButtonDisabled.value = true + } visible.value = true receiptData.value = data applyId.value = id isStamping.value = false setTimeout(() => { - isStamping.value = true deptOrUserInput.value?.focus() }, 50) } @@ -213,6 +222,7 @@ const genImageUpload = async (): Promise => { const saveReceipt = async () => { try { loading.value = true + isStamping.value = false const url = await genImageUpload() if (url) { const { code, data } = await bindInvoice({ @@ -223,6 +233,8 @@ const saveReceipt = async () => { }) saveProgress.value = 100 if (code == 0) { + isStamping.value = true + printButtonDisabled.value = false emit("refresh") return useMessage().success("保存成功") } @@ -274,11 +286,11 @@ defineExpose({ } @keyframes stamp-in { 0% { - transform: translateY(80px) scale(1.5) rotate(0); + transform: translateY(80px) scale(2.5) rotate(0); opacity: 0.2; } - 80% { - transform: translateY(10px) scale(1.4) rotate(0); + 60% { + transform: translateY(10px) scale(2) rotate(0); opacity: 1; } 100% {