This commit is contained in:
weiwei committed 2025-06-25 17:32:29 +08:00
1 parent f19a5954c6
commit fbe0ffc6ac
3 files changed
+7 -10

No files matched your search

@@ -185,7 +185,7 @@
<upload-excel <upload-excel
ref="uploadExcelRef" ref="uploadExcelRef"
title="用户信息导入" title="充值导入"
url="/wallet/wallet-recharge-apply/read-excel" url="/wallet/wallet-recharge-apply/read-excel"
temp-url="/admin/sys-file/local/file/wallet_recharge.xlsx" temp-url="/admin/sys-file/local/file/wallet_recharge.xlsx"
@refreshDataList="getDataList(false)" @refreshDataList="getDataList(false)"
@@ -94,7 +94,7 @@ import { useMessage, useMessageBox } from "/@/hooks/message"
import { displayPrice } from "/@/utils/formatMoney" import { displayPrice } from "/@/utils/formatMoney"
import { parseTime } from "/@/utils/formatTime" import { parseTime } from "/@/utils/formatTime"
import { useDict } from "/@/hooks/dict" import { useDict } from "/@/hooks/dict"
import { getInvoice } from "/@/api/wallet/wallet-recharge-invoice" import { getObj } from "/@/api/wallet/wallet-recharge-invoice"
// 引入组件 // 引入组件
const FormDialog = defineAsyncComponent(() => import("./form.vue")) const FormDialog = defineAsyncComponent(() => import("./form.vue"))
@@ -162,7 +162,8 @@ const handleDelete = async (ids: string[]) => {
const previewInvoice = async (row: any) => { const previewInvoice = async (row: any) => {
try { try {
getReceiptDataLoading.value = true getReceiptDataLoading.value = true
const res = await getInvoice({ id: row.id }) if (!row.id) return useMessage().error("发票ID不存在")
const res = await getObj(row.id)
if (res.code == 0 && printDialogRef.value) return printDialogRef.value.openDialog(res.data, res.data.id) if (res.code == 0 && printDialogRef.value) return printDialogRef.value.openDialog(res.data, res.data.id)
return useMessage().error(res.data.msg || "获取发票信息失败") return useMessage().error(res.data.msg || "获取发票信息失败")
} catch (error: any) { } catch (error: any) {
@@ -99,7 +99,6 @@
<template #footer> <template #footer>
<el-button @click="handleClose">关闭</el-button> <el-button @click="handleClose">关闭</el-button>
<el-button type="primary" @click="stampReceipt" :disabled="loading">盖章</el-button>
<el-button type="primary" @click="saveReceipt" :disabled="loading">保存</el-button> <el-button type="primary" @click="saveReceipt" :disabled="loading">保存</el-button>
<el-button type="primary" @click="handlePrint" :disabled="loading">打印</el-button> <el-button type="primary" @click="handlePrint" :disabled="loading">打印</el-button>
</template> </template>
@@ -232,9 +231,6 @@ const saveReceipt = async () => {
} }
} }
// 发票盖章
const stampReceipt = () => {}
// 打印 // 打印
const handlePrint = async () => { const handlePrint = async () => {
if (receiptRef.value) { if (receiptRef.value) {
@@ -269,15 +265,15 @@ defineExpose({
} }
.stamping { .stamping {
animation: stamp-in 0.8s; animation: stamp-in 1s;
} }
@keyframes stamp-in { @keyframes stamp-in {
0% { 0% {
transform: translateY(80px) scale(1.5) rotate(0); transform: translateY(80px) scale(1.5) rotate(0);
opacity: 0.2; opacity: 0.2;
} }
60% { 80% {
transform: translateY(10px) scale(1.3) rotate(0); transform: translateY(10px) scale(1.4) rotate(0);
opacity: 1; opacity: 1;
} }
100% { 100% {