From 5e9f38494d1ffc1d5849474a02ebcb0d3dc0212d Mon Sep 17 00:00:00 2001 From: weiwei Date: Wed, 25 Jun 2025 16:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=89=93=E5=8D=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wallet/wallet-recharge-apply/index.vue | 158 ++++++------ .../wallet/wallet-recharge-invoice/index.vue | 224 ++++++++++-------- .../print-dialog.vue | 0 3 files changed, 222 insertions(+), 160 deletions(-) rename src/views/wallet/{wallet-recharge-apply => wallet-recharge-invoice}/print-dialog.vue (100%) diff --git a/src/views/wallet/wallet-recharge-apply/index.vue b/src/views/wallet/wallet-recharge-apply/index.vue index a9a01c1..09cb053 100644 --- a/src/views/wallet/wallet-recharge-apply/index.vue +++ b/src/views/wallet/wallet-recharge-apply/index.vue @@ -1,8 +1,7 @@ - + - + - + - - - @@ -163,13 +205,11 @@ import { ElLoading, ElMessage } from "element-plus" import ProcessDrawer from "/@/components/processDrawer/index.vue" import { getDicts } from "/@/api/admin/dict" import { useUserInfo } from "/@/stores/userInfo" -import { getInvoice } from "/@/api/wallet/wallet-recharge-invoice" const { push } = useRouter() // 引入组件 const FormDialog = defineAsyncComponent(() => import("./form.vue")) -const PrintDialog = defineAsyncComponent(() => import("./print-dialog.vue")) // 定义查询字典 const { wallet_biz_recharge, wallet_type, check_status } = useDict("wallet_biz_recharge", "wallet_type", "check_status") // store @@ -188,8 +228,6 @@ const multiple = ref(true) const activeName = ref() const tabItems = ref([{}]) const processDrawerRef = ref() -const printDialogRef = ref() -const getReceiptDataLoading = ref(false) const state: BasicTableProps = reactive({ queryForm: {}, @@ -305,20 +343,6 @@ const deal = (row: any) => { const taskSubmitEvent = () => { getDataList() } - -// 预览发票 -const previewInvoice = async (row: any) => { - try { - getReceiptDataLoading.value = true - const res = await getInvoice({ id: row.id }) - if (res.code == 0 && printDialogRef.value) return printDialogRef.value.openDialog(res.data, res.data.id) - return useMessage().error(res.data.msg || "获取发票信息失败") - } catch (error: any) { - useMessage().error(error.msg) - } finally { - getReceiptDataLoading.value = false - } -}