Procházet zdrojové kódy

feat:project-001

0235711 před 2 dny
rodič
revize
4fdda0f73e

+ 1 - 1
src/app/pages/customer-service/project-list/project-list.html

@@ -162,7 +162,7 @@
               </svg>
               <span>联系</span>
             </button>
-            <a [routerLink]="['/designer/project-detail', project.id]" class="primary-btn card-action">
+            <a [routerLink]="['/customer-service/project-detail', project.id]" class="primary-btn card-action">
               <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor">
                 <path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
               </svg>

+ 37 - 4
src/app/pages/hr/employee-detail/employee-detail.ts

@@ -48,6 +48,10 @@ export class EmployeeDetailComponent implements OnInit {
 
   employee = signal<Employee | null>(null);
   screeningForm: FormGroup;
+  // 新增:审核弹窗相关状态
+  showReviewDialog = false;
+  reviewResult: 'approved' | 'rejected' | null = null;
+  reviewComment = '';
 
   // 模拟员工数据
   private mockEmployees: Employee[] = [
@@ -266,13 +270,17 @@ export class EmployeeDetailComponent implements OnInit {
   }
 
   approveScreening() {
-    this.screeningForm.patchValue({ status: 'approved' });
-    this.openScreeningDialog();
+    // 改为打开审核弹窗
+    this.reviewResult = 'approved';
+    this.reviewComment = '';
+    this.showReviewDialog = true;
   }
 
   rejectScreening() {
-    this.screeningForm.patchValue({ status: 'rejected' });
-    this.openScreeningDialog();
+    // 改为打开审核弹窗
+    this.reviewResult = 'rejected';
+    this.reviewComment = '';
+    this.showReviewDialog = true;
   }
 
   private openScreeningDialog() {
@@ -300,6 +308,31 @@ export class EmployeeDetailComponent implements OnInit {
     }
   }
 
+  // 新增:模板绑定的方法
+  closeReviewDialog() {
+    this.showReviewDialog = false;
+  }
+
+  submitReview() {
+    if (!this.reviewResult) {
+      this.showSnackBar('请选择审核结果');
+      return;
+    }
+    const currentEmployee = this.employee();
+    if (currentEmployee) {
+      const updatedEmployee: Employee = {
+        ...currentEmployee,
+        screeningStatus: this.reviewResult,
+        screeningComment: this.reviewComment,
+        screeningTime: new Date()
+      } as Employee;
+      this.employee.set(updatedEmployee);
+      this.showSnackBar('审核结果已保存');
+    }
+    this.showReviewDialog = false;
+    this.reviewComment = '';
+  }
+
   viewAttendance() {
     this.router.navigate(['/hr/attendance'], { 
       queryParams: { employee: this.employee()?.id }