diff --git a/package.json b/package.json index c9ff9f0..e6cbc51 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "element-plus": "2.5.5", "form-designer-plus": "^0.1.5", "highlight.js": "^11.7.0", + "html-to-image": "^1.11.13", "js-base64": "^3.7.7", "js-cookie": "^3.0.1", "json-editor-vue3": "^1.1.1", @@ -116,4 +117,4 @@ "type": "git", "url": "https://gitee.com/log4j/pig" } -} \ No newline at end of file +} diff --git a/src/views/wallet/wallet-recharge-apply/index.vue b/src/views/wallet/wallet-recharge-apply/index.vue index 294a2ae..7272a5b 100644 --- a/src/views/wallet/wallet-recharge-apply/index.vue +++ b/src/views/wallet/wallet-recharge-apply/index.vue @@ -1,8 +1,7 @@ - + - + - + @@ -160,6 +218,7 @@ 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() @@ -310,9 +369,17 @@ const taskSubmitEvent = () => { } // 预览发票 -const previewInvoice = (row: any) => { - // receiptData.value = row - printDialogVisible.value = true +const previewInvoice = async (row: any) => { + try { + const res = await getInvoice({ id: row.id }) + if (res.code == 0) { + receiptData.value = res.data + printDialogVisible.value = true + return + } + } catch (error: any) { + useMessage().error(error.msg) + } } diff --git a/src/views/wallet/wallet-recharge-apply/print-dialog.vue b/src/views/wallet/wallet-recharge-apply/print-dialog.vue index e7cea8f..86d199a 100644 --- a/src/views/wallet/wallet-recharge-apply/print-dialog.vue +++ b/src/views/wallet/wallet-recharge-apply/print-dialog.vue @@ -1,6 +1,6 @@