summaryrefslogtreecommitdiff
path: root/lib/vendor-pool/excel-utils.ts
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-05 16:07:43 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-05 16:07:43 +0900
commit208ed7ff11d0f822d3d243c5833d31973904349e (patch)
treeb1a15e3a7f8242294397f433a8484102c5743e69 /lib/vendor-pool/excel-utils.ts
parentad6bde0250cfe014d5f78747ec76ac59df95a25d (diff)
(김준회) vendor-pool: excel-import 코드기반검색처리, 템플릿 변경 (구매 김수진 프로 요청사항)
Diffstat (limited to 'lib/vendor-pool/excel-utils.ts')
-rw-r--r--lib/vendor-pool/excel-utils.ts55
1 files changed, 25 insertions, 30 deletions
diff --git a/lib/vendor-pool/excel-utils.ts b/lib/vendor-pool/excel-utils.ts
index c1c2ac0a..81426ebd 100644
--- a/lib/vendor-pool/excel-utils.ts
+++ b/lib/vendor-pool/excel-utils.ts
@@ -17,25 +17,24 @@ export interface ExcelColumnConfig {
export const vendorPoolExcelColumns: ExcelColumnConfig[] = [
{ accessorKey: 'constructionSector', header: '조선/해양', width: 15, required: true },
{ accessorKey: 'htDivision', header: 'H/T구분', width: 15, required: true },
- { accessorKey: 'designCategoryCode', header: '설계기능코드', width: 20 },
- { accessorKey: 'designCategory', header: '설계기능(공종)', width: 25, required: true },
+ { accessorKey: 'designCategoryCode', header: '설계기능코드', width: 20, required: true },
+ { accessorKey: 'designCategory', header: '설계기능(공종)', width: 25 }, // 코드로 자동완성 가능
{ accessorKey: 'equipBulkDivision', header: 'Equip/Bulk', width: 15 },
{ accessorKey: 'packageCode', header: '패키지코드', width: 20 },
{ accessorKey: 'packageName', header: '패키지명', width: 25 },
{ accessorKey: 'materialGroupCode', header: '자재그룹코드', width: 20 },
- { accessorKey: 'materialGroupName', header: '자재그룹명', width: 30, required: true },
+ { accessorKey: 'materialGroupName', header: '자재그룹명', width: 30 }, // 코드로 자동완성 가능
{ accessorKey: 'smCode', header: 'SM Code', width: 15 },
{ accessorKey: 'similarMaterialNamePurchase', header: '유사자재명(구매)', width: 25 },
{ accessorKey: 'similarMaterialNameOther', header: '유사자재명(기타)', width: 25 },
{ accessorKey: 'vendorCode', header: '협력업체코드', width: 20 },
- { accessorKey: 'vendorName', header: '협력업체명', width: 25, required: true },
- { accessorKey: 'taxId', header: '사업자번호', width: 20, required: true },
+ { accessorKey: 'vendorName', header: '협력업체명', width: 25 }, // 코드로 자동완성 가능
{ accessorKey: 'faTarget', header: 'FA대상', width: 15, type: 'boolean' },
{ accessorKey: 'faStatus', header: 'FA현황', width: 15 },
{ accessorKey: 'tier', header: '등급', width: 15, required: true },
{ accessorKey: 'isAgent', header: 'Agent여부', width: 15, type: 'boolean' },
{ accessorKey: 'contractSignerCode', header: '계약서명주체코드', width: 20 },
- { accessorKey: 'contractSignerName', header: '계약서명주체명', width: 25, required: true },
+ { accessorKey: 'contractSignerName', header: '계약서명주체명', width: 25 }, // 코드로 자동완성 가능
{ accessorKey: 'headquarterLocation', header: '본사위치', width: 20, required: true },
{ accessorKey: 'manufacturingLocation', header: '제작/선적지', width: 20, required: true },
{ accessorKey: 'avlVendorName', header: 'AVL등재업체명', width: 25, required: true },
@@ -151,33 +150,29 @@ export async function createVendorPoolTemplate(filename?: string) {
// 가이드 내용
const guideContent = [
'',
- '■ 필수 입력 필드 (엑셀 헤더가 빨간색으로 표시됨)',
- ' - 조선/해양: "조선" 또는 "해양"',
- ' - H/T구분: "H", "T", 또는 "공통"',
- ' - 설계기능(공종): 설계기능 한글명 (예: 전장, 기관)',
- ' - 자재그룹명: 해당 자재그룹 정보',
- ' - 협력업체명: 업체 한글명',
- ' - 사업자번호: 업체 사업자등록번호',
- ' - 등급: "Tier 1", "Tier 2", "등급 외"',
- ' - 계약서명주체명: 계약 주체 업체명',
- ' - 본사위치: 국가명을 입력',
- ' - 제작/선적지: 입력',
- ' - AVL등재업체명: AVL에 등재된 업체명',
+ '■ 필수 입력 필드 (헤더가 빨간색)',
+ ' - 조선/해양, H/T구분, 설계기능코드',
+ ' - 등급, 본사위치, 제작/선적지, AVL등재업체명',
+ '',
+ '■ 자동완성 기능 (코드 입력 시)',
+ ' 1. 코드가 있는 경우 → 코드만 입력하면 명칭 자동완성',
+ ' • 설계기능코드 → 설계기능명',
+ ' • 자재그룹코드 → 자재그룹명',
+ ' • 협력업체코드 → 협력업체명',
+ ' • 계약서명주체코드 → 계약서명주체명',
'',
- '■ Boolean (참/거짓) 필드 입력법',
- ' - TRUE, true, 1, Y, y, O, o → 참',
- ' - FALSE, false, 0, N, n → 거짓',
- ' - 빈 값은 기본적으로 거짓(false)으로 처리',
+ ' 2. 코드가 없는 경우 → 명칭 직접 입력',
'',
- '■ 주의사항',
- ' - 첫 번째 행의 안내 텍스트는 삭제하지 마세요',
- ' - 헤더 행(2번째 행)은 수정하지 마세요',
- ' - 데이터는 3번째 행부터 입력하세요',
+ '■ Boolean 필드',
+ ' - TRUE/true/1/Y/O → 참',
+ ' - FALSE/false/0/N 또는 빈 값 → 거짓',
'',
- '■ 문제 해결',
- ' - 필드 길이 초과 오류: 해당 필드의 글자 수를 확인하세요',
- ' - 필수 필드 누락: 빨간색 * 표시 필드를 모두 입력했는지 확인하세요',
- ' - Boolean 값 오류: TRUE/FALSE 형태로 입력했는지 확인하세요'
+ '■ 입력 규칙',
+ ' - 조선/해양: "조선" 또는 "해양"',
+ ' - H/T구분: "H", "T", "공통"',
+ ' - 설계기능코드: 2자리 이하',
+ ' - Equip/Bulk: "E", "B", "S" (1자리)',
+ ' - 등급: "Tier 1", "Tier 2", "등급 외"'
]
guideContent.forEach((content, index) => {