From 24aca104ad7f7d97d4514d8730cd090af2bf1143 Mon Sep 17 00:00:00 2001 From: zlwu Date: Sat, 5 Sep 2026 17:10:47 +0800 Subject: [PATCH] feat(bx): add apply-attachment upload UI on reimburse apply dialog Co-authored-by: Cursor --- .../src/views/bx/reimburse/apply/index.vue | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/web-admin/src/views/bx/reimburse/apply/index.vue b/web-admin/src/views/bx/reimburse/apply/index.vue index 405c809e3..3ee6904b3 100644 --- a/web-admin/src/views/bx/reimburse/apply/index.vue +++ b/web-admin/src/views/bx/reimburse/apply/index.vue @@ -551,6 +551,17 @@ +
+

申请附件(可选)

+ +
+ @@ -859,6 +870,7 @@ import BxApprovalFlowTabs from '@/components/bx/base/BxApprovalFlowTabs.vue' import BxViewKvGrid from '@/components/bx/base/BxViewKvGrid.vue' import BxViewKvTable from '@/components/bx/base/BxViewKvTable.vue' import BxAttachmentReadonly from '@/components/bx/base/BxAttachmentReadonly.vue' +import BxAttachmentUpload from '@/components/bx/base/BxAttachmentUpload.vue' import BxInvoiceSelectDialog from '@/components/bx/base/BxInvoiceSelectDialog.vue' import type { ViewField } from '@/components/business/system-view-dialog/types' import { bxViewKv, bxViewKvLong, bxViewKvMoney } from '@/utils/bx/view-kv' @@ -1120,6 +1132,8 @@ type SelectedInvoicePick = { } const selectedInvoicePicks = ref([]) +const applyAttachmentRef = ref | null>(null) +const applyAttachments = ref([]) const invoiceSelectVisible = ref(false) const walletBalance = ref(0) const editingId = ref(null) @@ -1325,6 +1339,7 @@ async function openAddDialog() { addForm.remark = '' addForm.details = [{ expenseItemId: '', amount: '', remark: '', occurDate: '' }] selectedInvoicePicks.value = [] + applyAttachments.value = [] editingId.value = null titleAutoLinked.value = true dialogs.add = true @@ -1422,7 +1437,14 @@ async function openEditDialog(row: any) { await Promise.all([ loadApplicantOptions(), refreshWalletBalance(), - loadSelectedPicksFromInvoices(invoices) + loadSelectedPicksFromInvoices(invoices), + loadBxAttachments('reimburse_apply', row.id) + .then((files) => { + applyAttachments.value = files + }) + .catch(() => { + applyAttachments.value = [] + }) ]) } catch (e: any) { ElMessage.error(e.message || '加载失败') @@ -1671,6 +1693,7 @@ function resetAddForm() { addForm.remark = '' addForm.details = [{ expenseItemId: '', amount: '', remark: '', occurDate: '' }] selectedInvoicePicks.value = [] + applyAttachments.value = [] editingId.value = null }