a1ace22626
· 그리드: 8그룹 18셀 평탄화 (운영판 projectMgmtWbsGridList SQL 1:1) · 검색폼: 11필드 (년도/프로젝트번호/주문유형/고객사/제품구분/요청납기/국내해외/유무상/품번/품명/S/N) · 영업관리 패턴 통일: PartSelect 단일 search_partObjId, customer_mng 단일 LEFT JOIN · client_mng/supply_mng 분기 → customer_mng로 흡수, CODE_NAME() 함수 직접 사용 · 행 클릭 동작은 P1.5 별도 결정 (영업관리 OrderRegistDialog 재사용 후보) · PMS_WBS_TASK/SETUP_WBS_TASK 의존 컬럼은 그리드 표시 컬럼에 없어 P2(WBS관리) 보류 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
110 lines
3.2 KiB
TypeScript
110 lines
3.2 KiB
TypeScript
import { apiClient } from "./client";
|
|
|
|
// wace projectMgmtWbsGridList 매퍼 + 영업관리 패턴 통일
|
|
export interface ProgressListFilter {
|
|
Year?: string;
|
|
project_nos?: string; // OBJID (단일 또는 쉼표 다중)
|
|
category_cd?: string;
|
|
customer_objid?: string;
|
|
product?: string;
|
|
status_cd?: string;
|
|
result_cd?: string;
|
|
contract_start_date?: string;
|
|
contract_end_date?: string;
|
|
area_cd?: string; // '국내'/'해외'
|
|
free_of_charge?: string; // '유상'/'무상'
|
|
// 영업관리 패턴 통일 — PartSelect의 value (part_mng.objid::varchar)
|
|
search_partObjId?: string;
|
|
serial_no?: string;
|
|
pm_user_id?: string;
|
|
location?: string;
|
|
setup?: string;
|
|
}
|
|
|
|
export interface ProjectNoOption {
|
|
value: string;
|
|
label: string;
|
|
}
|
|
|
|
// 운영판 그리드 18셀 + 부속 필드
|
|
export interface ProgressRow {
|
|
objid: string;
|
|
project_no: string | null;
|
|
category_cd: string | null;
|
|
category_name: string | null;
|
|
customer_objid: string | null;
|
|
customer_name: string | null;
|
|
product: string | null;
|
|
product_name: string | null;
|
|
area_name: string | null;
|
|
reg_date: string | null;
|
|
free_of_charge: string | null;
|
|
product_item_code: string | null;
|
|
product_item_name: string | null;
|
|
serial_no: string | null;
|
|
contract_qty: number | string | null;
|
|
req_del_date: string | null;
|
|
ebom_status: string | null;
|
|
mbom_status: string | null;
|
|
order_date: string | null;
|
|
receiving_rate: string | null;
|
|
production_team_12: string | null;
|
|
production_team_3: string | null;
|
|
assembly: string | null;
|
|
verification: string | null;
|
|
shipment_date: string | null;
|
|
// 부속
|
|
contract_objid: string | null;
|
|
contract_no: string | null;
|
|
overhaul_order: string | null;
|
|
pm_user_name: string | null;
|
|
writer_name: string | null;
|
|
cu01_cnt: number | null;
|
|
cu02_cnt: number | null;
|
|
}
|
|
|
|
export interface ProgressDetail {
|
|
objid: string;
|
|
project_no: string;
|
|
project_name: string;
|
|
facility: string;
|
|
facility_name: string;
|
|
facility_qty: string;
|
|
facility_depth: string;
|
|
contract_del_date: string;
|
|
contract_currency: string;
|
|
contract_currency_name: string;
|
|
contract_price: string;
|
|
contract_price_currency: string;
|
|
}
|
|
|
|
export interface ProgressUpdateBody {
|
|
project_no?: string;
|
|
project_name?: string;
|
|
facility?: string;
|
|
facility_qty?: string;
|
|
facility_depth?: string;
|
|
contract_del_date?: string;
|
|
contract_currency?: string;
|
|
contract_price_currency?: string;
|
|
contract_price?: string;
|
|
}
|
|
|
|
export const projectMgmtApi = {
|
|
async list(filter: ProgressListFilter = {}) {
|
|
const res = await apiClient.get("/project/progress/list", { params: filter });
|
|
return (res.data?.data ?? []) as ProgressRow[];
|
|
},
|
|
async projectNoOptions(): Promise<ProjectNoOption[]> {
|
|
const res = await apiClient.get("/project/progress/project-no-options");
|
|
return (res.data?.data ?? []) as ProjectNoOption[];
|
|
},
|
|
async detail(objid: string): Promise<ProgressDetail | null> {
|
|
const res = await apiClient.get(`/project/progress/${objid}`);
|
|
return res.data?.data ?? null;
|
|
},
|
|
async update(objid: string, body: ProgressUpdateBody) {
|
|
return (await apiClient.put(`/project/progress/${objid}`, body)).data;
|
|
},
|
|
};
|