WF8-10 移动审批展示处理历史
这个提交包含在:
@@ -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">
|
||||
当前任务已处理,仅供查看,不支持再次审批。
|
||||
|
||||
在新工单中引用
屏蔽一个用户