ソースを参照

feat: order contact & requirements

ryanemax 1 日 前
コミット
4be8dfa81d

+ 0 - 4
src/modules/project/pages/project-detail/stages/stage-aftercare.component.ts

@@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
 import { ActivatedRoute } from '@angular/router';
 import { FmodeObject, FmodeParse } from 'fmode-ng/parse';
-import { NovaUploadService } from 'fmode-ng/storage';
 import { ProjectFileService } from '../../../services/project-file.service';
 import { ProductSpaceService, Project } from '../../../services/product-space.service';
 
@@ -149,9 +148,6 @@ export class StageAftercareComponent implements OnInit {
   generating: boolean = false;
   saving: boolean = false;
 
-  // 注入上传服务
-  private uploadService: NovaUploadService = inject(NovaUploadService);
-
   constructor(
     private route: ActivatedRoute,
     private projectFileService: ProjectFileService,

+ 4 - 38
src/modules/project/pages/project-detail/stages/stage-order.component.html

@@ -11,41 +11,7 @@
 <!-- 订单分配内容 -->
 @if (!loading) {
   <div class="stage-order-container">
-    <!-- 1. 客户信息卡片 -->
-    <div class="card customer-card">
-      <div class="card-header">
-        <h3 class="card-title">
-          <svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
-            <path fill="currentColor" d="M258.9 48C141.92 46.42 46.42 141.92 48 258.9c1.56 112.19 92.91 203.54 205.1 205.1 117 1.6 212.48-93.9 210.88-210.88C462.44 140.91 371.09 49.56 258.9 48zM385.32 375.25a4 4 0 01-6.14-.32 124.27 124.27 0 00-32.35-29.59C321.37 329 289.11 320 256 320s-65.37 9-90.83 25.34a124.24 124.24 0 00-32.35 29.58 4 4 0 01-6.14.32A175.32 175.32 0 0180 259c-1.63-97.31 78.22-178.76 175.57-179S432 158.81 432 256a175.32 175.32 0 01-46.68 119.25z"/><path fill="currentColor" d="M256 144c-19.72 0-37.55 7.39-50.22 20.82s-19 32-17.57 51.93C191.11 256 221.52 288 256 288s64.83-32 67.79-71.24c1.48-19.74-4.8-38.14-17.68-51.82C293.39 151.44 275.59 144 256 144z"/>
-          </svg>
-          客户信息
-        </h3>
-      </div>
-      <div class="card-content">
-        <div class="info-list">
-          <div class="info-item">
-            <p class="info-label">客户姓名</p>
-            <h4 class="info-value">{{ customer?.get('name') }}</h4>
-          </div>
-          <div class="info-item">
-            <p class="info-label">来源渠道</p>
-            <h4 class="info-value">{{ customer?.get('source') || '未知' }}</h4>
-          </div>
-          @if (customer?.get('data')?.preferences) {
-            <div class="info-item">
-              <p class="info-label">风格偏好</p>
-              <div class="preference-tags">
-                @for (style of customer?.get('data')?.preferences?.style || []; track style) {
-                  <span class="badge badge-tertiary">{{ style }}</span>
-                }
-              </div>
-            </div>
-          }
-        </div>
-      </div>
-    </div>
-
-    <!-- 2. 项目基本信息 -->
+    <!-- 1. 项目基本信息 -->
     <div class="card project-info-card">
       <div class="card-header">
         <h3 class="card-title">
@@ -134,7 +100,7 @@
       </div>
     </div>
 
-    <!-- 4. 基于Product表的报价管理 -->
+    <!-- 2. 基于Product表的报价管理 -->
     <div class="card quotation-card">
       <div class="card-header">
         <h3 class="card-title">
@@ -161,14 +127,14 @@
       </div>
     </div>
 
-    <!-- 5. 设计师分配 -->
+    <!-- 3. 设计师分配 -->
     <app-team-assign
       [project]="project"
       [canEdit]="canEdit"
       [currentUser]="currentUser">
     </app-team-assign>
 
-    <!-- 6. 操作按钮 -->
+    <!-- 4. 操作按钮 -->
     @if (canEdit) {
       <div class="action-buttons">
         <button

+ 2 - 3
src/modules/project/pages/project-detail/stages/stage-order.component.ts

@@ -2,7 +2,8 @@ import { Component, OnInit, Input, ViewChild, ElementRef, ChangeDetectionStrateg
 import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
 import { ActivatedRoute } from '@angular/router';
-import { FmodeObject, FmodeParse } from 'fmode-ng/parse';
+import { FmodeObject, FmodeParse, WxworkSDK } from 'fmode-ng/core';
+
 import { ProjectFileService } from '../../../services/project-file.service';
 import { ProductSpaceService, Project } from '../../../services/product-space.service';
 import {
@@ -12,7 +13,6 @@ import {
   BUSINESS_TYPES,
   HOME_DEFAULT_ROOMS,
   ADJUSTMENT_RULES,
-  getBasePrice,
   calculateFinalPrice,
   getDefaultProcesses
 } from '../../../config/quotation-rules';
@@ -285,7 +285,6 @@ export class StageOrderComponent implements OnInit {
       }
 
       if (!this.currentUser && this.cid) {
-        const { WxworkSDK } = await import('fmode-ng/core');
         const wxwork = new WxworkSDK({ cid: this.cid, appId: 'crm' });
         this.currentUser = await wxwork.getCurrentUser();
 

+ 0 - 3
src/modules/project/pages/project-detail/stages/stage-requirements.component.html

@@ -20,7 +20,6 @@
               class="space-tab"
               [class.active]="activeProductId == product.id"
               (click)="selectProduct(product.id)">
-              <span class="space-icon">{{ getSpaceIcon(product.type) }}</span>
               <span>{{ getProductDisplayName(product) }}</span>
               <span class="progress-indicator" [style.width]="calculateProductCompletion(product.id) + '%'"></span>
             </button>
@@ -513,7 +512,6 @@
           <div class="card space-requirement-card" [class.active]="activeProductId == space.id">
             <div class="card-header">
               <h3 class="card-title">
-                <span class="space-icon">{{ getSpaceIcon(space.type) }}</span>
                 {{ getSpaceDisplayName(space) }}
               </h3>
               <span class="completion-badge">{{ calculateProductCompletion(space.id) }}%</span>
@@ -782,7 +780,6 @@
               @for (space of aiSolution.spaces; track space.id) {
                 <div class="space-solution-item">
                   <div class="space-header">
-                    <span class="space-icon">{{ getSpaceIcon(space.type) }}</span>
                     <h4>{{ space.name }}</h4>
                     <span class="badge" [class]="getProcessBadgeClass(space.type)">{{ getSpaceTypeName(space.type) }}</span>
                   </div>

+ 2 - 2
src/modules/project/pages/project-detail/stages/stage-requirements.component.ts

@@ -4,7 +4,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { ActivatedRoute } from '@angular/router';
 import { IonIcon } from '@ionic/angular/standalone';
 import { ProductSpaceService, Project } from '../../../services/product-space.service';
-import { completionJSON } from 'fmode-ng';
+import { completionJSON } from 'fmode-ng/core';
 
 /**
  * 确认需求阶段组件 - Product表统一空间管理
@@ -21,7 +21,7 @@ export class StageRequirementsComponent implements OnInit {
   @Input() project: any = null;
   @Input() customer: any = null;
   @Input() currentUser: any = null;
-  @Input() canEdit: boolean = false;
+  @Input() canEdit: boolean = true;
 
   // 路由参数
   cid: string = '';