From 3ebaf84531d4136440c4065a59515fbe6fe8adc3 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Thu, 11 Jun 2026 14:14:15 +0700 Subject: [PATCH] [CLAUDE] PurchaseEvaluation: gop Ten goi thau = chon Hang muc cong viec (anh Kiet FDC chot 14:06) - 1 select set ca workItemId + tenGoiThau, phieu cu giu-nguyen null-safe, SHA256 mirror x2 app (S58) --- fe-admin/src/components/pe/PeHeaderForm.tsx | 47 ++++++++--------- .../components/pe/PeWorkspaceCreateView.tsx | 50 +++++++++---------- fe-user/src/components/pe/PeHeaderForm.tsx | 47 ++++++++--------- .../components/pe/PeWorkspaceCreateView.tsx | 44 ++++++++-------- 4 files changed, 94 insertions(+), 94 deletions(-) diff --git a/fe-admin/src/components/pe/PeHeaderForm.tsx b/fe-admin/src/components/pe/PeHeaderForm.tsx index 0727505..519a68f 100644 --- a/fe-admin/src/components/pe/PeHeaderForm.tsx +++ b/fe-admin/src/components/pe/PeHeaderForm.tsx @@ -185,12 +185,30 @@ export function PeHeaderForm({
- - setForm({ ...form, tenGoiThau: e.target.value })} - placeholder="vd Cung cấp bê tông" - /> + {/* [S58] anh Kiệt (FDC) chốt 06-11: "Hạng mục công việc CHÍNH LÀ tên gói + thầu" → gộp 2 field S57bis thành 1 select: chọn hạng mục set cả + workItemId + tenGoiThau (= tên hạng mục). Phiếu cũ (workItemId null, + tên nhập tay): option đầu "Giữ nguyên" — không ép đổi, PUT null-safe. */} + +
@@ -207,23 +225,6 @@ export function PeHeaderForm({
-
- {/* S57bis — phiếu dạng "Dự án – Hạng mục công việc" (sếp chốt). Edit-mode - CHO đổi (BE UpdateDraft hỗ trợ); phiếu cũ null → bắt đầu rỗng, không ép. */} - - -
-
diff --git a/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx b/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx index d91e0dc..67a5bbe 100644 --- a/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx +++ b/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx @@ -93,8 +93,7 @@ export function PeWorkspaceCreateView({ select: rows => rows.filter(r => r.isActive !== false), }) - // Mig 23 — fetch list quy trình duyệt V2 cho User chọn (filter theo - // ApplicableType khớp với defaultType: 1=DuyetNcc / 2=DuyetNccPhuongAn). + // Mig 23 — fetch list quy trình duyệt V2 (filter ApplicableType khớp defaultType). // Mig 25 — chỉ hiện workflows admin đã ghim "cho user chọn" (IsUserSelectable=true). const approvalWorkflows = useQuery({ queryKey: ['approval-workflows-v2-active', defaultType], @@ -186,36 +185,23 @@ export function PeWorkspaceCreateView({ {approvalWorkflows.data && approvalWorkflows.data.length === 0 && (

- ⚠ Chưa có quy trình duyệt cho loại {PurchaseEvaluationTypeLabel[form.type]}. Vào{' '} - /system/approval-workflows-v2 để tạo trước. + ⚠ Chưa có quy trình duyệt cho loại {PurchaseEvaluationTypeLabel[form.type]}. Liên hệ admin tạo trước.

)}
- - setForm({ ...form, tenGoiThau: e.target.value })} - placeholder="vd Cung cấp bê tông" - /> -
-
- - -
-
- + {/* [S58] anh Kiệt (FDC) chốt 06-11: "Hạng mục công việc CHÍNH LÀ tên + gói thầu" → gộp field c (S57bis) vào a: chọn từ danh mục Hạng mục + thay nhập tay; chọn 1 phát set cả workItemId + tenGoiThau (= tên + hạng mục). Phiếu vẫn lưu cả 2 field BE — không đổi contract. */} + setForm({ ...form, projectId: e.target.value, budgetId: '' })} + > + + {projects.data?.map(p => ( + + ))} + +
- - setForm({ ...form, tenGoiThau: e.target.value })} - placeholder="vd Cung cấp bê tông" - /> + {/* [S58] anh Kiệt (FDC) chốt 06-11: "Hạng mục công việc CHÍNH LÀ tên gói + thầu" → gộp 2 field S57bis thành 1 select: chọn hạng mục set cả + workItemId + tenGoiThau (= tên hạng mục). Phiếu cũ (workItemId null, + tên nhập tay): option đầu "Giữ nguyên" — không ép đổi, PUT null-safe. */} + +
@@ -207,23 +225,6 @@ export function PeHeaderForm({
-
- {/* S57bis — phiếu dạng "Dự án – Hạng mục công việc" (sếp chốt). Edit-mode - CHO đổi (BE UpdateDraft hỗ trợ); phiếu cũ null → bắt đầu rỗng, không ép. */} - - -
-
diff --git a/fe-user/src/components/pe/PeWorkspaceCreateView.tsx b/fe-user/src/components/pe/PeWorkspaceCreateView.tsx index 53ce82a..67a5bbe 100644 --- a/fe-user/src/components/pe/PeWorkspaceCreateView.tsx +++ b/fe-user/src/components/pe/PeWorkspaceCreateView.tsx @@ -190,30 +190,18 @@ export function PeWorkspaceCreateView({ )}
- - setForm({ ...form, tenGoiThau: e.target.value })} - placeholder="vd Cung cấp bê tông" - /> -
-
- - -
-
- + {/* [S58] anh Kiệt (FDC) chốt 06-11: "Hạng mục công việc CHÍNH LÀ tên + gói thầu" → gộp field c (S57bis) vào a: chọn từ danh mục Hạng mục + thay nhập tay; chọn 1 phát set cả workItemId + tenGoiThau (= tên + hạng mục). Phiếu vẫn lưu cả 2 field BE — không đổi contract. */} + setForm({ ...form, projectId: e.target.value, budgetId: '' })} + > + + {projects.data?.map(p => ( + + ))} + +