[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)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m24s

This commit is contained in:
pqhuy1987
2026-06-11 14:14:15 +07:00
parent ea793a43fa
commit 3ebaf84531
4 changed files with 94 additions and 94 deletions

View File

@ -190,30 +190,18 @@ export function PeWorkspaceCreateView({
)}
</div>
<div className="md:col-span-2">
<Label className="text-[11px]">a. Tên gói thầu *</Label>
<Input
value={form.tenGoiThau}
onChange={e => setForm({ ...form, tenGoiThau: e.target.value })}
placeholder="vd Cung cấp bê tông"
/>
</div>
<div className="md:col-span-2">
<Label className="text-[11px]">b. Dự án *</Label>
<Select
value={form.projectId}
onChange={e => setForm({ ...form, projectId: e.target.value, budgetId: '' })}
>
<option value=""> Chọn dự án </option>
{projects.data?.map(p => (
<option key={p.id} value={p.id}>{p.code} {p.name}</option>
))}
</Select>
</div>
<div className="md:col-span-2">
<Label className="text-[11px]">c. Hạng mục công việc *</Label>
{/* [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. */}
<Label className="text-[11px]">a. Tên gói thầu (Hạng mục công việc) *</Label>
<Select
value={form.workItemId}
onChange={e => setForm({ ...form, workItemId: e.target.value })}
onChange={e => {
const id = e.target.value
const w = workItems.data?.find(x => x.id === id)
setForm({ ...form, workItemId: id, tenGoiThau: id ? (w?.name ?? '') : '' })
}}
required
>
<option value=""> Chọn hạng mục công việc </option>
@ -229,6 +217,18 @@ export function PeWorkspaceCreateView({
</p>
)}
</div>
<div className="md:col-span-2">
<Label className="text-[11px]">b. Dự án *</Label>
<Select
value={form.projectId}
onChange={e => setForm({ ...form, projectId: e.target.value, budgetId: '' })}
>
<option value=""> Chọn dự án </option>
{projects.data?.map(p => (
<option key={p.id} value={p.id}>{p.code} {p.name}</option>
))}
</Select>
</div>
<div>
<Label className="text-[11px]">Đa điểm</Label>
<Input