statuses.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /** 状态文案取自《运营支撑系统设计说明》,不复用报价原型的上架状态。 */
  2. export const accountStatuses = ["未开通", "在用", "停用"] as const;
  3. export const orderStatuses = ["待生效", "生效中", "已到期", "提前停机", "已退订", "已替换"] as const;
  4. export const workOrderStatuses = ["待派单", "待处理", "处理中", "已完成", "已办结", "已关闭"] as const;
  5. export const settlementBatchStatuses = ["待执行", "已执行", "执行失败", "已打回", "已作废"] as const;
  6. export const workOrderTypes = ["开户", "到期停机", "服务开通", "提前停机", "服务停用", "故障", "售后"] as const;
  7. export type AccountStatus = (typeof accountStatuses)[number];
  8. export type OrderStatus = (typeof orderStatuses)[number];
  9. export type WorkOrderStatus = (typeof workOrderStatuses)[number];
  10. export type SettlementBatchStatus = (typeof settlementBatchStatuses)[number];
  11. export type WorkOrderType = (typeof workOrderTypes)[number];
  12. export type StatusTone = "neutral" | "info" | "success" | "warning" | "danger";
  13. type StatusMeta = { label: string; tone: StatusTone };
  14. export const statusPresentation = {
  15. account: {
  16. 未开通: { label: "未开通", tone: "neutral" },
  17. 在用: { label: "在用", tone: "success" },
  18. 停用: { label: "停用", tone: "neutral" },
  19. },
  20. order: {
  21. 待生效: { label: "待生效", tone: "neutral" },
  22. 生效中: { label: "生效中", tone: "success" },
  23. 已到期: { label: "已到期", tone: "neutral" },
  24. 提前停机: { label: "提前停机", tone: "danger" },
  25. 已退订: { label: "已退订", tone: "neutral" },
  26. 已替换: { label: "已替换", tone: "neutral" },
  27. },
  28. workOrder: {
  29. 待派单: { label: "待派单", tone: "warning" },
  30. 待处理: { label: "待处理", tone: "neutral" },
  31. 处理中: { label: "处理中", tone: "info" },
  32. 已完成: { label: "已完成", tone: "success" },
  33. 已办结: { label: "已办结", tone: "success" },
  34. 已关闭: { label: "已关闭", tone: "neutral" },
  35. },
  36. settlementBatch: {
  37. 待执行: { label: "待执行", tone: "neutral" },
  38. 已执行: { label: "已执行", tone: "success" },
  39. 执行失败: { label: "执行失败", tone: "danger" },
  40. 已打回: { label: "已打回", tone: "warning" },
  41. 已作废: { label: "已作废", tone: "neutral" },
  42. },
  43. } as const satisfies {
  44. account: Record<AccountStatus, StatusMeta>;
  45. order: Record<OrderStatus, StatusMeta>;
  46. workOrder: Record<WorkOrderStatus, StatusMeta>;
  47. settlementBatch: Record<SettlementBatchStatus, StatusMeta>;
  48. };