From a1a2e90251314f05c4819a8372f869375ef7d926 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 4 Jul 2025 14:54:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E5=BC=B9=E7=AA=97=E5=92=8C?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wallet/wallet-recharge-invoice/index.vue | 8 +++- .../wallet-recharge-invoice/print-dialog.vue | 39 +++++++++++++++---- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/views/wallet/wallet-recharge-invoice/index.vue b/src/views/wallet/wallet-recharge-invoice/index.vue index 5387277..4368223 100644 --- a/src/views/wallet/wallet-recharge-invoice/index.vue +++ b/src/views/wallet/wallet-recharge-invoice/index.vue @@ -59,6 +59,11 @@ + + + @@ -132,8 +138,8 @@ import { formatDate } from "/@/utils/formatTime" import { displayPrice } from "/@/utils/formatMoney" import printJS from "print-js" import { bindInvoice, invoiceBack, getObj, apply } from "/@/api/wallet/wallet-recharge-invoice" - -const emit = defineEmits(["refresh"]) +import ProcessDrawer from "/@/components/processDrawer/index.vue" +import { useDict } from "/@/hooks/dict" interface ReceiptData { id: string @@ -148,13 +154,18 @@ interface ReceiptData { totalPriceCnStr: string picUrl: string processStatus: string | null + processId: string | null } +const emit = defineEmits(["refresh"]) + +const { check_status } = useDict("check_status") const visible = ref(false) const loading = ref(false) -const receiptRef = ref(null) -const deptOrUserInput = ref(null) let timer +const receiptRef = ref(null) +const processDrawerRef = ref() +const deptOrUserInput = ref(null) const isStamping = ref(false) // 盖章动画开关 const receiptData = ref({ id: "", @@ -168,7 +179,8 @@ const receiptData = ref({ payeeUser: "", // 开票人 remark: "", // 备注 picUrl: "", // 发票图片地址 - processStatus: "", + processStatus: "", // 审批状态 + processId: "", // 流程实例id }) const applyId = ref() const receiptDataItems = computed(() => { @@ -311,9 +323,9 @@ const applyStamp = async () => { const picUrl = await uploadImage(blob) if (!picUrl) return useMessage().success("图片上传失败") - const { code } = await apply({ id: receiptData.value.id, picUrl }) + const { code, msg } = await apply({ id: receiptData.value.id, picUrl }) if (code == 0) return useMessage().success("申请成功") - useMessage().error("申请失败") + useMessage().error(msg || "申请失败") } catch (error) { useMessage().error(error as string) } finally { @@ -321,6 +333,17 @@ const applyStamp = async () => { } } +// 盖章执行审批 +const stampApproval = () => { + if (!receiptData.value.processId) return useMessage().info("流程id不存在") + processDrawerRef.value.openProcessDrawer(receiptData.value.processId) +} + +// 审批提交 +const taskSubmitEvent = () => { + emit("refresh") +} + // 打印 const handlePrint = async () => { if (receiptRef.value) {