From 9f3b8915ab20f177edafd3c4a4cc1ca0da0fc766 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 13 Jun 2025 07:22:04 +0000 Subject: (최겸) 기술영업 아이템 수정(컬럼명 및 item table FK 삭제, rfq에서 사용하는 service 수정) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/items-tech/table/hull/import-item-handler.tsx | 10 +++------- lib/items-tech/table/hull/item-excel-template.tsx | 6 +++--- lib/items-tech/table/hull/offshore-hull-table-columns.tsx | 12 ++++++------ 3 files changed, 12 insertions(+), 16 deletions(-) (limited to 'lib/items-tech/table/hull') diff --git a/lib/items-tech/table/hull/import-item-handler.tsx b/lib/items-tech/table/hull/import-item-handler.tsx index 8c0e1cfa..aa0c7992 100644 --- a/lib/items-tech/table/hull/import-item-handler.tsx +++ b/lib/items-tech/table/hull/import-item-handler.tsx @@ -60,16 +60,14 @@ export async function processHullFileImport( try { // 필드 매핑 (한글/영문 필드명 모두 지원) - const itemCode = row["아이템 코드"] || row["itemCode"] || ""; - const itemName = row["아이템 명"] || row["itemName"] || "기술영업"; // 기본값 설정 + const itemCode = row["자재 그룹"] || row["itemCode"] || ""; const workType = row["기능(공종)"] || row["workType"] || ""; - const itemList = row["아이템 리스트"] || row["itemList"] || null; - const subItemList = row["서브 아이템 리스트"] || row["subItemList"] || null; + const itemList = row["자재명"] || row["itemList"] || null; + const subItemList = row["자재명(상세)"] || row["subItemList"] || null; // 데이터 정제 const cleanedRow = { itemCode: typeof itemCode === 'string' ? itemCode.trim() : String(itemCode).trim(), - itemName: typeof itemName === 'string' ? itemName.trim() : String(itemName).trim(), workType: typeof workType === 'string' ? workType.trim() : String(workType).trim(), itemList: itemList ? (typeof itemList === 'string' ? itemList : String(itemList)) : null, subItemList: subItemList ? (typeof subItemList === 'string' ? subItemList : String(subItemList)) : null, @@ -91,9 +89,7 @@ export async function processHullFileImport( // 해양 HULL 아이템 생성 const result = await createOffshoreHullItem({ itemCode: cleanedRow.itemCode, - itemName: cleanedRow.itemName, // Excel에서 가져온 값 또는 기본값 사용 workType: cleanedRow.workType as "HA" | "HE" | "HH" | "HM" | "NC", - description: null, itemList: cleanedRow.itemList, subItemList: cleanedRow.subItemList, }); diff --git a/lib/items-tech/table/hull/item-excel-template.tsx b/lib/items-tech/table/hull/item-excel-template.tsx index 61fddecc..13ec1973 100644 --- a/lib/items-tech/table/hull/item-excel-template.tsx +++ b/lib/items-tech/table/hull/item-excel-template.tsx @@ -18,10 +18,10 @@ export async function exportHullItemTemplate() { // 컬럼 헤더 정의 및 스타일 적용 worksheet.columns = [ - { header: '아이템 코드', key: 'itemCode', width: 15 }, + { header: '자재 그룹', key: 'itemCode', width: 15 }, { header: '기능(공종)', key: 'workType', width: 15 }, - { header: '아이템 리스트', key: 'itemList', width: 20 }, - { header: '서브 아이템 리스트', key: 'subItemList', width: 20 }, + { header: '자재명', key: 'itemList', width: 20 }, + { header: '자재명(상세)', key: 'subItemList', width: 20 }, ]; // 헤더 스타일 적용 diff --git a/lib/items-tech/table/hull/offshore-hull-table-columns.tsx b/lib/items-tech/table/hull/offshore-hull-table-columns.tsx index 7bc02173..efc6c583 100644 --- a/lib/items-tech/table/hull/offshore-hull-table-columns.tsx +++ b/lib/items-tech/table/hull/offshore-hull-table-columns.tsx @@ -112,13 +112,13 @@ export function getOffshoreHullColumns({ setRowAction }: GetColumnsProps): Colum { accessorKey: "itemCode", header: ({ column }) => ( - + ), cell: ({ row }) =>
{row.original.itemCode}
, enableSorting: true, enableHiding: true, meta: { - excelHeader: "Material Group", + excelHeader: "자재 그룹", }, }, { @@ -136,25 +136,25 @@ export function getOffshoreHullColumns({ setRowAction }: GetColumnsProps): Colum { accessorKey: "itemList", header: ({ column }) => ( - + ), cell: ({ row }) =>
{row.original.itemList || "-"}
, enableSorting: true, enableHiding: true, meta: { - excelHeader: "아이템 리스트", + excelHeader: "자재명", }, }, { accessorKey: "subItemList", header: ({ column }) => ( - + ), cell: ({ row }) =>
{row.original.subItemList || "-"}
, enableSorting: true, enableHiding: true, meta: { - excelHeader: "서브 아이템 리스트", + excelHeader: "자재명(상세)", }, }, { -- cgit v1.2.3