Browse Source

fix: project status with 订单分配

ryanemax 5 days ago
parent
commit
1ab00bdf11

+ 39 - 39
copy/project-detail.ts

@@ -301,7 +301,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 客户信息卡片展开/收起状态
   isCustomerInfoExpanded: boolean = false;
   
-  // 新增:订单创建表单相关
+  // 新增:订单分配表单相关
   orderCreationForm!: FormGroup;
   optionalForm!: FormGroup;
   isOptionalFormExpanded: boolean = false;
@@ -327,10 +327,10 @@ export class ProjectDetail implements OnInit, OnDestroy {
   materialAnalysisData: any[] = [];
   
   // 新增:9阶段顺序(串式流程)- 包含后期阶段
-  stageOrder: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'];
+  stageOrder: ProjectStage[] = ['订单分配', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'];
   // 新增:阶段展开状态(默认全部收起,当前阶段在数据加载后自动展开)
   expandedStages: Partial<Record<ProjectStage, boolean>> = {
-    '订单创建': false,
+    '订单分配': false,
     '需求沟通': false,
     '方案确认': false,
     '建模': false,
@@ -344,7 +344,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
 
   // 新增:四大板块定义与展开状态 - 交付执行板块调整为三个阶段
   sections: Array<{ key: SectionKey; label: string; stages: ProjectStage[] }> = [
-    { key: 'order', label: '订单创建', stages: ['订单创建'] },
+    { key: 'order', label: '订单分配', stages: ['订单分配'] },
     { key: 'requirements', label: '确认需求', stages: ['需求沟通', '方案确认'] },
     { key: 'delivery', label: '交付执行', stages: ['建模', '软装', '渲染', '后期'] },
     { key: 'aftercare', label: '售后', stages: [] }
@@ -528,26 +528,26 @@ export class ProjectDetail implements OnInit, OnDestroy {
     this.router.navigate([], { relativeTo: this.route, queryParamsHandling: 'merge', queryParams: { id: projectId } });
   }
 
-  // 检查是否处于订单创建阶段,用于红色高亮显示
+  // 检查是否处于订单分配阶段,用于红色高亮显示
   isCurrentOrderCreation(): boolean {
-    // 只有当订单创建阶段是当前活跃阶段时才标红显示
+    // 只有当订单分配阶段是当前活跃阶段时才标红显示
     // 修复逻辑:完成前序环节后才标红当前阶段
     const currentStage = this.project?.currentStage;
     if (!currentStage) return false;
     
-    // 如果当前阶段就是订单创建阶段,说明需要标红显示
-    if (currentStage === '订单创建') return true;
+    // 如果当前阶段就是订单分配阶段,说明需要标红显示
+    if (currentStage === '订单分配') return true;
     
-    // 如果当前阶段在订单创建之后,说明订单创建已完成,不应标红
+    // 如果当前阶段在订单分配之后,说明订单分配已完成,不应标红
     const stageOrder = [
-      '订单创建', '需求沟通', '方案确认', '建模', '软装', 
+      '订单分配', '需求沟通', '方案确认', '建模', '软装', 
       '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
     const currentIndex = stageOrder.indexOf(currentStage);
-    const orderCreationIndex = stageOrder.indexOf('订单创建');
+    const orderCreationIndex = stageOrder.indexOf('订单分配');
     
-    // 如果当前阶段在订单创建之后,说明订单创建已完成
+    // 如果当前阶段在订单分配之后,说明订单分配已完成
     return currentIndex <= orderCreationIndex;
   }
 
@@ -562,7 +562,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     
     // 定义阶段顺序
     const stageOrder = [
-      '订单创建', '需求沟通', '方案确认', '建模', '软装', 
+      '订单分配', '需求沟通', '方案确认', '建模', '软装', 
       '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
@@ -675,7 +675,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
           // 设置同步状态
           this.isSyncingCustomerInfo = true;
           
-          // 存储订单创建数据用于显示
+          // 存储订单分配数据用于显示
           this.orderCreationData = syncData;
           
           // 更新projectData以传递给子组件
@@ -838,7 +838,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 只读规则:客服视角为只读
   isReadOnly(): boolean { return this.isCustomerServiceView(); }
 
-  // 权限控制:客服只能编辑订单创建、确认需求、售后板块
+  // 权限控制:客服只能编辑订单分配、确认需求、售后板块
   canEditSection(sectionKey: SectionKey): boolean {
     if (this.isCustomerServiceView()) {
       return sectionKey === 'order' || sectionKey === 'requirements' || sectionKey === 'aftercare';
@@ -850,7 +850,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   canEditStage(stage: ProjectStage): boolean {
     if (this.isCustomerServiceView()) {
       const editableStages: ProjectStage[] = [
-        '订单创建', '需求沟通', '方案确认', // 订单创建和确认需求板块
+        '订单分配', '需求沟通', '方案确认', // 订单分配和确认需求板块
         '尾款结算', '客户评价', '投诉处理' // 售后板块
       ];
       return editableStages.includes(stage);
@@ -866,7 +866,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   }
 
   // 返回当前板块的全部阶段(所有角色一致):
-  // 设计师也可查看 订单创建/确认需求/售后 板块内容
+  // 设计师也可查看 订单分配/确认需求/售后 板块内容
   getVisibleStages(): ProjectStage[] {
     const activeKey = this.getActiveSectionKey();
     const sec = this.sections.find(s => s.key === activeKey);
@@ -1336,7 +1336,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 将现有细分阶段映射为标准化阶段
   mapToStandardPhase(stage: ProjectStage): '待分配' | '需求方案' | '项目执行' | '收尾验收' | '归档' {
     const mapping: Record<ProjectStage, '待分配' | '需求方案' | '项目执行' | '收尾验收' | '归档'> = {
-      '订单创建': '待分配',
+      '订单分配': '待分配',
       '需求沟通': '需求方案',
       '方案确认': '需求方案',
       '建模': '项目执行',
@@ -2043,7 +2043,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 根据阶段映射所属板块
   getSectionKeyForStage(stage: ProjectStage): SectionKey {
     switch (stage) {
-      case '订单创建':
+      case '订单分配':
         return 'order';
       case '需求沟通':
       case '方案确认':
@@ -2067,8 +2067,8 @@ export class ProjectDetail implements OnInit, OnDestroy {
     // 优先使用本地的currentStage,如果没有则使用project.currentStage
     const current = (this.currentStage || this.project?.currentStage) as ProjectStage | undefined;
     
-    // 如果没有当前阶段(新创建的项目),默认订单创建板块为active(红色)
-    if (!current || current === '订单创建') {
+    // 如果没有当前阶段(新创建的项目),默认订单分配板块为active(红色)
+    if (!current || current === '订单分配') {
       return key === 'order' ? 'active' : 'pending';
     }
 
@@ -2107,7 +2107,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 阶段到锚点的映射
   stageToAnchor(stage: ProjectStage): string {
     const map: Record<ProjectStage, string> = {
-      '订单创建': 'order',
+      '订单分配': 'order',
       '需求沟通': 'requirements-talk',
       '方案确认': 'proposal-confirm',
       '建模': 'modeling',
@@ -2130,7 +2130,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     }
   }
 
-  // 订单创建阶段:客户信息(迁移自客服端"客户信息"卡片)
+  // 订单分配阶段:客户信息(迁移自客服端"客户信息"卡片)
   orderCreationMethod: 'miniprogram' | 'manual' = 'miniprogram';
   isSyncing: boolean = false;
   orderTime: string = '';
@@ -2479,7 +2479,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     }
     
     const stageOrder = [
-      '订单创建', '需求沟通', '方案确认', '建模', '软装', 
+      '订单分配', '需求沟通', '方案确认', '建模', '软装', 
       '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
@@ -2571,12 +2571,12 @@ export class ProjectDetail implements OnInit, OnDestroy {
   getProjectStatusText(): string {
     const current = (this.currentStage || this.project?.currentStage) as ProjectStage | undefined;
     
-    if (!current || current === '订单创建') {
+    if (!current || current === '订单分配') {
       return '待开始';
     }
     
     // 检查是否已完成所有阶段
-    const allStages: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '尾款结算', '客户评价', '投诉处理'];
+    const allStages: ProjectStage[] = ['订单分配', '需求沟通', '方案确认', '建模', '软装', '渲染', '尾款结算', '客户评价', '投诉处理'];
     const currentIndex = allStages.indexOf(current);
     
     if (currentIndex === allStages.length - 1) {
@@ -2590,8 +2590,8 @@ export class ProjectDetail implements OnInit, OnDestroy {
   getCurrentStageText(): string {
     const current = (this.currentStage || this.project?.currentStage) as ProjectStage | undefined;
     
-    if (!current || current === '订单创建') {
-      return '订单创建阶段';
+    if (!current || current === '订单分配') {
+      return '订单分配阶段';
     }
     
     return `${current}阶段`;
@@ -2607,7 +2607,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     
     // 定义所有阶段及其权重
     const stageWeights: Record<ProjectStage, number> = {
-      '订单创建': 5,
+      '订单分配': 5,
       '需求沟通': 15,
       '方案确认': 25,
       '建模': 40,
@@ -2763,12 +2763,12 @@ export class ProjectDetail implements OnInit, OnDestroy {
   }
 
   // 处理咨询订单表单提交
-  // 存储订单创建时的客户信息和需求信息
+  // 存储订单分配时的客户信息和需求信息
 
   onConsultationOrderSubmit(formData: any): void {
     console.log('咨询订单表单提交:', formData);
     
-    // 保存订单创建数据
+    // 保存订单分配数据
     this.orderCreationData = formData;
     
     // 更新projectData以便传递给子组件(集成报价与指派信息)
@@ -2890,7 +2890,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
       // 进入下一个阶段:需求沟通
       this.updateProjectStage('需求沟通');
       this.expandedStages['需求沟通'] = true;
-      this.expandedStages['订单创建'] = false;
+      this.expandedStages['订单分配'] = false;
       
       // 显示成功消息
       alert('团队分配成功!已进入需求沟通阶段');
@@ -2912,9 +2912,9 @@ export class ProjectDetail implements OnInit, OnDestroy {
       this.project.currentStage = '需求沟通';
     }
     
-    // 展开需求沟通阶段,收起订单创建阶段
+    // 展开需求沟通阶段,收起订单分配阶段
     this.expandedStages['需求沟通'] = true;
-    this.expandedStages['订单创建'] = false;
+    this.expandedStages['订单分配'] = false;
     
     // 自动展开确认需求板块
     this.expandedSection = 'requirements';
@@ -3626,7 +3626,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   };
   
   sopStagesData: any[] = [
-    { name: '订单创建', plannedDuration: 1, actualDuration: 1, score: 95, status: 'completed', statusText: '已完成', isDelayed: false, issues: [] },
+    { name: '订单分配', plannedDuration: 1, actualDuration: 1, score: 95, status: 'completed', statusText: '已完成', isDelayed: false, issues: [] },
     { name: '需求沟通', plannedDuration: 3, actualDuration: 4, score: 75, status: 'completed', statusText: '已完成', isDelayed: true, issues: ['沟通次数超标'] },
     { name: '方案确认', plannedDuration: 2, actualDuration: 2, score: 90, status: 'completed', statusText: '已完成', isDelayed: false, issues: [] },
     { name: '建模', plannedDuration: 4, actualDuration: 5, score: 80, status: 'completed', statusText: '已完成', isDelayed: true, issues: ['细节调整耗时'] },
@@ -4593,7 +4593,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   
   // 初始化表单
   initializeForms(): void {
-    // 初始化订单创建表单(必填项)
+    // 初始化订单分配表单(必填项)
     this.orderCreationForm = this.fb.group({
       orderAmount: ['', [Validators.required, Validators.min(0)]],
       smallImageDeliveryTime: ['', Validators.required],
@@ -4639,9 +4639,9 @@ export class ProjectDetail implements OnInit, OnDestroy {
     // 这里应该调用API创建订单
     // 模拟API调用
     setTimeout(() => {
-      alert('订单创建成功!');
-      // 订单创建成功后自动切换到下一环节
-      this.advanceToNextStage('订单创建');
+      alert('订单分配成功!');
+      // 订单分配成功后自动切换到下一环节
+      this.advanceToNextStage('订单分配');
     }, 500);
   }
   

+ 3 - 3
docs/Database/customer-designer-normalization.md

@@ -96,7 +96,7 @@ type ProjectStatus = '待分配' | '进行中' | '已完成' | '已暂停' | '
 
 // 项目阶段
 type ProjectStage = 
-  | '订单创建' 
+  | '订单分配' 
   | '需求沟通' 
   | '方案确认' 
   | '建模' 
@@ -663,7 +663,7 @@ CREATE TABLE projects (
   project_code VARCHAR(50) UNIQUE,
   customer_id VARCHAR(36) NOT NULL,
   status ENUM('待分配', '进行中', '已完成', '已暂停', '已延期', '已取消'),
-  current_stage ENUM('订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'),
+  current_stage ENUM('订单分配', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'),
   assignee_id VARCHAR(36),
   customer_service_id VARCHAR(36),
   created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
@@ -712,7 +712,7 @@ CREATE TABLE deliverable_files (
   thumbnail_url VARCHAR(500),
   uploaded_by VARCHAR(36) NOT NULL,
   uploaded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-  stage ENUM('订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'),
+  stage ENUM('订单分配', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'),
   space VARCHAR(100),
   process VARCHAR(100),
   review_status ENUM('pending', 'approved', 'rejected', 'revision_required'),

+ 1 - 1
docs/report/20250915/faq.html

@@ -439,7 +439,7 @@
                             <ul>
                                 <li>自动同步项目信息和客户信息</li>
                                 <li>减少人工录入错误</li>
-                                <li>提高订单创建效率</li>
+                                <li>提高订单分配效率</li>
                                 <li>客户信息已预填充</li>
                             </ul>
                         </div>

+ 1 - 1
docs/report/20250915/roadmap.html

@@ -420,7 +420,7 @@
                     <div class="features-grid">
                         <div class="feature-item">
                             <div class="feature-title">客服端基础功能</div>
-                            <div class="feature-desc">工作台、客户咨询、订单创建</div>
+                            <div class="feature-desc">工作台、客户咨询、订单分配</div>
                         </div>
                         <div class="feature-item">
                             <div class="feature-title">设计师工作台</div>

+ 1 - 1
src/app/models/project.model.ts

@@ -52,7 +52,7 @@ export interface CustomerTag {
 export type ProjectStatus = '进行中' | '已完成' | '已暂停' | '已延期';
 
 // 项目阶段
-export type ProjectStage = '订单创建' | '需求沟通' | '方案确认' | '建模' | '软装' | '渲染' | '后期' | '尾款结算' | '客户评价' | '投诉处理';
+export type ProjectStage = '订单分配' | '需求沟通' | '方案确认' | '建模' | '软装' | '渲染' | '后期' | '尾款结算' | '客户评价' | '投诉处理';
 
 // 任务模型
 // 修复 Task 接口,将 completedAt 改为 completedDate(与实际代码保持一致)

+ 2 - 2
src/app/pages/customer-service/consultation-order/consultation-order-dialog.component.ts

@@ -30,9 +30,9 @@ export class ConsultationOrderDialogComponent {
     this.dialogRef.close();
   }
 
-  // 监听订单创建成功事件
+  // 监听订单分配成功事件
   onOrderCreated(orderData: any): void {
-    // 发出订单创建事件
+    // 发出订单分配事件
     this.orderCreated.emit(orderData);
     // 关闭弹窗并返回订单数据
     this.dialogRef.close(orderData);

+ 1 - 1
src/app/pages/customer-service/consultation-order/consultation-order.scss

@@ -738,7 +738,7 @@ $card-padding: 16px;
   }
 }
 
-// 订单创建方式选择样式
+// 订单分配方式选择样式
 .creation-method-section {
   margin-bottom: 32px;
   animation: fadeIn 0.6s ease-out;

+ 4 - 4
src/app/pages/customer-service/consultation-order/consultation-order.ts

@@ -103,7 +103,7 @@ export class ConsultationOrder {
   // 项目需求卡片展开状态
   isRequirementCardExpanded = signal(false);
 
-  // 订单创建成功事件
+  // 订单分配成功事件
   @Output() orderCreated = new EventEmitter<any>();
 
   // 需求表单
@@ -513,7 +513,7 @@ export class ConsultationOrder {
           setTimeout(() => {
             this.showSuccessMessage.set(false);
             
-            // 发出订单创建成功事件,包含完整表单数据用于同步
+            // 发出订单分配成功事件,包含完整表单数据用于同步
             const orderData = {
               orderId: res.projectId || 'mock-9',
               customerName: nameCtrl.value,
@@ -721,13 +721,13 @@ export class ConsultationOrder {
       this.isSubmitting.set(false);
       this.showSuccessMessage.set(true);
       
-      this.snackBar.open('订单创建成功!', '关闭', {
+      this.snackBar.open('订单分配成功!', '关闭', {
         duration: 3000,
         horizontalPosition: 'center',
         verticalPosition: 'top'
       });
 
-      // 发射订单创建成功事件
+      // 发射订单分配成功事件
       this.orderCreated.emit(orderData);
 
       // 3秒后隐藏成功消息

+ 4 - 4
src/app/pages/customer-service/project-list/project-list.ts

@@ -246,7 +246,7 @@ export class ProjectList implements OnInit, OnDestroy {
         '后期': 85,
         '尾款结算': 90,
         '投诉处理': 100,
-        订单创建: 0,
+        订单分配: 0,
         方案确认: 0,
         
         客户评价: 0
@@ -391,7 +391,7 @@ export class ProjectList implements OnInit, OnDestroy {
       case '软装': return 'stage-decoration';
       case '渲染': return 'stage-rendering';
       case '投诉处理': return 'stage-completed';
-      case '订单创建': return 'stage-active';
+      case '订单分配': return 'stage-active';
       case '方案确认': return 'stage-active';
       case '尾款结算': return 'stage-completed';
       case '客户评价': return 'stage-completed';
@@ -445,7 +445,7 @@ export class ProjectList implements OnInit, OnDestroy {
   navigateToProject(project: ProjectListItem, columnId: 'pending' | 'req' | 'delivery' | 'done') {
     // 根据columnId映射到对应的阶段
     const stageMapping = {
-      'pending': '订单创建',
+      'pending': '订单分配',
       'req': project.currentStage || '需求沟通', // 使用项目实际阶段或默认阶段
       'delivery': project.currentStage || '建模', // 使用项目实际阶段或默认阶段
       'done': '客户评价'
@@ -475,7 +475,7 @@ export class ProjectList implements OnInit, OnDestroy {
       panelClass: 'consultation-order-dialog'
     });
 
-    // 监听订单创建成功事件
+    // 监听订单分配成功事件
     dialogRef.componentInstance.orderCreated.subscribe((orderData: any) => {
       // 关闭弹窗
       dialogRef.close();

+ 1 - 1
src/app/pages/designer/personal-board/personal-board.ts

@@ -316,7 +316,7 @@ export class PersonalBoard implements OnInit, AfterViewInit {
   // 根据项目阶段获取对应的结算比例
   getStagePercentage(stage: ProjectStage): number {
     const percentages: Record<ProjectStage, number> = {
-      '订单创建': 0,
+      '订单分配': 0,
       '需求沟通': 0,
       '方案确认': 0,
       '建模': 30,

+ 1 - 1
src/app/pages/designer/project-detail/FINAL-STATUS.md

@@ -211,7 +211,7 @@
 ### ✅ 柱状图(阶段耗时对比)
 
 **显示内容**:
-- 5个阶段(订单创建、需求沟通、方案确认、建模、软装)
+- 5个阶段(订单分配、需求沟通、方案确认、建模、软装)
 - 每个阶段2根柱子(计划时长/实际时长)
 - 图例说明清晰
 

+ 1 - 1
src/app/pages/designer/project-detail/components/order-creation/order-creation.component.html

@@ -1,6 +1,6 @@
 <div class="order-creation-container">
   <div class="section-header">
-    <h3>订单创建信息</h3>
+    <h3>订单分配信息</h3>
     <span class="required-note">* 为必填项</span>
     <div class="header-actions">
       <button type="button" class="btn-primary" (click)="showPricingRules()">

+ 1 - 1
src/app/pages/designer/project-detail/components/order-creation/order-creation.component.scss

@@ -1,4 +1,4 @@
-/* 订单创建组件样式 */
+/* 订单分配组件样式 */
 .order-creation-container {
   padding: 20px;
   background: white;

+ 1 - 1
src/app/pages/designer/project-detail/debug-styles.scss

@@ -1496,7 +1496,7 @@
   background: #ff4d4f !important;
 }
 
-/* 订单创建阶段完成后的绿色高亮 */
+/* 订单分配阶段完成后的绿色高亮 */
 .vertical-stage-block.completed {
   background: #f6ffed !important;
   border-color: #b7eb8f !important;

+ 1 - 1
src/app/pages/designer/project-detail/order-creation-form.scss

@@ -1,4 +1,4 @@
-/* 订单创建表单样式 */
+/* 订单分配表单样式 */
 .order-creation-form {
   background: #ffffff;
   border-radius: 16px;

+ 6 - 6
src/app/pages/designer/project-detail/project-detail.html

@@ -39,7 +39,7 @@
           <div class="stage-nav-circle">
             <span class="stage-nav-number">1</span>
           </div>
-          <div class="stage-nav-label">订单创建</div>
+          <div class="stage-nav-label">订单分配</div>
           @if (isReviewOnlyMode) {
             <div class="readonly-badge">只读</div>
           }
@@ -272,7 +272,7 @@
               </div>
               @if (project) {
                 <div class="info-grid" [class.collapsed]="!isCustomerInfoExpanded">
-                  <!-- 显示订单创建时填写的客户信息,如果有的话 -->
+                  <!-- 显示订单分配时填写的客户信息,如果有的话 -->
                   @if (orderCreationData?.customerInfo) {
                     <!-- 基本客户信息 -->
                     <div class="info-item key-info"><label>客户姓名</label><span>{{ orderCreationData.customerInfo.name }}</span></div>
@@ -1411,7 +1411,7 @@
               <div class="stage-progress-container">
                 @for (stage of getVisibleStages(); track stage) {
                   <div class="vertical-stage-block" [attr.id]="stageToAnchor(stage)" [class.active]="getStageStatus(stage) === 'active'">
-                    @if (stage !== '订单创建') {
+                    @if (stage !== '订单分配') {
                       <div class="vertical-stage-header">
                         <span class="dot" [class.completed]="getStageStatus(stage) === 'completed'" [class.active]="getStageStatus(stage) === 'active'"></span>
                         <h3>{{ stage === '需求沟通' ? '需求映射' : (stage === '方案确认' ? '色彩分析报告' : stage) }}</h3>
@@ -1419,8 +1419,8 @@
                     }
                     <!-- 直接复用原阶段内容卡片:按stage匹配显示 -->
                     <div class="vertical-stage-body">
-                      @if (stage === '订单创建') {
-                        <!-- 重构后的订单创建表单 - 组合order-creation-extra和consultation-order-panel -->
+                      @if (stage === '订单分配') {
+                        <!-- 重构后的订单分配表单 - 组合order-creation-extra和consultation-order-panel -->
                         <div class="order-creation-form-container">
                           <!-- 订单分配头部 -->
                           <div class="order-assignment-header">
@@ -1432,7 +1432,7 @@
                                 [disabled]="!canCreateOrder()"
                                 [class.disabled]="!canCreateOrder()"
                               >
-                                <span>创建订单</span>
+                                <span>分配订单</span>
                               </button>
                             </div>
                           </div>

+ 43 - 43
src/app/pages/designer/project-detail/project-detail.ts

@@ -306,7 +306,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 客户信息卡片展开/收起状态
   isCustomerInfoExpanded: boolean = false;
   
-  // 新增:订单创建表单相关
+  // 新增:订单分配表单相关
   orderCreationForm!: FormGroup;
   optionalForm!: FormGroup;
   isOptionalFormExpanded: boolean = false;
@@ -340,10 +340,10 @@ export class ProjectDetail implements OnInit, OnDestroy {
   mappingIsGeneratingMapping: boolean = false;
   
   // 新增:9阶段顺序(串式流程)- 包含后期阶段
-  stageOrder: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'];
+  stageOrder: ProjectStage[] = ['订单分配', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'];
   // 新增:阶段展开状态(默认全部收起,当前阶段在数据加载后自动展开)
   expandedStages: Partial<Record<ProjectStage, boolean>> = {
-    '订单创建': false,
+    '订单分配': false,
     '需求沟通': false,
     '方案确认': false,
     '建模': false,
@@ -357,7 +357,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
 
   // 新增:四大板块定义与展开状态 - 交付执行板块调整为三个阶段
   sections: Array<{ key: SectionKey; label: string; stages: ProjectStage[] }> = [
-    { key: 'order', label: '订单创建', stages: ['订单创建'] },
+    { key: 'order', label: '订单分配', stages: ['订单分配'] },
     { key: 'requirements', label: '确认需求', stages: ['需求沟通', '方案确认'] },
     { key: 'delivery', label: '交付执行', stages: ['建模', '软装', '渲染', '后期'] },
     { key: 'aftercare', label: '售后', stages: [] }
@@ -542,26 +542,26 @@ export class ProjectDetail implements OnInit, OnDestroy {
     this.router.navigate([], { relativeTo: this.route, queryParamsHandling: 'merge', queryParams: { id: projectId } });
   }
 
-  // 检查是否处于订单创建阶段,用于红色高亮显示
+  // 检查是否处于订单分配阶段,用于红色高亮显示
   isCurrentOrderCreation(): boolean {
-    // 只有当订单创建阶段是当前活跃阶段时才标红显示
+    // 只有当订单分配阶段是当前活跃阶段时才标红显示
     // 修复逻辑:完成前序环节后才标红当前阶段
     const currentStage = this.project?.currentStage;
     if (!currentStage) return false;
     
-    // 如果当前阶段就是订单创建阶段,说明需要标红显示
-    if (currentStage === '订单创建') return true;
+    // 如果当前阶段就是订单分配阶段,说明需要标红显示
+    if (currentStage === '订单分配') return true;
     
-    // 如果当前阶段在订单创建之后,说明订单创建已完成,不应标红
+    // 如果当前阶段在订单分配之后,说明订单分配已完成,不应标红
     const stageOrder = [
-      '订单创建', '需求沟通', '方案确认', '建模', '软装', 
+      '订单分配', '需求沟通', '方案确认', '建模', '软装', 
       '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
     const currentIndex = stageOrder.indexOf(currentStage);
-    const orderCreationIndex = stageOrder.indexOf('订单创建');
+    const orderCreationIndex = stageOrder.indexOf('订单分配');
     
-    // 如果当前阶段在订单创建之后,说明订单创建已完成
+    // 如果当前阶段在订单分配之后,说明订单分配已完成
     return currentIndex <= orderCreationIndex;
   }
 
@@ -576,7 +576,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     
     // 定义阶段顺序
     const stageOrder = [
-      '订单创建', '需求沟通', '方案确认', '建模', '软装', 
+      '订单分配', '需求沟通', '方案确认', '建模', '软装', 
       '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
@@ -715,7 +715,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
           // 设置同步状态
           this.isSyncingCustomerInfo = true;
           
-          // 存储订单创建数据用于显示
+          // 存储订单分配数据用于显示
           this.orderCreationData = syncData;
           
           // 更新projectData以传递给子组件
@@ -882,7 +882,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 只读规则:客服视角为只读
   isReadOnly(): boolean { return this.isCustomerServiceView(); }
 
-  // 权限控制:客服只能编辑订单创建、确认需求、售后板块
+  // 权限控制:客服只能编辑订单分配、确认需求、售后板块
   canEditSection(sectionKey: SectionKey): boolean {
     if (this.isCustomerServiceView()) {
       return sectionKey === 'order' || sectionKey === 'requirements' || sectionKey === 'aftercare';
@@ -894,7 +894,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   canEditStage(stage: ProjectStage): boolean {
     if (this.isCustomerServiceView()) {
       const editableStages: ProjectStage[] = [
-        '订单创建', '需求沟通', '方案确认', // 订单创建和确认需求板块
+        '订单分配', '需求沟通', '方案确认', // 订单分配和确认需求板块
         '尾款结算', '客户评价', '投诉处理' // 售后板块
       ];
       return editableStages.includes(stage);
@@ -910,7 +910,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   }
 
   // 返回当前板块的全部阶段(所有角色一致):
-  // 设计师也可查看 订单创建/确认需求/售后 板块内容
+  // 设计师也可查看 订单分配/确认需求/售后 板块内容
   getVisibleStages(): ProjectStage[] {
     const activeKey = this.getActiveSectionKey();
     const sec = this.sections.find(s => s.key === activeKey);
@@ -1432,7 +1432,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 将现有细分阶段映射为标准化阶段
   mapToStandardPhase(stage: ProjectStage): '待分配' | '需求方案' | '项目执行' | '收尾验收' | '归档' {
     const mapping: Record<ProjectStage, '待分配' | '需求方案' | '项目执行' | '收尾验收' | '归档'> = {
-      '订单创建': '待分配',
+      '订单分配': '待分配',
       '需求沟通': '需求方案',
       '方案确认': '需求方案',
       '建模': '项目执行',
@@ -2139,7 +2139,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 根据阶段映射所属板块
   getSectionKeyForStage(stage: ProjectStage): SectionKey {
     switch (stage) {
-      case '订单创建':
+      case '订单分配':
         return 'order';
       case '需求沟通':
       case '方案确认':
@@ -2163,8 +2163,8 @@ export class ProjectDetail implements OnInit, OnDestroy {
     // 优先使用本地的currentStage,如果没有则使用project.currentStage
     const current = (this.currentStage || this.project?.currentStage) as ProjectStage | undefined;
     
-    // 如果没有当前阶段(新创建的项目),默认订单创建板块为active(红色)
-    if (!current || current === '订单创建') {
+    // 如果没有当前阶段(新创建的项目),默认订单分配板块为active(红色)
+    if (!current || current === '订单分配') {
       return key === 'order' ? 'active' : 'pending';
     }
 
@@ -2203,7 +2203,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   // 阶段到锚点的映射
   stageToAnchor(stage: ProjectStage): string {
     const map: Record<ProjectStage, string> = {
-      '订单创建': 'order',
+      '订单分配': 'order',
       '需求沟通': 'requirements-talk',
       '方案确认': 'proposal-confirm',
       '建模': 'modeling',
@@ -2226,7 +2226,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     }
   }
 
-  // 订单创建阶段:客户信息(迁移自客服端"客户信息"卡片)
+  // 订单分配阶段:客户信息(迁移自客服端"客户信息"卡片)
   orderCreationMethod: 'miniprogram' | 'manual' = 'miniprogram';
   isSyncing: boolean = false;
   orderTime: string = '';
@@ -2582,7 +2582,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     }
     
     const stageOrder = [
-      '订单创建', '需求沟通', '方案确认', '建模', '软装', 
+      '订单分配', '需求沟通', '方案确认', '建模', '软装', 
       '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
@@ -2674,12 +2674,12 @@ export class ProjectDetail implements OnInit, OnDestroy {
   getProjectStatusText(): string {
     const current = (this.currentStage || this.project?.currentStage) as ProjectStage | undefined;
     
-    if (!current || current === '订单创建') {
+    if (!current || current === '订单分配') {
       return '待开始';
     }
     
     // 检查是否已完成所有阶段
-    const allStages: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '尾款结算', '客户评价', '投诉处理'];
+    const allStages: ProjectStage[] = ['订单分配', '需求沟通', '方案确认', '建模', '软装', '渲染', '尾款结算', '客户评价', '投诉处理'];
     const currentIndex = allStages.indexOf(current);
     
     if (currentIndex === allStages.length - 1) {
@@ -2693,8 +2693,8 @@ export class ProjectDetail implements OnInit, OnDestroy {
   getCurrentStageText(): string {
     const current = (this.currentStage || this.project?.currentStage) as ProjectStage | undefined;
     
-    if (!current || current === '订单创建') {
-      return '订单创建阶段';
+    if (!current || current === '订单分配') {
+      return '订单分配阶段';
     }
     
     return `${current}阶段`;
@@ -2710,7 +2710,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     
     // 定义所有阶段及其权重
     const stageWeights: Record<ProjectStage, number> = {
-      '订单创建': 5,
+      '订单分配': 5,
       '需求沟通': 15,
       '方案确认': 25,
       '建模': 40,
@@ -2866,12 +2866,12 @@ export class ProjectDetail implements OnInit, OnDestroy {
   }
 
   // 处理咨询订单表单提交
-  // 存储订单创建时的客户信息和需求信息
+  // 存储订单分配时的客户信息和需求信息
 
   onConsultationOrderSubmit(formData: any): void {
     console.log('咨询订单表单提交:', formData);
     
-    // 保存订单创建数据
+    // 保存订单分配数据
     this.orderCreationData = formData;
     
     // 更新projectData以便传递给子组件(集成报价与指派信息)
@@ -2993,7 +2993,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
       // 进入下一个阶段:需求沟通
       this.updateProjectStage('需求沟通');
       this.expandedStages['需求沟通'] = true;
-      this.expandedStages['订单创建'] = false;
+      this.expandedStages['订单分配'] = false;
       
       // 显示成功消息
       alert('团队分配成功!已进入需求沟通阶段');
@@ -3015,9 +3015,9 @@ export class ProjectDetail implements OnInit, OnDestroy {
       this.project.currentStage = '需求沟通';
     }
     
-    // 展开需求沟通阶段,收起订单创建阶段
+    // 展开需求沟通阶段,收起订单分配阶段
     this.expandedStages['需求沟通'] = true;
-    this.expandedStages['订单创建'] = false;
+    this.expandedStages['订单分配'] = false;
     
     // 自动展开确认需求板块
     this.expandedSection = 'requirements';
@@ -3746,7 +3746,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   };
   
   sopStagesData: any[] = [
-    { name: '订单创建', plannedDuration: 1, actualDuration: 1, score: 95, status: 'completed', statusText: '已完成', isDelayed: false, issues: [] },
+    { name: '订单分配', plannedDuration: 1, actualDuration: 1, score: 95, status: 'completed', statusText: '已完成', isDelayed: false, issues: [] },
     { name: '需求沟通', plannedDuration: 3, actualDuration: 4, score: 75, status: 'completed', statusText: '已完成', isDelayed: true, issues: ['沟通次数超标'] },
     { name: '方案确认', plannedDuration: 2, actualDuration: 2, score: 90, status: 'completed', statusText: '已完成', isDelayed: false, issues: [] },
     { name: '建模', plannedDuration: 4, actualDuration: 5, score: 80, status: 'completed', statusText: '已完成', isDelayed: true, issues: ['细节调整耗时'] },
@@ -4722,7 +4722,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
   
   // 初始化表单
   initializeForms(): void {
-    // 初始化订单创建表单(必填项)
+    // 初始化订单分配表单(必填项)
     this.orderCreationForm = this.fb.group({
       orderAmount: ['', [Validators.required, Validators.min(0)]],
       smallImageDeliveryTime: ['', Validators.required],
@@ -4742,12 +4742,12 @@ export class ProjectDetail implements OnInit, OnDestroy {
     });
   }
 
-  // 检查是否可以创建订单
+  // 检查是否可以分配订单
   canCreateOrder(): boolean {
     return this.orderCreationForm ? this.orderCreationForm.valid : false;
   }
 
-  // 创建订单
+  // 分配订单
   createOrder(): void {
     if (!this.canCreateOrder()) {
       // 标记所有字段为已触摸,以显示验证错误
@@ -4763,14 +4763,14 @@ export class ProjectDetail implements OnInit, OnDestroy {
       designerAssignment: this.designerAssignmentData
     };
 
-    console.log('创建订单:', orderData);
+    console.log('分配订单:', orderData);
     
-    // 这里应该调用API创建订单
+    // 这里应该调用API分配订单
     // 模拟API调用
     setTimeout(() => {
-      alert('订单创建成功!');
-      // 订单创建成功后自动切换到下一环节
-      this.advanceToNextStage('订单创建');
+      alert('订单分配成功!');
+      // 订单分配成功后自动切换到下一环节
+      this.advanceToNextStage('订单分配');
     }, 500);
   }
   

+ 2 - 2
src/app/pages/team-leader/dashboard/dashboard.ts

@@ -140,7 +140,7 @@ export class Dashboard implements OnInit, OnDestroy {
 
   // 5大核心阶段(聚合展示)
   corePhases: ProjectStage[] = [
-    { id: 'order', name: '订单创建', order: 1 },        // 待确认、待分配
+    { id: 'order', name: '订单分配', order: 1 },        // 待确认、待分配
     { id: 'requirements', name: '确认需求', order: 2 },  // 需求沟通、方案规划
     { id: 'delivery', name: '交付执行', order: 3 },      // 建模、渲染、后期/评审/修改
     { id: 'aftercare', name: '售后', order: 4 }          // 交付完成 → 售后
@@ -1382,7 +1382,7 @@ export class Dashboard implements OnInit, OnDestroy {
 
   // 新增:阶段到核心阶段的映射
   private mapStageToCorePhase(stageId: string): 'order' | 'requirements' | 'delivery' | 'aftercare' {
-    // 订单创建:立项初期
+    // 订单分配:立项初期
     if (stageId === 'pendingApproval' || stageId === 'pendingAssignment') return 'order';
     // 确认需求:需求沟通 + 方案规划
     if (stageId === 'requirement' || stageId === 'planning') return 'requirements';

+ 1 - 1
src/app/pages/team-leader/workload-calendar/workload-calendar.ts

@@ -275,7 +275,7 @@ export class WorkloadCalendarComponent implements OnInit, OnDestroy {
   // 新增:阶段归并规则(标准化为5大阶段)
   private stageToPhase(s: ProjectStage, isCompleted = false): '待分配' | '需求方案' | '执行' | '收尾验收' | '归档' {
     switch (s) {
-      case '订单创建':
+      case '订单分配':
         return '待分配';
       case '需求沟通':
       case '方案确认':

+ 3 - 3
src/app/shared/components/consultation-order-panel/consultation-order-panel.component.ts

@@ -561,7 +561,7 @@ export class ConsultationOrderPanelComponent implements OnInit, OnChanges {
       createdAt: new Date()
     };
     
-    // 先触发订单创建事件(用于数据同步)
+    // 先触发订单分配事件(用于数据同步)
     this.orderCreated.emit(formData);
     
     // 再触发项目创建成功事件(用于阶段推进)
@@ -593,7 +593,7 @@ export class ConsultationOrderPanelComponent implements OnInit, OnChanges {
     this.showTeamAssignmentModal = false;
   }
 
-  // 确认团队分配 - 优化流程:同时触发订单创建和项目创建事件
+  // 确认团队分配 - 优化流程:同时触发订单分配和项目创建事件
   confirmTeamAssignment(designer: Designer) {
     this.selectedDesigner = designer;
     this.showTeamAssignmentModal = false;
@@ -619,7 +619,7 @@ export class ConsultationOrderPanelComponent implements OnInit, OnChanges {
       createdAt: new Date()
     };
     
-    // 先触发订单创建事件(用于数据同步)
+    // 先触发订单分配事件(用于数据同步)
     this.orderCreated.emit(formData);
     
     // 再触发项目创建成功事件(用于阶段推进)