From e832a508e1b3c531fb3e1b9761e18e1b55e3d76a Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Fri, 5 Sep 2025 11:59:38 +0000 Subject: (김준회) RFQ 인터페이스 처리, 변수명 오타 수정(VendorPossibleMaterials), 협력업체 관리페이지 구매요구사항 반영 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/vendorColumnsConfig.ts | 233 +++++++++++++++++++++++++++++++++--------- 1 file changed, 187 insertions(+), 46 deletions(-) (limited to 'config') diff --git a/config/vendorColumnsConfig.ts b/config/vendorColumnsConfig.ts index 9667e8c7..35a4abd3 100644 --- a/config/vendorColumnsConfig.ts +++ b/config/vendorColumnsConfig.ts @@ -1,13 +1,13 @@ -import { VendorWithType } from "@/db/schema/vendors"; +import { VendorWithTypeAndMaterials } from "@/db/schema/vendors"; /** * 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정 */ export interface VendorColumnConfig { /** - * "조인 결과" 객체(UserWithCompanyAndRoles)의 어느 필드를 표시할지 + * "조인 결과" 객체(VendorWithTypeAndMaterials)의 어느 필드를 표시할지 */ - id: keyof VendorWithType; + id: keyof VendorWithTypeAndMaterials; /** 화면·엑셀에서 보여줄 컬럼명 */ label: string; @@ -20,80 +20,221 @@ export interface VendorColumnConfig { /** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */ type?: string; + + /** (선택) 컬럼 너비 설정 */ + width?: number; + + /** (선택) 최소 너비 */ + minWidth?: number; + + /** (선택) 최대 너비 */ + maxWidth?: number; } /** - * 실제로 "User + Company + Roles" 정보 테이블에서 - * 어떤 컬럼들을 어떤 순서로 표시할 것인지 정의. + * 프롬프트 요구사항에 따른 협력업체 관리 페이지 컬럼 정의 */ export const vendorColumnsConfig: VendorColumnConfig[] = [ + // 선택 컬럼은 별도 처리 (체크박스) + { - id: "vendorCode", - label: "업체 코드", - excelHeader: "업체 코드", + id: "id", + label: "No.", + excelHeader: "No.", + type: "number", + width: 80, + minWidth: 60, }, { id: "vendorName", label: "업체명", excelHeader: "업체명", + type: "string", + width: 200, + minWidth: 150, + maxWidth: 300, + }, + + { + id: "country", + label: "국가", + excelHeader: "국가", + type: "string", + width: 100, + minWidth: 80, + }, + + { + id: "taxId", + label: "사업자번호", + excelHeader: "사업자번호", + type: "string", + width: 140, + minWidth: 120, }, { id: "vendorTypeName", - label: "업체 유형", - excelHeader: "업체 유형", - // group: "업체 정보", + label: "업체유형", + excelHeader: "업체유형", type: "string", + width: 120, + minWidth: 100, }, - - // 업체 분류 컬럼 추가 (원하는 경우) + { - id: "vendorCategory", - label: "업체 분류", - excelHeader: "업체 분류", - // group: "업체 정보", + id: "primaryMaterial1", + label: "업체대표품목1", + excelHeader: "업체대표품목1", type: "string", + width: 180, + minWidth: 150, + maxWidth: 250, }, + { - id: "status", - label: "업체 승인 상태", - excelHeader: "업체 승인 상태", - // group: "Metadata", + id: "primaryMaterial2", + label: "업체대표품목2", + excelHeader: "업체대표품목2", + type: "string", + width: 180, + minWidth: 150, + maxWidth: 250, }, + { - id: "address", - label: "주소", - excelHeader: "주소", + id: "primaryMaterial3", + label: "업체대표품목3", + excelHeader: "업체대표품목3", + type: "string", + width: 180, + minWidth: 150, + maxWidth: 250, }, + { - id: "country", - label: "국가", - excelHeader: "국가", - // type: "string[]", // 필요하면 추가 + id: "businessSize", + label: "기업규모", + excelHeader: "기업규모", + type: "string", + width: 100, + minWidth: 80, + }, + + { + id: "isAssociationMember", + label: "성조회가입여부", + excelHeader: "성조회가입여부", + type: "string", + width: 140, + minWidth: 120, + }, + + // TODO 구현을 위한 컬럼들 (UI만) + { + id: "regularEvaluationGrade", + label: "정기평가등급", + excelHeader: "정기평가등급", + type: "string", + group: "평가정보", + width: 120, + minWidth: 100, + }, + + { + id: "faContract", + label: "FA체결", + excelHeader: "FA체결", + type: "string", + group: "계약정보", + width: 100, + minWidth: 80, + }, + + { + id: "avlRegistration", + label: "AVL등재", + excelHeader: "AVL등재", + type: "string", + group: "등록정보", + width: 100, + minWidth: 80, + }, + + { + id: "regularVendorRegistration", + label: "정규업체등록현황", + excelHeader: "정규업체등록현황", + type: "string", + group: "등록정보", + width: 160, + minWidth: 140, + }, + + // 최근발주실적 그룹 + { + id: "recentPoNumber", + label: "PO/계약번호", + excelHeader: "최근 PO/계약번호", + type: "string", + group: "최근발주실적", + width: 160, + minWidth: 140, + maxWidth: 200, + }, + + { + id: "recentPoOrderBy", + label: "발주담당자", + excelHeader: "최근 발주담당자", + type: "string", + group: "최근발주실적", + width: 120, + minWidth: 100, + }, + + { + id: "recentPoDate", + label: "발주일", + excelHeader: "최근 발주일", + type: "date", + group: "최근발주실적", + width: 120, + minWidth: 100, }, - // 필요 시 createdAt도 조인해서 가져왔다면 아래처럼 추가 + + // 최근조달실적 그룹 { - id: "email", - label: "이메일", - excelHeader: "이메일", - // group: "Metadata", + id: "recentDeliveryNumber", + label: "PO/계약번호", + excelHeader: "최근 조달 PO/계약번호", + type: "string", + group: "최근조달실적", + width: 160, + minWidth: 140, + maxWidth: 200, }, + { - id: "website", - label: "웹사이트", - excelHeader: "웹사이트", - // group: "Metadata", - }, { - id: "creditRating", - label: "신용평가등급", - excelHeader: "신용평가등급", - // group: "Metadata", + id: "recentDeliveryBy", + label: "조달담당자", + excelHeader: "최근 조달담당자", + type: "string", + group: "최근조달실적", + width: 120, + minWidth: 100, }, + { - id: "cashFlowRating", - label: "현금흐름등급", - excelHeader: "웹사이트", - // group: "Metadata", + id: "recentDeliveryDate", + label: "납품/선적일", + excelHeader: "최근 납품/선적일", + type: "date", + group: "최근조달실적", + width: 130, + minWidth: 110, }, + + // 상세 (기존의 액션 버튼) - 별도 처리됨 ]; \ No newline at end of file -- cgit v1.2.3