refactor(前端): 清理 T+ 页面展示细节
详情对话框:异常明细补充后端已支持的范围筛选,执行时间行 在批次未开始时隐藏(原先显示「— → —」);核验结果提示与 页首警告统一 show-icon;删除已声明未消费的 receipt_line_kinds 类型字段(方向信息已在 receipt_kinds 名称内)。 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
b0c599e513
commit
0ca1734523
@ -16,7 +16,6 @@ export interface AuditReport {
|
||||
order_coverage: Record<string, number> | null
|
||||
state_enums: { id: number; code: string; name: string; enum_name: string }[]
|
||||
receipt_kinds: { voucher_type_name: string; row_count: number }[]
|
||||
receipt_line_kinds: { voucher_type_name: string | null; receive_flag: number; row_count: number }[]
|
||||
pending_confirmations: { key: string; title: string; reason: string }[]
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ const rows = computed(() => Object.entries(props.report.sales_links ?? {}).map((
|
||||
<template>
|
||||
<section class="audit-result" aria-label="关联核验结果">
|
||||
<p class="audit-caption">核验于 {{ formatDateTime(report.captured_at) }} · 源引擎 {{ report.source_version }}</p>
|
||||
<el-alert type="warning" :closable="false" title="SQL Server 2008 R2 同版本验收待完成;关联存在不代表业务口径已确认。" />
|
||||
<el-alert type="warning" :closable="false" show-icon title="SQL Server 2008 R2 同版本验收待完成;关联存在不代表业务口径已确认。" />
|
||||
<p v-if="report.relationship_status !== 'OBSERVED'" role="alert">单据类型未能唯一确认,关联统计未执行。</p>
|
||||
<el-table v-if="rows.length" :data="rows" size="small" class="audit-table">
|
||||
<el-table-column prop="label" label="核验项目" min-width="190" />
|
||||
|
||||
@ -12,9 +12,13 @@ const number = defineModel<string | null>({ required: true })
|
||||
const detail = ref<api.TPlusDetail | null>(null)
|
||||
const loading = ref(false)
|
||||
const failed = ref(false)
|
||||
const errorEntityType = ref<api.EntityType>()
|
||||
let sequence = 0
|
||||
const { records, total, pageNum, pageSize, loading: errorsLoading, search, onPageChange, onSizeChange } =
|
||||
usePagedList<api.TPlusError, api.ErrorQuery>((query) => api.listErrors(number.value!, query), () => ({}))
|
||||
usePagedList<api.TPlusError, api.ErrorQuery>(
|
||||
(query) => api.listErrors(number.value!, query),
|
||||
() => ({ entity_type: errorEntityType.value }),
|
||||
)
|
||||
|
||||
async function load(): Promise<void> {
|
||||
const current = ++sequence
|
||||
@ -46,7 +50,7 @@ watch(number, (value) => { if (value) void load(); else sequence++ })
|
||||
<el-descriptions-item label="状态">{{ statuses[detail.status] }}</el-descriptions-item>
|
||||
<el-descriptions-item label="范围">{{ scopeLabel(detail) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ formatDateTime(detail.create_time) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="执行时间">{{ formatDateTime(detail.started_at) }} → {{ formatDateTime(detail.finished_at) }}</el-descriptions-item>
|
||||
<el-descriptions-item v-if="detail.started_at" label="执行时间">{{ formatDateTime(detail.started_at) }} → {{ formatDateTime(detail.finished_at) }}</el-descriptions-item>
|
||||
<el-descriptions-item v-if="detail.parent_batch_no" label="原批次">{{ detail.parent_batch_no }}</el-descriptions-item>
|
||||
<el-descriptions-item label="数量">源记录 {{ detail.source_record_count.toLocaleString() }},新增 {{ detail.staged_record_count.toLocaleString() }},重复跳过 {{ detail.skipped_record_count.toLocaleString() }},异常 {{ detail.failed_record_count.toLocaleString() }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@ -55,6 +59,9 @@ watch(number, (value) => { if (value) void load(); else sequence++ })
|
||||
<AuditResult v-if="detail.audit_result" :report="detail.audit_result" />
|
||||
<section v-if="detail.failed_record_count" class="errors-section" aria-label="异常明细">
|
||||
<h3>异常明细</h3>
|
||||
<el-select v-model="errorEntityType" clearable placeholder="全部范围" aria-label="异常范围" @change="search">
|
||||
<el-option v-for="item in entities" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-table v-loading="errorsLoading" :data="records" empty-text="暂无异常记录">
|
||||
<el-table-column label="范围" width="100"><template #default="{ row }">{{ entities.find((item) => item.value === row.entity_type)?.label ?? '任务' }}</template></el-table-column>
|
||||
<el-table-column prop="source_id" label="源 ID" width="90" />
|
||||
@ -73,6 +80,7 @@ watch(number, (value) => { if (value) void load(); else sequence++ })
|
||||
.detail-body { min-height: 120px; }
|
||||
.batch-number { overflow-wrap: anywhere; }
|
||||
.errors-section { margin-top: 24px; }
|
||||
.errors-section .el-select { width: 160px; margin-bottom: 12px; }
|
||||
h3 { font-size: 14px; }
|
||||
.pager-scroll { overflow-x: auto; }
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user