project.model.ts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. // 需求项目接口
  2. export interface RequirementItem {
  3. id: string;
  4. description: string;
  5. status: string;
  6. priority: 'high' | 'medium' | 'low';
  7. }
  8. // 客户信息接口
  9. export interface CustomerInfo {
  10. colorPreference?: string;
  11. spaceRequirements?: string;
  12. materialPreference?: string;
  13. }
  14. // 项目模型
  15. export interface Project {
  16. id: string;
  17. name: string;
  18. customerName: string;
  19. customerPhone?: string;
  20. customerWechat?: string;
  21. customerType?: string;
  22. customerSource?: string;
  23. customerRemark?: string;
  24. customerInfo?: CustomerInfo;
  25. customerTags: CustomerTag[];
  26. highPriorityNeeds: string[];
  27. requirements?: RequirementItem[];
  28. status: ProjectStatus;
  29. currentStage: ProjectStage;
  30. stage: ProjectStage; // 添加stage属性,与currentStage保持一致
  31. createdAt: Date;
  32. deadline: Date;
  33. assigneeId: string;
  34. assigneeName: string;
  35. skillsRequired: string[];
  36. }
  37. // 客户标签
  38. export interface CustomerTag {
  39. source: '朋友圈' | '信息流';
  40. needType: '硬装' | '软装';
  41. preference: '现代' | '宋式' | '欧式';
  42. colorAtmosphere: string;
  43. }
  44. // 项目状态
  45. export type ProjectStatus = '进行中' | '已完成' | '已暂停' | '已延期';
  46. // 项目阶段
  47. export type ProjectStage = '订单创建' | '需求沟通' | '方案确认' | '建模' | '软装' | '渲染' | '后期' | '尾款结算' | '客户评价' | '投诉处理';
  48. // 任务模型
  49. // 修复 Task 接口,将 completedAt 改为 completedDate(与实际代码保持一致)
  50. export interface Task {
  51. priority: any;
  52. assignee: any;
  53. description: any;
  54. id: string;
  55. projectId: string;
  56. projectName: string;
  57. title: string;
  58. stage: ProjectStage;
  59. deadline: Date;
  60. isOverdue: boolean;
  61. isCompleted: boolean;
  62. completedDate?: Date; // 修正为 completedDate
  63. }
  64. // 添加 Milestone 接口定义
  65. export interface Milestone {
  66. id: string;
  67. title: string;
  68. description: string;
  69. dueDate: Date;
  70. completedDate?: Date | null;
  71. isCompleted: boolean;
  72. }
  73. // 添加 Message 接口定义
  74. export interface Message {
  75. id: string;
  76. sender: string;
  77. content: string;
  78. timestamp: Date;
  79. isRead: boolean;
  80. type: 'text' | 'image' | 'file';
  81. }
  82. // 添加 FileItem 接口定义
  83. export interface FileItem {
  84. id: string;
  85. name: string;
  86. type: 'document' | 'image' | 'spreadsheet' | 'other';
  87. size: string;
  88. url: string;
  89. uploadedBy: string;
  90. uploadedAt: Date;
  91. downloadCount: number;
  92. }
  93. // 渲染进度
  94. export interface RenderProgress {
  95. id: string;
  96. projectId: string;
  97. completionRate: number; // 百分比
  98. estimatedTimeRemaining: number; // 小时
  99. status: '进行中' | '已完成' | '已失败';
  100. stage?: string; // 添加渲染阶段属性
  101. updatedAt: Date;
  102. }
  103. // 模型误差检查项
  104. export interface ModelCheckItem {
  105. id: string;
  106. name: string;
  107. isPassed: boolean;
  108. notes?: string;
  109. }
  110. // 客户反馈
  111. export interface CustomerFeedback {
  112. id: string;
  113. projectId: string;
  114. content: string;
  115. isSatisfied: boolean;
  116. problemLocation?: string;
  117. expectedEffect?: string;
  118. referenceCase?: string;
  119. status: '待处理' | '处理中' | '已解决';
  120. createdAt: Date;
  121. updatedAt?: Date;
  122. tag?: string;
  123. // 添加模板中使用的属性
  124. customerName?: string;
  125. rating?: number;
  126. response?: string;
  127. }
  128. // 设计师变更记录
  129. export interface DesignerChange {
  130. id: string;
  131. projectId: string;
  132. oldDesignerId: string;
  133. oldDesignerName: string;
  134. newDesignerId: string;
  135. newDesignerName: string;
  136. changeTime: Date;
  137. acceptanceTime?: Date;
  138. historicalAchievements: string[];
  139. completedWorkload: number; // 百分比
  140. reason?: string; // 添加变更原因属性
  141. }
  142. // 结算记录
  143. export interface Settlement {
  144. id: string;
  145. projectId: string;
  146. stage: ProjectStage;
  147. amount: number;
  148. percentage: number;
  149. status: '待结算' | '已结算';
  150. createdAt: Date;
  151. settledAt?: Date;
  152. completionTime?: Date;
  153. projectName?: string;
  154. }
  155. // 技能标签
  156. export interface SkillTag {
  157. id: string;
  158. name: string;
  159. level: number; // 1-5
  160. count: number; // 完成项目数量
  161. }
  162. // 绩效数据
  163. export interface PerformanceData {
  164. month: string;
  165. projectCompletionRate: number;
  166. customerSatisfaction: number;
  167. deliveryOnTimeRate: number;
  168. }
  169. // 匹配订单
  170. export interface MatchingOrder {
  171. id: string;
  172. projectName: string;
  173. requiredSkills: string[];
  174. matchRate: number;
  175. customerLevel: '优质' | '普通';
  176. }