66cee22be3
운영 wace productionplanning/mBomMgmtList.jsp + productionplanning.xml:2874-3119 mBomMgmtGridList 매퍼 1:1 이식. PROJECT_MGMT × CONTRACT_ITEM 펼침 그리드 + M-BOM 헤더/히스토리/구매리스트 상태 표시 + 9 검색 필터. 백엔드 (3 파일 + app.ts 마운트): - services/mbomService.ts — list() : 9 검색 필터 + 30+ 컬럼 SELECT · 주문유형/제품구분/국내해외(CODE_NAME 비교)/고객사(C_ 3-way)/유무상/SN(EXISTS) · 품번/품명(PM·CI 양쪽 LIKE)/접수일·요청납기 범위 · WRITER_NAME/MBOM_EDITOR : user_name() PL/pgSQL (PR-A0 신설) · MBOM_STATUS/MBOM_PART_NO/MBOM_REGDATE/MBOM_VERSION : mbom_header+history 서브쿼리 · PURCHASE_LIST_OBJID/_DATE : sales_request_master.mbom_header_objid 매칭 · CUSTOMER_NAME : CASE C_% → client_mng / ELSE → supply_mng - controllers/mbomController.ts — getList - routes/productionMbomRoutes.ts — GET /list - app.ts — /api/production/mbom 마운트 (productionRoutes 다음) 프론트 (3 파일): - lib/api/mbom.ts — MbomListFilter / MbomRow / mbomApi.list - app/(main)/COMPANY_16/production/mbom/page.tsx — 검색 폼 2행(12 필드) + 16 컬럼 DataGrid · comm_code 옵션 로드: /api/sales/codes/0000167 (주문유형) /0000001 (제품구분) /0001782 (유무상) · 고객사: /api/sales/customers 재사용 (customer_mng) · 국내/해외 + 유상/무상 raw 옵션 - app/(main)/COMPANY_16/purchase/mbom/page.tsx — production/mbom 페이지 re-export (사용자 요청: 구매관리 메뉴 트리에도 동일 화면 노출) 메뉴 (data-sync): - 03_mbom_menu_dedup.sql — menu_info 100016(purchase/mbom) + 100032(production/mbom) 양쪽 active 보장 (이미 DB에 등록되어 있던 entry) PR-A2 이후 분리: - 단건 상세 다이얼로그, read-only mbom_detail 트리 표시 - BOM 복사 (E-BOM→M-BOM 트리 복사) - 구매리스트 생성 액션 (M-BOM→PURCHASE) - M-BOM 본 편집 (4프레임 팝업) 검증: - backend nodemon hot-load OK (401 TOKEN_MISSING 응답으로 라우터 등록 확인) - 매퍼 SQL 직접 실행: PROJECT_MGMT × CONTRACT_ITEM 5건 + CUSTOMER/M-BOM 매칭 정상 - typecheck: 신규 코드 0 에러 (pre-existing 에러만 잔존) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
75 lines
2.1 KiB
TypeScript
75 lines
2.1 KiB
TypeScript
import { apiClient } from "./client";
|
|
|
|
// ============================================================
|
|
// 생산관리 > M-BOM 관리 (PR-A1) — wace productionplanning.xml 1:1
|
|
// 라우트: /api/production/mbom/*
|
|
// ============================================================
|
|
|
|
export interface MbomListFilter {
|
|
search_category_cd?: string;
|
|
search_product_cd?: string;
|
|
search_area_cd?: string;
|
|
search_customer_objid?: string;
|
|
search_paid_type?: string;
|
|
search_serial_no?: string;
|
|
search_part_no?: string;
|
|
search_part_name?: string;
|
|
search_receipt_date_from?: string;
|
|
search_receipt_date_to?: string;
|
|
search_req_del_date_from?: string;
|
|
search_req_del_date_to?: string;
|
|
page?: number;
|
|
page_size?: number;
|
|
}
|
|
|
|
export interface MbomRow {
|
|
objid: string;
|
|
contract_objid: string | null;
|
|
project_no: string | null;
|
|
category_cd: string | null;
|
|
category_name: string | null;
|
|
product: string | null;
|
|
product_name: string | null;
|
|
area_cd: string | null;
|
|
area_name: string | null;
|
|
receipt_date: string | null;
|
|
writer_name: string | null;
|
|
customer_objid: string | null;
|
|
customer_name: string | null;
|
|
paid_type: string | null;
|
|
paid_type_name: string | null;
|
|
part_no: string | null;
|
|
part_name: string | null;
|
|
part_objid: string | null;
|
|
serial_no: string | null;
|
|
serial_no_list: string | null;
|
|
quantity: string | number | null;
|
|
req_del_date: string | null;
|
|
customer_request: string | null;
|
|
bom_report_objid: string | null;
|
|
ebom_status: string | null;
|
|
ebom_regdate: string | null;
|
|
mbom_header_objid: string | null;
|
|
purchase_list_objid: string | null;
|
|
purchase_list_date: string | null;
|
|
mbom_status: string | null;
|
|
mbom_part_no: string | null;
|
|
mbom_regdate: string | null;
|
|
mbom_editor: string | null;
|
|
mbom_version: number | null;
|
|
}
|
|
|
|
export interface MbomListResponse {
|
|
rows: MbomRow[];
|
|
totalCount: number;
|
|
page: number;
|
|
pageSize: number;
|
|
}
|
|
|
|
export const mbomApi = {
|
|
async list(filter: MbomListFilter = {}): Promise<MbomListResponse> {
|
|
const res = await apiClient.get("/production/mbom/list", { params: filter });
|
|
return res.data?.data as MbomListResponse;
|
|
},
|
|
};
|