구매관리_발주관리 저장 시 마스터정보 품목에 전달

This commit is contained in:
hjjeong 2026-01-05 17:08:47 +09:00
parent 2a7066b6fd
commit 714698c20f
1 changed files with 34 additions and 0 deletions

View File

@ -995,6 +995,40 @@ export class ButtonActionExecutor {
console.log("📋 [handleSave] 범용 폼 모달 공통 필드:", commonFields);
}
// 🆕 루트 레벨 formData에서 RepeaterFieldGroup에 전달할 공통 필드 추출
// 주문번호, 발주번호 등 마스터-디테일 관계에서 필요한 필드만 명시적으로 지정
const masterDetailFields = [
// 번호 필드
"order_no", // 발주번호
"sales_order_no", // 수주번호
"shipment_no", // 출하번호
"receipt_no", // 입고번호
"work_order_no", // 작업지시번호
// 거래처 필드
"supplier_code", // 공급처 코드
"supplier_name", // 공급처 이름
"customer_code", // 고객 코드
"customer_name", // 고객 이름
// 날짜 필드
"order_date", // 발주일
"sales_date", // 수주일
"shipment_date", // 출하일
"receipt_date", // 입고일
"due_date", // 납기일
// 담당자/메모 필드
"manager", // 담당자
"memo", // 메모
"remark", // 비고
];
for (const fieldName of masterDetailFields) {
const value = context.formData[fieldName];
if (value !== undefined && value !== "" && value !== null && !(fieldName in commonFields)) {
commonFields[fieldName] = value;
}
}
console.log("📋 [handleSave] 최종 공통 필드 (마스터-디테일 필드 포함):", commonFields);
for (const item of parsedData) {
// 메타 필드 제거 (eslint 경고 무시 - 의도적으로 분리)