Files
wace_rps/frontend/lib/api/projectMgmt.ts
T
hjjeong 5c085dc69e 프로젝트 상세 정보 다이얼로그 wace 운영판 1:1 + 영업관리 판매·매출관리 연결
· 다이얼로그 디자인: 프로젝트정보 박스(주문유형/제품구분/국내해외/고객사·유무상/접수일/견적환종/견적환율) + 품목정보 테이블(No/품번/품명/S/N/요청납기/고객요청사항/반납사유)
· ProjectInfoData 정규화 props — 진행관리/판매관리/매출관리 각각 toProjectInfo 매핑으로 호출
· backend SQL 3곳 보강: exchange_rate (contract_mgmt) + customer_request (CI→CM fallback) + return_reason_name (CI CODE_NAME)
· 판매관리/매출관리 page에 columns useMemo + project_no 셀 onClick + ProjectInfoDialog state 추가
· wace 운영 URL: /salesMgmt/salesRegForm.do?saleNo=detail 1:1 매핑 (새 창 → 같은 탭 다이얼로그)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 13:44:58 +09:00

116 lines
3.4 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;
project_name: 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;
// 다이얼로그 표시용 (wace 운영판 1:1)
contract_currency_name: string | null;
exchange_rate: string | null;
customer_request: string | null;
return_reason_name: string | 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;
},
};