Enhance Work Instruction and Production Plan Functionality

- Added automatic migration to include a new column `batch_use` in the `item_info` table, allowing for batch usage management.
- Implemented logic to prevent deletion of work instructions that are in progress or completed, ensuring data integrity.
- Enhanced the `getBomBaseQtyMap` function to return batch usage status for items, defaulting to 'Y' if not specified.
- Introduced warnings for overdue items and insufficient production time in the production plan management, allowing users to proceed with caution.

(TASK: ERP-node-074, ERP-node-075, ERP-node-076)
This commit is contained in:
kjs
2026-05-19 16:12:44 +09:00
parent 6731ca4183
commit ffd5ffc4c0
14 changed files with 387 additions and 39 deletions

View File

@@ -50,7 +50,8 @@ export async function getEmployeeList() {
// BOM 기준수(0레벨 base_qty) 일괄 조회 — 작업지시 등록 모달의 기준수/배치수 산출용
export async function getBomBaseQtyMap(itemCodes: string[]) {
const res = await apiClient.post("/work-instruction/bom-base-qty", { itemCodes });
return res.data as { success: boolean; data: Record<string, number | null> };
// batchUse: 품목별 배치사용여부 (Y=사용/N=미사용). 미포함 시 'Y' 간주 (하위호환)
return res.data as { success: boolean; data: Record<string, number | null>; batchUse?: Record<string, "Y" | "N"> };
}
// ─── 라우팅 & 공정작업기준 API ───