This commit is contained in:
zlwu committed 2026-08-01 22:49:11 +08:00
1 parent e59b2aa6cb
commit eccefc6650
63 files changed
+13267 -11330

No files matched your search

+49 -1
View File
@@ -250,6 +250,27 @@
<h4 class="dlg-view-section-title">关联发票</h4>
<BxAttachmentReadonly :files="viewLinkedInvoiceFiles" />
</div>
<div
v-if="currentRow?.bizType === '报销单' && viewAttachments.length"
class="dlg-view-section"
>
<h4 class="dlg-view-section-title">历史附件</h4>
<BxAttachmentReadonly :files="viewAttachments" />
</div>
<div
v-if="currentRow?.bizType === '报销单' && viewPayAttachments.length"
class="dlg-view-section"
>
<h4 class="dlg-view-section-title">发放附件</h4>
<BxAttachmentReadonly :files="viewPayAttachments" />
</div>
<div
v-if="currentRow?.bizType === '报销单' && viewOffsetAttachments.length"
class="dlg-view-section"
>
<h4 class="dlg-view-section-title">冲抵附件</h4>
<BxAttachmentReadonly :files="viewOffsetAttachments" />
</div>
<BxApprovalFlowTabs
:nodes="viewFlowNodes"
:history="viewApprovalHistory"
@@ -285,7 +306,7 @@ import BxViewKvTable from '@/components/bx/base/BxViewKvTable.vue'
import BxAttachmentReadonly from '@/components/bx/base/BxAttachmentReadonly.vue'
import type { ViewField } from '@/components/business/system-view-dialog/types'
import { bxViewKv, bxViewKvMoney } from '@/utils/bx/view-kv'
import type { BxAttachmentItem } from '@/utils/bx/attachment'
import { type BxAttachmentItem, loadBxAttachments } from '@/utils/bx/attachment'
import { invoicesToLinkedAttachmentFiles } from '@/utils/bx/invoice-link-files'
import { matchesApplyDateRange, type ApplyDateRange } from '@/utils/bx/apply-date-filter'
import { usePagedTable } from '@/hooks/bx/usePagedTable'
@@ -429,6 +450,9 @@ const viewFlowNodes = ref<any[]>([])
const viewApprovalHistory = ref<any[]>([])
const viewFlowLoading = ref(false)
const viewLinkedInvoiceFiles = ref<BxAttachmentItem[]>([])
const viewAttachments = ref<BxAttachmentItem[]>([])
const viewPayAttachments = ref<BxAttachmentItem[]>([])
const viewOffsetAttachments = ref<BxAttachmentItem[]>([])
const bizTypeOptions = ['全部', '报销单', '备用金']
const statusOptions = ['全部', '待提交', '审批中', '审批通过', '审批驳回', '已发放']
@@ -535,6 +559,9 @@ async function openViewDetail(row: any) {
viewFlowNodes.value = []
viewApprovalHistory.value = []
viewLinkedInvoiceFiles.value = []
viewAttachments.value = []
viewPayAttachments.value = []
viewOffsetAttachments.value = []
viewFlowLoading.value = true
dialogs.viewDetail = true
try {
@@ -553,6 +580,27 @@ async function openViewDetail(row: any) {
})
.catch(() => {
viewLinkedInvoiceFiles.value = []
}),
loadBxAttachments('reimburse_apply', row.id)
.then((files) => {
viewAttachments.value = files
})
.catch(() => {
viewAttachments.value = []
}),
loadBxAttachments('reimburse_pay', row.id)
.then((files) => {
viewPayAttachments.value = files
})
.catch(() => {
viewPayAttachments.value = []
}),
loadBxAttachments('reimburse_offset', row.id)
.then((files) => {
viewOffsetAttachments.value = files
})
.catch(() => {
viewOffsetAttachments.value = []
})
)
}
+49 -1
View File
@@ -234,6 +234,27 @@
<h4 class="dlg-view-section-title">关联发票</h4>
<BxAttachmentReadonly :files="viewLinkedInvoiceFiles" />
</div>
<div
v-if="currentRow?.bizType === '报销单' && viewAttachments.length"
class="dlg-view-section"
>
<h4 class="dlg-view-section-title">历史附件</h4>
<BxAttachmentReadonly :files="viewAttachments" />
</div>
<div
v-if="currentRow?.bizType === '报销单' && viewPayAttachments.length"
class="dlg-view-section"
>
<h4 class="dlg-view-section-title">发放附件</h4>
<BxAttachmentReadonly :files="viewPayAttachments" />
</div>
<div
v-if="currentRow?.bizType === '报销单' && viewOffsetAttachments.length"
class="dlg-view-section"
>
<h4 class="dlg-view-section-title">冲抵附件</h4>
<BxAttachmentReadonly :files="viewOffsetAttachments" />
</div>
<BxApprovalFlowTabs
:nodes="viewFlowNodes"
:history="viewApprovalHistory"
@@ -269,7 +290,7 @@ import BxViewKvTable from '@/components/bx/base/BxViewKvTable.vue'
import BxAttachmentReadonly from '@/components/bx/base/BxAttachmentReadonly.vue'
import type { ViewField } from '@/components/business/system-view-dialog/types'
import { bxViewKv, bxViewKvMoney } from '@/utils/bx/view-kv'
import type { BxAttachmentItem } from '@/utils/bx/attachment'
import { type BxAttachmentItem, loadBxAttachments } from '@/utils/bx/attachment'
import { invoicesToLinkedAttachmentFiles } from '@/utils/bx/invoice-link-files'
import { buildApplyDateRangeQuery, matchesApplyDateRange, type ApplyDateRange } from '@/utils/bx/apply-date-filter'
import { usePagedTable } from '@/hooks/bx/usePagedTable'
@@ -379,6 +400,9 @@ const viewFlowNodes = ref<any[]>([])
const viewApprovalHistory = ref<any[]>([])
const viewFlowLoading = ref(false)
const viewLinkedInvoiceFiles = ref<BxAttachmentItem[]>([])
const viewAttachments = ref<BxAttachmentItem[]>([])
const viewPayAttachments = ref<BxAttachmentItem[]>([])
const viewOffsetAttachments = ref<BxAttachmentItem[]>([])
function buildApiQuery() {
const q: Record<string, string> = {}
@@ -493,6 +517,9 @@ async function openViewDetail(row: any) {
viewFlowNodes.value = []
viewApprovalHistory.value = []
viewLinkedInvoiceFiles.value = []
viewAttachments.value = []
viewPayAttachments.value = []
viewOffsetAttachments.value = []
viewFlowLoading.value = true
dialogs.viewDetail = true
try {
@@ -511,6 +538,27 @@ async function openViewDetail(row: any) {
})
.catch(() => {
viewLinkedInvoiceFiles.value = []
}),
loadBxAttachments('reimburse_apply', row.id)
.then((files) => {
viewAttachments.value = files
})
.catch(() => {
viewAttachments.value = []
}),
loadBxAttachments('reimburse_pay', row.id)
.then((files) => {
viewPayAttachments.value = files
})
.catch(() => {
viewPayAttachments.value = []
}),
loadBxAttachments('reimburse_offset', row.id)
.then((files) => {
viewOffsetAttachments.value = files
})
.catch(() => {
viewOffsetAttachments.value = []
})
)
}