Files
vexplor/frontend/lib/api/popInOutHistory.ts
kmh 854366453c Bundle pending POP work: production / inventory inout / inbound
진행 중이던 POP 관련 변경사항을 한 번에 묶어 커밋.

- backend
  - popProductionController: 생산공정 처리/접수 로직 대폭 갱신 (+663)
  - receivingController, popInventoryRoutes, adminService 보강
  - popInOutDetailController / popInOutHistoryController 신규
- frontend (POP)
  - 생산 화면 (DefectTypeModal / ProcessWork / WorkOrderList / main page)
    COMPANY_7/8/9/10/16/29/30 동기화
  - 입출고 이력·디테일 화면 신규 (inventory/page, inventory/inout-manage,
    InOutDetailModal) 7개사
  - COMPANY_7 입고 화면 (InboundCartPage / ProductionInbound /
    inbound/production/page) 보강
  - COMPANY_7 재고조정 화면 (inventory/adjust) UI 골격 신규
- frontend lib
  - popInOutDetail / popInOutHistory API 클라이언트 신규

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 18:54:54 +09:00

63 lines
1.4 KiB
TypeScript

import { apiClient } from "./client";
// --- 타입 정의 ---
export type InOutSource = "inbound" | "outbound" | "history";
export type InOutDirection = "inbound" | "outbound" | "transfer";
export type InOutDocTable =
| "inbound_mng"
| "outbound_mng"
| "inventory_history";
export interface InOutRow {
source: InOutSource;
doc_table: InOutDocTable;
doc_id: string;
detail_id: string | null;
doc_number: string | null;
type: string;
direction: InOutDirection;
item_code: string | null;
item_name: string | null;
qty: number;
unit: string;
warehouse_code: string | null;
warehouse_name: string | null;
location_code: string | null;
status: string | null;
created_date: string;
company_code: string;
remark: string | null;
}
export interface InOutKpi {
inbound: number;
outbound: number;
transfer: number;
total: number;
}
export interface InOutHistoryData {
rows: InOutRow[];
kpi: InOutKpi;
totalPages: number;
currentPage: number;
}
export interface InOutHistoryParams {
date_from?: string;
date_to?: string;
keyword?: string;
direction?: InOutDirection | "all";
warehouse_code?: string;
page?: number;
page_size?: number;
}
// --- API 호출 ---
export async function getInOutHistory(params?: InOutHistoryParams) {
const res = await apiClient.get("/pop/inventory/inout-history", { params });
return res.data as { success: boolean; data: InOutHistoryData };
}