WF8-10 移动审批展示处理历史

这个提交包含在:
2026-05-13 20:39:46 +08:00
父节点 0692a48e63
当前提交 25c438aa7a
共修改 3 个文件,包含 71 行新增和 2 行删除
+41
查看文件
@@ -143,6 +143,27 @@ function workflowStatusLabel(status: string) {
return status;
}
function workflowActionLabel(action: string | null | undefined) {
if (!action) {
return "-";
}
const labels: Record<string, string> = {
submit: "提交",
approve: "通过",
reject: "驳回",
return: "退回",
transfer: "转审",
withdraw: "撤回",
remind: "催办",
overdue_remind: "超时提醒",
cancel: "取消",
skip: "跳过",
};
return labels[action] ?? action;
}
function businessStatusLabel(status: string | null | undefined) {
const labels: Record<string, string> = {
draft: "草稿",
@@ -1322,6 +1343,26 @@ export function MobileApprovalsPage() {
) : null}
</div>
<div className="space-y-2" data-testid="mobile-approvals-history">
<div className="flex items-center justify-between gap-3">
<h4 className="text-sm font-semibold text-zinc-900">处理历史</h4>
<span className="text-xs text-zinc-500">{selectedTask.history.length} 条</span>
</div>
{selectedTask.history.length ? (
selectedTask.history.map((item) => (
<article className="mobile-list-card text-sm" data-testid="mobile-approvals-history-item" key={item.id}>
<div className="font-medium text-zinc-900">
{workflowActionLabel(item.action)} · {item.actorName || item.actorEmployeeNo || item.actorId}
</div>
<div className="mt-1 text-zinc-600">{item.comment || "-"}</div>
<div className="mt-1 text-xs text-zinc-500">{formatDateTime(item.createdAt)}</div>
</article>
))
) : (
<p className="text-sm text-zinc-500">暂无历史记录</p>
)}
</div>
{!selectedTaskAllowsActions ? (
<p className="rounded-lg border border-zinc-200 bg-zinc-50 px-3 py-2 text-sm text-zinc-600">
当前任务已处理,仅供查看,不支持再次审批。