fix(oa-board): allow historical overtime followup editing

This commit is contained in:
jingchuan 2026-08-05 10:44:55 +08:00
parent d531a62361
commit 317eaa8655

View File

@ -1787,46 +1787,11 @@ function TimeoutFollowupInspector({
</section>
{isHistoricalStage ? (
<section className="mt-6 border border-apple-separator bg-[#fafbfc] p-4">
<p className="text-xs text-apple-label-secondary">
该阶段已离开当前节点,因此只作为历史超时保留,不会再触发钉钉待办。
{selectedFollowup ? ' 以下为已保存的历史跟进内容。' : ' 该阶段尚未填写历史跟进记录。'}
</p>
<dl className="mt-4 grid gap-4 sm:grid-cols-2">
<div>
<dt className="text-[11px] font-apple-medium text-apple-label-secondary">跟进状态</dt>
<dd className="mt-1"><StatusBadge label={getTimeoutFollowupStatusLabel(selectedFollowup?.status ?? 'PENDING')} tone="default" /></dd>
</div>
<div>
<dt className="text-[11px] font-apple-medium text-apple-label-secondary">跟进负责人</dt>
<dd className="mt-1 text-sm text-apple-label-primary">{formatCellText(selectedFollowup?.followUpOwner)}</dd>
</div>
<div>
<dt className="text-[11px] font-apple-medium text-apple-label-secondary">预计完成日期</dt>
<dd className={`mt-1 text-sm ${selectedFollowupDeadlineStatus ? 'font-apple-semibold text-rose-700' : 'text-apple-label-primary'}`}>
{formatCellText(selectedFollowup?.expectedResolveDate)}
{selectedFollowupDeadlineStatus ? (
<span className="ml-2 text-xs">{getFollowupDeadlineLabel(selectedFollowupDeadlineStatus)}</span>
) : null}
</dd>
</div>
</dl>
<div className="mt-5 border-t border-apple-separator pt-4">
<p className="text-[11px] font-apple-medium text-apple-label-secondary">超时原因说明</p>
<p className="mt-1 whitespace-pre-wrap text-sm leading-6 text-apple-label-primary">{formatCellText(selectedFollowup?.reasonDetail)}</p>
</div>
<div className="mt-5 border-t border-apple-separator pt-4">
<p className="text-[11px] font-apple-medium text-apple-label-secondary">解决措施</p>
<p className="mt-1 whitespace-pre-wrap text-sm leading-6 text-apple-label-primary">{formatCellText(selectedFollowup?.actionPlan)}</p>
</div>
{selectedFollowup?.updatedAt ? (
<p className="mt-4 text-[11px] text-apple-label-secondary">
最近更新:{formatCellText(selectedFollowup.updatedBy)} · {selectedFollowup.updatedAt.replace('T', ' ').slice(0, 16)}
</p>
) : null}
</section>
) : (
<>
<div className="mt-5 border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800">
历史超时跟进仅用于复盘,不会触发钉钉超时待办或计入当前超时。
</div>
) : null}
<>
<div className="mt-6 grid gap-4 sm:grid-cols-2">
<FilterSelect
label="跟进状态"
@ -1887,8 +1852,7 @@ function TimeoutFollowupInspector({
</p>
) : null}
{errorMessage ? <p className="mt-4 text-xs text-rose-700">{errorMessage}</p> : null}
</>
)}
</>
</div>
<footer className="flex shrink-0 items-center justify-end gap-3 border-t border-apple-separator px-6 py-4">
@ -1899,17 +1863,15 @@ function TimeoutFollowupInspector({
>
关闭
</button>
{!isHistoricalStage ? (
<button
type="button"
disabled={isSaving}
onClick={() => void handleSave()}
className={`inline-flex h-9 items-center gap-2 rounded-apple-md border px-4 text-sm font-apple-semibold transition ${WORKBENCH_PRIMARY_BUTTON_CLASS}`}
>
{isSaving ? <LoaderCircle className="h-4 w-4 animate-spin" /> : null}
{dirtyEntries.length > 1 ? `保存 ${dirtyEntries.length} 个节点` : '保存跟进'}
</button>
) : null}
<button
type="button"
disabled={isSaving}
onClick={() => void handleSave()}
className={`inline-flex h-9 items-center gap-2 rounded-apple-md border px-4 text-sm font-apple-semibold transition ${WORKBENCH_PRIMARY_BUTTON_CLASS}`}
>
{isSaving ? <LoaderCircle className="h-4 w-4 animate-spin" /> : null}
{dirtyEntries.length > 1 ? `保存 ${dirtyEntries.length} 个节点` : '保存跟进'}
</button>
</footer>
</section>
</div>