+
{{ kpi.value }}{{ kpi.unit }}
{{ kpi.label }}
{{ kpi.meta }}
@@ -301,11 +312,11 @@
-
-
+
diff --git a/web/src/data/personalWorkbench.js b/web/src/data/personalWorkbench.js
index 0d47a55..c5c6a57 100644
--- a/web/src/data/personalWorkbench.js
+++ b/web/src/data/personalWorkbench.js
@@ -196,42 +196,48 @@ export function buildExpenseStatItems(summary = {}) {
label: '本月报销笔数',
value: summary.monthlyCount ?? 0,
unit: '笔',
- tone: 'primary'
+ tone: 'primary',
+ icon: 'mdi mdi-text-box-check-outline'
},
{
key: 'monthly-amount',
label: '本月报销金额',
value: summary.monthlyAmountLabel || '¥0',
unit: '',
- tone: 'amount'
+ tone: 'amount',
+ icon: 'mdi mdi-cash-multiple'
},
{
key: 'total-count',
label: '累计报销笔数',
value: summary.totalCount ?? 0,
unit: '笔',
- tone: 'muted'
+ tone: 'muted',
+ icon: 'mdi mdi-clipboard-text-outline'
},
{
key: 'total-amount',
label: '累计报销金额',
value: summary.totalAmountLabel || '¥0',
unit: '',
- tone: 'amount'
+ tone: 'amount',
+ icon: 'mdi mdi-bank-outline'
},
{
key: 'in-review',
label: '审批中单据',
value: summary.inReviewCount ?? 0,
unit: '笔',
- tone: 'warning'
+ tone: 'warning',
+ icon: 'mdi mdi-timer-sand'
},
{
key: 'pending-payment',
label: '待付款单据',
value: summary.pendingPaymentCount ?? 0,
unit: '笔',
- tone: 'info'
+ tone: 'info',
+ icon: 'mdi mdi-credit-card-outline'
}
]
}
diff --git a/web/src/utils/workbenchSummary.js b/web/src/utils/workbenchSummary.js
index 50b08cd..795bdb2 100644
--- a/web/src/utils/workbenchSummary.js
+++ b/web/src/utils/workbenchSummary.js
@@ -194,10 +194,11 @@ function buildTodoItems(ownedRequests) {
.sort((left, right) => normalizeText(right.due).localeCompare(normalizeText(left.due)))
}
-function resolveProgressStatusTone(approvalKey) {
- if (approvalKey === 'completed') return 'muted'
- if (approvalKey === 'pending_payment') return 'warning'
- if (approvalKey === 'supplement' || approvalKey === 'rejected') return 'danger'
+function resolveProgressStatusTone(approvalKey, statusText = '') {
+ const status = String(statusText || '').trim()
+ if (approvalKey === 'completed' || /完成|结束|通过/i.test(status)) return 'muted'
+ if (approvalKey === 'pending_payment' || /付款|支付/i.test(status)) return 'warning'
+ if (approvalKey === 'supplement' || approvalKey === 'rejected' || /退回|驳回|修改/i.test(status)) return 'danger'
return 'success'
}
@@ -243,14 +244,15 @@ function buildProgressItems(ownedRequests) {
const currentStep = steps.find((step) => step.current)
const title = normalizeText(request?.title || request?.note || request?.sceneLabel) || '费用单据'
+ const status = normalizeText(request?.approvalStatus || currentStep?.label) || '处理中'
return {
id: requestId,
requestId,
title,
expenseTypeLabel: resolveExpenseCategory(request),
amount: formatCurrency(request?.amount),
- status: normalizeText(request?.approvalStatus || currentStep?.label) || '处理中',
- statusTone: resolveProgressStatusTone(normalizeText(request?.approvalKey)),
+ status,
+ statusTone: resolveProgressStatusTone(normalizeText(request?.approvalKey), status),
updatedAt: normalizeText(request?.updatedAt || request?.submittedAt || request?.createdAt),
steps,
target: resolveRequestTarget(request),
@@ -391,12 +393,14 @@ function buildExpenseProcessingRows(ownedRequests) {
const latestAt = dates[dates.length - 1] || toDate(request?.updatedAt || request?.submittedAt || request?.createdAt)
const stepCount = Array.isArray(request?.progressSteps) ? request.progressSteps.length : 0
+ const status = normalizeText(request?.approvalStatus || request?.status) || '处理中'
+
return {
id: requestId || title,
requestId,
title,
- status: normalizeText(request?.approvalStatus || request?.status) || '处理中',
- statusTone: resolveProgressStatusTone(normalizeText(request?.approvalKey)),
+ status,
+ statusTone: resolveProgressStatusTone(normalizeText(request?.approvalKey), status),
startedAt: startedAt ? formatDateTimeLabel(startedAt) : '暂无开始时间',
updatedAt: latestAt ? formatDateTimeLabel(latestAt) : '暂无更新时间',
durationLabel: startedAt && latestAt ? formatDurationLabel(latestAt.getTime() - startedAt.getTime()) : '暂无耗时',
diff --git a/web/tests/receipt-folder-view.test.mjs b/web/tests/receipt-folder-view.test.mjs
index b3aa9c4..537f252 100644
--- a/web/tests/receipt-folder-view.test.mjs
+++ b/web/tests/receipt-folder-view.test.mjs
@@ -127,6 +127,7 @@ function testReceiptFolderDetailLayoutAdjustments() {
assert.match(receiptStyles, /\.receipt-association-panel/)
assert.match(receiptStyles, /\.receipt-preview-box[\s\S]*height: clamp\(380px, 56vh, 640px\)/)
assert.match(receiptStyles, /\.receipt-all-field-grid/)
+ assert.match(receiptStyles, /\.receipt-all-field-grid[\s\S]*grid-template-columns: repeat\(auto-fit, minmax\(260px, 1fr\)\)/)
assert.match(receiptStyles, /\.receipt-edit-log-list/)
assert.doesNotMatch(receiptStyles, /\.receipt-detail-toolbar/)
assert.doesNotMatch(receiptStyles, /\.receipt-side-stack/)