[CLAUDE] Supplier: Mig 62 expand 30-field + seed 4 NCC + FE form 2-app
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m7s

Phase A of the NCC/TP Excel-import backlog (anh Kiet FDC). Supplier
entity 9 -> 27 fields to hold the 30-column supplier database.

Backend:
- Supplier +18 nullable cols; SupplierType +CaHai=6 (append-only);
  new nullable SupplierStatus enum.
- Mig 62 ExpandSupplierFields (3-file): AddColumn x18 + guarded un-cram
  Sql (clear legacy crammed Note on the 4 seeded rows, exact-match).
  No new table (89), reversible Down.
- Seed fill-nulls-if-exists: populate 30 fields for TRUONGGIANG/TANPHU/
  TGN/DONGDUONG from Excel; idempotent, never clobbers existing cols.
- DTO + Create/Update commands + validators (MaximumLength-only, no
  NotEmpty so open-auth Create minimal payload stays valid) + 2 query
  projections.

Frontend (fe-admin + fe-user, byte-identical SHA-mirror):
- types/master.ts +18 fields +SupplierStatus; SuppliersPage form 4
  section groups + Status select + 3 NAS links via new shared PathLink
  (extracted from PE HoSoLink render+Copy). All new fields optional.

Excel upload auto-map = Phase B (deferred). Tests test-after (UAT mode).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-06 16:06:11 +07:00
parent 6d217f77ed
commit 778fc98b2f
21 changed files with 7440 additions and 23 deletions

View File

@ -10,7 +10,27 @@ public class Supplier : AuditableEntity
public string? TaxCode { get; set; } // Mã số thuế
public string? Phone { get; set; }
public string? Email { get; set; }
public string? Address { get; set; }
public string? ContactPerson { get; set; } // Người liên hệ
public string? Note { get; set; }
public string? Address { get; set; } // Địa chỉ xuất HĐ (đăng ký)
public string? ContactPerson { get; set; } // Người liên hệ chính
public string? Note { get; set; } // Ghi chú / lý do blacklist
// ---- S? go-live expansion (18 field bổ sung, tất cả nullable — import Excel "Database NCC") ----
public string? PackageCategory { get; set; } // Gói thầu (free-text)
public string? OfficeAddress { get; set; } // Địa chỉ văn phòng
public string? MailingAddress { get; set; } // Địa chỉ gửi thư
public string? Fax { get; set; }
public string? BankAccount { get; set; } // Số TK + tên + CN ngân hàng (composite raw)
public string? SecondaryBankAccount { get; set; } // Số TK phụ
public string? LegalRepresentative { get; set; } // Người đại diện pháp luật
public string? LegalRepTitle { get; set; } // Chức vụ đại diện
public string? AuthorizationNote { get; set; } // Giấy ủy quyền (free text)
public string? LinkGuq { get; set; } // Link GUQ (NAS path)
public string? LinkGpkd { get; set; } // Link GPKD (NAS path)
public string? LinkHsnl { get; set; } // Link HSNL (NAS path)
public string? ContactTitle { get; set; } // Chức vụ người liên hệ
public string? ContactPhone { get; set; } // SĐT chính (người liên hệ)
public string? MailRecipient { get; set; } // Người nhận thư / SĐT (composite raw)
public string? ReferralSource { get; set; } // Nguồn giới thiệu
public string? OwnerPmh { get; set; } // Người phụ trách (PMH)
public SupplierStatus? Status { get; set; } // Tình trạng hiện tại (nullable = chưa phân loại)
}

View File

@ -0,0 +1,8 @@
namespace SolutionErp.Domain.Master;
public enum SupplierStatus
{
DangHoatDong = 1, // Đang hoạt động
Blacklist = 2, // Blacklist
NgungHopTac = 3, // Ngừng hợp tác
}

View File

@ -7,4 +7,5 @@ public enum SupplierType
ToDoi = 3, // TĐ — Tổ đội
DonViDichVu = 4, // ĐVDV — Đơn vị dịch vụ
ChuDauTu = 5, // CĐT — Chủ đầu tư (đặc biệt, bypass quy trình CCM)
CaHai = 6, // Cả hai — vừa NCC vừa NTP (append S? go-live; int 1-5 giữ nguyên trên phiếu cũ)
}