summaryrefslogtreecommitdiff
path: root/lib/vendor-document-list
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vendor-document-list')
-rw-r--r--lib/vendor-document-list/plant/document-stages-columns.tsx90
-rw-r--r--lib/vendor-document-list/plant/shi-buyer-system-api.ts38
2 files changed, 78 insertions, 50 deletions
diff --git a/lib/vendor-document-list/plant/document-stages-columns.tsx b/lib/vendor-document-list/plant/document-stages-columns.tsx
index 9a53b55b..af68ddb2 100644
--- a/lib/vendor-document-list/plant/document-stages-columns.tsx
+++ b/lib/vendor-document-list/plant/document-stages-columns.tsx
@@ -248,7 +248,7 @@ export function getDocumentStagesColumns({
columns.push({
accessorKey: "docNumber",
header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="Document Number" />
+ <DataTableColumnHeaderSimple column={column} title="SHI Doc. No" />
),
cell: ({ row }) => {
const doc = row.original
@@ -259,15 +259,41 @@ export function getDocumentStagesColumns({
size: 140,
enableResizing: true,
meta: {
- excelHeader: "Document Number"
+ excelHeader: "SHI Doc. No"
},
})
+ // Plant 프로젝트용 추가 컬럼들
+ if (isPlantProject) {
+ columns.push(
+ // 벤더 문서번호
+ {
+ accessorKey: "vendorDocNumber",
+ header: ({ column }) => (
+ <DataTableColumnHeaderSimple column={column} title="CPY Doc. No" />
+ ),
+ cell: ({ row }) => {
+ const doc = row.original
+ return doc.vendorDocNumber ? (
+ <span className="font-mono text-sm text-blue-600 dark:text-blue-400">{doc.vendorDocNumber}</span>
+ ) : (
+ <span className="text-gray-400 dark:text-gray-500 text-sm">-</span>
+ )
+ },
+ size: 120,
+ enableResizing: true,
+ meta: {
+ excelHeader: "CPY Doc. No"
+ },
+ },
+ )
+ }
+
// 문서명 (PIC 포함)
columns.push({
accessorKey: "title",
header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="Document Name" />
+ <DataTableColumnHeaderSimple column={column} title="Description" />
),
cell: ({ row }) => {
const doc = row.original
@@ -287,44 +313,21 @@ export function getDocumentStagesColumns({
size: 220,
enableResizing: true,
meta: {
- excelHeader: "Document Name"
+ excelHeader: "Description"
},
})
- // Plant 프로젝트용 추가 컬럼들
- if (isPlantProject) {
- columns.push(
- // 벤더 문서번호
- {
- accessorKey: "vendorDocNumber",
- header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="Project Doc No." />
- ),
- cell: ({ row }) => {
- const doc = row.original
- return doc.vendorDocNumber ? (
- <span className="font-mono text-sm text-blue-600 dark:text-blue-400">{doc.vendorDocNumber}</span>
- ) : (
- <span className="text-gray-400 dark:text-gray-500 text-sm">-</span>
- )
- },
- size: 120,
- enableResizing: true,
- meta: {
- excelHeader: "Project Doc No."
- },
- },
- )
- }
// 나머지 공통 컬럼들
+
+
columns.push(
// 현재 스테이지 (상태, 담당자 한 줄)
{
accessorKey: "status",
header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="Document Status" />
+ <DataTableColumnHeaderSimple column={column} title="Doc. Class" />
),
cell: ({ row }) => {
const doc = row.original
@@ -332,7 +335,7 @@ export function getDocumentStagesColumns({
return (
<div className="flex items-center gap-2">
<Badge
- variant={getStatusColor(doc.status || false)}
+ variant={getStatusColor(doc.status || '')}
className="text-xs px-1.5 py-0"
>
{getStatusText(doc.status || '')}
@@ -343,10 +346,33 @@ export function getDocumentStagesColumns({
size: 180,
enableResizing: true,
meta: {
- excelHeader: "Document Status"
+ excelHeader: "Doc. Class"
+ },
+ },
+
+ {
+ accessorKey: "buyerSystemStatus",
+ header: ({ column }) => (
+ <DataTableColumnHeaderSimple column={column} title="Status" />
+ ),
+ cell: ({ row }) => {
+ const doc = row.original
+
+ return (
+ <div className="flex items-center gap-2">
+ {getStatusText(doc.buyerSystemStatus || '')}
+ </div>
+ )
+ },
+ size: 180,
+ enableResizing: true,
+ meta: {
+ excelHeader: "Status"
},
},
+
+
{
accessorKey: "buyerSystemComment",
header: ({ column }) => (
diff --git a/lib/vendor-document-list/plant/shi-buyer-system-api.ts b/lib/vendor-document-list/plant/shi-buyer-system-api.ts
index e919d95f..b0462af8 100644
--- a/lib/vendor-document-list/plant/shi-buyer-system-api.ts
+++ b/lib/vendor-document-list/plant/shi-buyer-system-api.ts
@@ -283,29 +283,31 @@ export class ShiBuyerSystemAPI {
}
private async sendDocumentInfo(documents: any[]) {
- const shiDocuments: ShiDocumentInfo[] = documents.map(doc => ({
+ const shiDocuments: ShiDocumentInfo[] = documents.map((doc) => ({
PROJ_NO: doc.projectCode,
SHI_DOC_NO: doc.docNumber,
- CATEGORY: "SHIP",
- RESPONSIBLE_CD: "EVCP",
- RESPONSIBLE: "eVCP System",
- VNDR_CD: doc.vendorCode || "",
- VNDR_NM: doc.vendorName || "",
- DSN_SKL: "B3",
- MIFP_CD: "",
- MIFP_NM: "",
- CG_EMPNO1: "",
- CG_EMPNM1: "",
+ CATEGORY: 'SHIP',
+ // 김준식 프로 요청으로 RESPONSIBLE_CD / RESPONSIBLE 값 변경 (251002,김준회)
+ RESPONSIBLE_CD: 'C00001',
+ RESPONSIBLE: 'SHI',
+ VNDR_CD: doc.vendorCode || '',
+ VNDR_NM: doc.vendorName || '',
+ DSN_SKL: 'B3',
+ MIFP_CD: '',
+ MIFP_NM: '',
+ CG_EMPNO1: '',
+ CG_EMPNM1: '',
OWN_DOC_NO: doc.vendorDocNumber || doc.docNumber,
DSC: doc.title,
- DOC_CLASS: "B3",
- COMMENT: "",
- STATUS: "ACTIVE",
- CRTER: "EVCP_SYSTEM",
+ DOC_CLASS: 'B3',
+ COMMENT: '',
+ // 조민정 프로 요청으로 'ACTIVE' --> '생성요청' 값으로 변경 (251002,김준회)
+ STATUS: '생성요청',
+ CRTER: 'EVCP_SYSTEM',
CRTE_DTM: new Date().toISOString(),
- CHGR: "EVCP_SYSTEM",
- CHG_DTM: new Date().toISOString()
- }))
+ CHGR: 'EVCP_SYSTEM',
+ CHG_DTM: new Date().toISOString(),
+ }));
const response = await fetch(`${this.baseUrl}/SetDwgInfo`, {
method: 'POST',