feat(08-05-contract-detail-workspace): 完成合同详情与终止状态治理

这个提交包含在:
2026-08-08 02:02:52 +08:00
父节点 7546d372d6
当前提交 21851774dd
共修改 25 个文件,包含 2516 行新增和 1021 行删除
@@ -0,0 +1,53 @@
import type {
ContractRegistryStatus,
ContractRegistryType,
} from "../../api/contractsRegistry";
import type { ConfidentialityLevel } from "../../api/projects";
export const CONTRACT_TYPE_OPTIONS: ContractRegistryType[] = [
"purchase",
"sales",
"service",
"framework",
"other",
];
export const CONTRACT_FILTER_STATUS_OPTIONS: Array<{ value: ContractRegistryStatus; label: string }> = [
{ value: "active", label: "生效中" },
{ value: "expired", label: "已过期" },
{ value: "draft", label: "草稿" },
{ value: "terminated", label: "已终止" },
{ value: "archived", label: "已归档" },
];
export function contractTypeLabel(value: ContractRegistryType) {
if (value === "purchase") return "采购合同";
if (value === "sales") return "销售合同";
if (value === "service") return "服务合同";
if (value === "framework") return "框架协议";
return "其他";
}
export function contractStatusLabel(value: string | null | undefined) {
if (value === "active") return "生效中";
if (value === "expired") return "已过期";
if (value === "draft") return "草稿";
if (value === "terminated") return "已终止";
if (value === "archived") return "已归档";
return "未知状态";
}
export function confidentialityLabel(value: ConfidentialityLevel) {
if (value === "public") return "公开";
if (value === "internal") return "内部";
if (value === "confidential") return "机密";
return "限制";
}
export function documentStorageLabel(value: string) {
if (value === "offline_archive") return "线下归档";
if (value === "nas") return "内网存储";
if (value === "internal_share") return "内部共享区";
if (value === "oa_link") return "OA 受控链接";
return "已登记索引";
}