1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
import { VendorWithTypeAndMaterials } from "@/db/schema/vendors";
/**
* 테이블/엑셀에 보여줄 컬럼 한 칸을 어떻게 렌더링할지 결정하는 설정
*/
export interface VendorColumnConfig {
/**
* "조인 결과" 객체(VendorWithTypeAndMaterials)의 어느 필드를 표시할지
* 또는 계산된 필드명 (예: vendorClassification)
*/
id: keyof VendorWithTypeAndMaterials | "vendorClassification" | "vendorCode";
/** 화면·엑셀에서 보여줄 컬럼명 */
label: string;
/** (선택) 그룹핑/카테고리 */
group?: string;
/** (선택) Excel에서의 헤더 */
excelHeader?: string;
/** (선택) 데이터 타입(예: date, string, number 등), 포맷 지정용 */
type?: string;
/** (선택) 컬럼 너비 설정 */
width?: number;
/** (선택) 최소 너비 */
minWidth?: number;
/** (선택) 최대 너비 */
maxWidth?: number;
}
/**
* 프롬프트 요구사항에 따른 협력업체 관리 페이지 컬럼 정의
*/
export const vendorColumnsConfig: VendorColumnConfig[] = [
// 선택 컬럼은 별도 처리 (체크박스)
{
id: "id",
label: "No.",
excelHeader: "No.",
type: "number",
width: 80,
minWidth: 60,
},
{
id: "vendorClassification",
label: "업체분류",
excelHeader: "업체분류",
type: "string",
width: 120,
minWidth: 100,
},
{
id: "vendorName",
label: "업체명",
excelHeader: "업체명",
type: "string",
width: 200,
minWidth: 150,
maxWidth: 300,
},
{
id: "vendorCode",
label: "업체코드",
excelHeader: "업체코드",
type: "string",
width: 140,
minWidth: 120,
},
{
id: "country",
label: "국가",
excelHeader: "국가",
type: "string",
width: 100,
minWidth: 80,
},
{
id: "taxId",
label: "사업자번호",
excelHeader: "사업자번호",
type: "string",
width: 140,
minWidth: 120,
},
{
id: "vendorTypeName",
label: "업체유형",
excelHeader: "업체유형",
type: "string",
width: 120,
minWidth: 100,
},
{
id: "primaryMaterial1",
label: "업체대표품목1",
excelHeader: "업체대표품목1",
type: "string",
width: 180,
minWidth: 150,
maxWidth: 250,
},
{
id: "primaryMaterial2",
label: "업체대표품목2",
excelHeader: "업체대표품목2",
type: "string",
width: 180,
minWidth: 150,
maxWidth: 250,
},
{
id: "primaryMaterial3",
label: "업체대표품목3",
excelHeader: "업체대표품목3",
type: "string",
width: 180,
minWidth: 150,
maxWidth: 250,
},
{
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,
},
// 최근조달실적 그룹
{
id: "recentDeliveryNumber",
label: "PO/계약번호",
excelHeader: "최근 조달 PO/계약번호",
type: "string",
group: "최근조달실적",
width: 160,
minWidth: 140,
maxWidth: 200,
},
{
id: "recentDeliveryBy",
label: "조달담당자",
excelHeader: "최근 조달담당자",
type: "string",
group: "최근조달실적",
width: 120,
minWidth: 100,
},
{
id: "recentDeliveryDate",
label: "납품/선적일",
excelHeader: "최근 납품/선적일",
type: "date",
group: "최근조달실적",
width: 130,
minWidth: 110,
},
// 상세 (기존의 액션 버튼) - 별도 처리됨
];
|