Prechádzať zdrojové kódy

refactor(项目阶段): 移除后期阶段并调整相关逻辑

移除项目流程中的"后期"阶段,将其功能合并到"渲染"阶段。更新了项目阶段类型定义、阶段顺序、进度计算、交付板块定义及相关UI组件。同时调整了模拟数据和服务中的阶段引用,确保系统逻辑与新的阶段划分保持一致。
0235711 12 hodín pred
rodič
commit
b2ec26fb72

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

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

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

@@ -91,7 +91,7 @@ export class ProjectList implements OnInit, OnDestroy {
     { value: '建模', label: '建模' },
     { value: '软装', label: '软装' },
     { value: '渲染', label: '渲染' },
-    { value: '后期', label: '后期' },
+    { value: '尾款结算', label: '尾款结算' },
     { value: '投诉处理', label: '投诉处理' }
   ];
   
@@ -243,11 +243,11 @@ export class ProjectList implements OnInit, OnDestroy {
         '建模': 40,
         '软装': 60,
         '渲染': 80,
-        '后期': 90,
+        '尾款结算': 90,
         '投诉处理': 100,
         订单创建: 0,
         方案确认: 0,
-        尾款结算: 0,
+        
         客户评价: 0
     };
     
@@ -265,7 +265,7 @@ export class ProjectList implements OnInit, OnDestroy {
   // 生成模拟项目数据
   generateMockProjects(): Project[] {
     const statuses: ProjectStatus[] = ['进行中', '已完成', '已暂停', '已延期'];
-    const stages: ProjectStage[] = ['需求沟通', '建模', '软装', '渲染', '后期', '投诉处理'];
+    const stages: ProjectStage[] = ['需求沟通', '建模', '软装', '渲染', '投诉处理'];
     const preferences: ('现代' | '宋式' | '欧式')[] = ['现代', '宋式', '欧式'];
     const needTypes: ('硬装' | '软装')[] = ['硬装', '软装'];
     const sources: ('朋友圈' | '信息流')[] = ['朋友圈', '信息流'];
@@ -389,7 +389,6 @@ export class ProjectList implements OnInit, OnDestroy {
       case '建模': return 'stage-modeling';
       case '软装': return 'stage-decoration';
       case '渲染': return 'stage-rendering';
-      case '后期': return 'stage-postproduction';
       case '投诉处理': return 'stage-completed';
       case '订单创建': return 'stage-active';
       case '方案确认': return 'stage-active';
@@ -410,7 +409,7 @@ export class ProjectList implements OnInit, OnDestroy {
   }
 
   private isInDelivery(p: Project): boolean {
-    const deliveryStages: ProjectStage[] = ['建模', '软装', '渲染', '后期'];
+    const deliveryStages: ProjectStage[] = ['建模', '软装', '渲染'];
     return !this.isCompleted(p) && !this.isPendingAssignment(p) && deliveryStages.includes(p.currentStage);
   }
 

+ 1 - 67
src/app/pages/designer/project-detail/project-detail.html

@@ -1,4 +1,4 @@
-<!-- 只展示修改处,未变更部分用占位注释表示 -->
+<!-- 只展示修改处,未变更部分用占位注释表示 -->
 <div class="project-detail-container designer-page">
   <!-- 项目标题栏 -->
   <div class="project-header card">
@@ -962,72 +962,6 @@
                             </div>
                           </div>
                         </div>
-                      } @else if (stage === '后期') {
-                        <div class="post-process-section">
-                          <div class="upload-section">
-                            <div class="upload-header">
-                              <h4>上传后期处理图片</h4>
-                              <span class="hint">包含调色、修图、特效等后期处理结果</span>
-                            </div>
-                            @if (canEditSection('delivery')) {
-                              <div class="upload-dropzone" 
-                                   (click)="postProcessImages.length === 0 ? triggerFileInput('postProcess') : null"
-                                   (dragover)="postProcessImages.length === 0 ? onDragOver($event) : null"
-                                   (dragleave)="postProcessImages.length === 0 ? onDragLeave($event) : null"
-                                   (drop)="postProcessImages.length === 0 ? onFileDrop($event, 'postProcess') : null"
-                                   [class.drag-over]="isDragOver && postProcessImages.length === 0"
-                                   [class.has-images]="postProcessImages.length > 0">
-                                @if (postProcessImages.length === 0) {
-                                  <div class="upload-icon"></div>
-                                  <div class="upload-text">点击此处或拖拽文件到此处上传</div>
-                                  <div class="upload-hint">支持 JPG、PNG 格式,展示后期处理效果</div>
-                                } @else {
-                                  <div class="uploaded-images-grid">
-                                    @for (img of postProcessImages; track img.id) {
-                                      <div class="uploaded-image-item" (click)="previewImage(img)">
-                                        <img [src]="img.url" [alt]="img.name" />
-                                        <div class="image-overlay">
-                                          <div class="image-name">{{ img.name }}</div>
-                                          <div class="image-actions">
-                                            <button class="preview-btn" (click)="$event.stopPropagation(); previewImage(img)">
-                                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor">
-                                                <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
-                                                <circle cx="12" cy="12" r="3"></circle>
-                                              </svg>
-                                            </button>
-                                            <button class="remove-btn" (click)="$event.stopPropagation(); removePostProcessImage(img.id)">
-                                              <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor">
-                                                <line x1="18" y1="6" x2="6" y2="18"></line>
-                                                <line x1="6" y1="6" x2="18" y2="18"></line>
-                                              </svg>
-                                            </button>
-                                          </div>
-                                        </div>
-                                      </div>
-                                    }
-                                    <div class="add-more-btn" (click)="triggerFileInput('postProcess')">
-                                      <div class="add-icon">+</div>
-                                      <div class="add-text">添加更多</div>
-                                    </div>
-                                  </div>
-                                }
-                                <input type="file" 
-                                       id="postProcessFileInput"
-                                       accept="{{allowedImageTypes}}" 
-                                       multiple 
-                                       (change)="onPostProcessPicsSelected($event)" 
-                                       style="display: none;" />
-                              </div>
-                            }
-                            <div class="upload-actions">
-                              @if (canEditSection('delivery')) {
-                                <button class="primary-btn" [disabled]="postProcessImages.length===0" (click)="confirmPostProcessUpload()">确认上传</button>
-                              }
-                              @if (isTeamLeaderView()) { <button class="secondary-btn" (click)="syncUploadedImages('postProcess')">同步图片信息</button> }
-                              @if (!canEditSection('delivery')) { <span class="desc">只读</span> }
-                            </div>
-                          </div>
-                        </div>
                       } @else if (stage === '尾款结算') {
                         <div class="aftercare-section-container">
                           <app-settlement-card [settlements]="settlements"></app-settlement-card>

+ 11 - 16
src/app/pages/designer/project-detail/project-detail.ts

@@ -229,8 +229,8 @@ export class ProjectDetail implements OnInit, OnDestroy {
   referenceImages: any[] = [];
   cadFiles: any[] = [];
   
-  // 新增:10阶段顺序(串式流程)
-  stageOrder: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'];
+  // 新增:9阶段顺序(串式流程)- 删除后期阶段
+  stageOrder: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '尾款结算', '客户评价', '投诉处理'];
   // 新增:阶段展开状态(默认全部收起,当前阶段在数据加载后自动展开)
   expandedStages: Partial<Record<ProjectStage, boolean>> = {
     '订单创建': false,
@@ -239,17 +239,16 @@ export class ProjectDetail implements OnInit, OnDestroy {
     '建模': false,
     '软装': false,
     '渲染': false,
-    '后期': false,
     '尾款结算': false,
     '客户评价': false,
     '投诉处理': false,
   };
 
-  // 新增:四大板块定义与展开状态
+  // 新增:四大板块定义与展开状态 - 交付执行板块调整为三个阶段
   sections: Array<{ key: SectionKey; label: string; stages: ProjectStage[] }> = [
     { key: 'order', label: '订单创建', stages: ['订单创建'] },
     { key: 'requirements', label: '确认需求', stages: ['需求沟通', '方案确认'] },
-    { key: 'delivery', label: '交付执行', stages: ['建模', '软装', '渲染', '后期'] },
+    { key: 'delivery', label: '交付执行', stages: ['建模', '软装', '渲染'] },
     { key: 'aftercare', label: '售后', stages: ['尾款结算', '客户评价', '投诉处理'] }
   ];
   expandedSection: SectionKey | null = null;
@@ -361,7 +360,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     // 如果当前阶段在订单创建之后,说明订单创建已完成,不应标红
     const stageOrder = [
       '订单创建', '需求沟通', '方案确认', '建模', '软装', 
-      '渲染', '后期', '尾款结算', '客户评价', '投诉处理'
+      '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
     const currentIndex = stageOrder.indexOf(currentStage);
@@ -383,7 +382,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     // 定义阶段顺序
     const stageOrder = [
       '订单创建', '需求沟通', '方案确认', '建模', '软装', 
-      '渲染', '后期', '尾款结算', '客户评价', '投诉处理'
+      '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
     // 获取当前阶段和检查阶段的索引
@@ -1125,7 +1124,6 @@ export class ProjectDetail implements OnInit, OnDestroy {
       '建模': '项目执行',
       '软装': '项目执行',
       '渲染': '项目执行',
-      '后期': '项目执行',
       '尾款结算': '收尾验收',
       '客户评价': '收尾验收',
       '投诉处理': '收尾验收'
@@ -1666,10 +1664,10 @@ export class ProjectDetail implements OnInit, OnDestroy {
     this.postProcessImages = this.postProcessImages.filter(i => i.id !== id);
   }
 
-  // 新增:后期阶段确认上传并自动进入下一阶段(尾款结算
+  // 新增:后期阶段确认上传并自动进入下一阶段(已删除后期阶段,此方法保留但不会被调用
   confirmPostProcessUpload(): void {
-    if (this.postProcessImages.length === 0) return;
-    this.advanceToNextStage('后期');
+    // 由于删除了后期阶段,此方法不再使用
+    console.log('后期阶段已删除,此方法不再使用');
   }
 
   // 新增:尾款结算阶段确认并自动进入下一阶段(客户评价)
@@ -1774,7 +1772,6 @@ export class ProjectDetail implements OnInit, OnDestroy {
       case '建模':
       case '软装':
       case '渲染':
-      case '后期':
         return 'delivery';
       case '尾款结算':
       case '客户评价':
@@ -1836,7 +1833,6 @@ export class ProjectDetail implements OnInit, OnDestroy {
       '建模': 'modeling',
       '软装': 'softdecor',
       '渲染': 'render',
-      '后期': 'post',
       '尾款结算': 'settlement',
       '客户评价': 'customer-review',
       '投诉处理': 'complaint'
@@ -2209,7 +2205,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     
     const stageOrder = [
       '订单创建', '需求沟通', '方案确认', '建模', '软装', 
-      '渲染', '后期', '尾款结算', '客户评价', '投诉处理'
+      '渲染', '尾款结算', '客户评价', '投诉处理'
     ];
     
     const currentStageIndex = stageOrder.indexOf(this.project.currentStage);
@@ -2319,7 +2315,7 @@ export class ProjectDetail implements OnInit, OnDestroy {
     }
     
     // 检查是否已完成所有阶段
-    const allStages: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '后期', '尾款结算', '客户评价', '投诉处理'];
+    const allStages: ProjectStage[] = ['订单创建', '需求沟通', '方案确认', '建模', '软装', '渲染', '尾款结算', '客户评价', '投诉处理'];
     const currentIndex = allStages.indexOf(current);
     
     if (currentIndex === allStages.length - 1) {
@@ -2356,7 +2352,6 @@ export class ProjectDetail implements OnInit, OnDestroy {
       '建模': 40,
       '软装': 55,
       '渲染': 70,
-      '后期': 85,
       '尾款结算': 90,
       '客户评价': 95,
       '投诉处理': 100

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

@@ -283,7 +283,6 @@ export class WorkloadCalendarComponent implements OnInit, OnDestroy {
       case '建模':
       case '软装':
       case '渲染':
-      case '后期':
         return '执行';
       case '尾款结算':
       case '客户评价':

+ 3 - 3
src/app/services/project.service.ts

@@ -143,7 +143,7 @@ export class ProjectService {
       projectId: '1',
       projectName: '现代风格客厅设计',
       title: '处理客户反馈',
-      stage: '后期',
+      stage: '渲染',
       deadline: new Date('2025-09-08'),
       isOverdue: true,
       isCompleted: false,
@@ -341,7 +341,7 @@ export class ProjectService {
       id: 's3',
       projectId: '3',
       projectName: '欧式风格厨房设计',
-      stage: '后期',
+      stage: '渲染',
       amount: 2000,
       percentage: 20,
       status: '已结算',
@@ -385,7 +385,7 @@ export class ProjectService {
       id: 's7',
       projectId: 'proj-001',
       projectName: '现代风格客厅设计',
-      stage: '后期',
+      stage: '渲染',
       amount: 2000,
       percentage: 15,
       status: '待结算',