Commit Graph

3036 Commits

Author SHA1 Message Date
kmh
96750b2701 Expand lock guard to 7 companies (COMPANY_8/9/10/16/28/29/31)
Apply the same Layer 3 pattern as COMPANY_7 (commit 47170444) to the
remaining work-instruction screens. Backend Layer 1/2 (workInstructionController
is_locked + save guard) is shared, so frontend mapping is the only change needed.

Per company:
- SelectedItem interface: add detailId? + locked? fields
- relatedDetails.map: add detailId: d.detail_id, locked: d.is_locked === true

COMPANY_30 already had this mapping (mhkim work survived the merge there),
so it is excluded from this commit.

Verification: frontend tsc on changed files → 0 errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 11:38:42 +09:00
kmh
471704445b Add lock guard for work-instruction edit (production-acknowledged rows)
Implements the lock scenario originally designed in mhkim 79962160 that was
lost during the jskim-node merge. Production-acknowledged detail rows
(those with batch_id-matched work_order_process having work_order_process_result)
are protected from item/qty/routing changes and deletion during work-instruction edit.

Layer 1 — backend list SQL (2 locations, paginated + non-paginated):
- Add is_locked column via EXISTS subquery
  (wopr JOIN wop where wop.wo_id = wi.id AND wop.batch_id = d.id OR d.item_number)
- Leverages idx_wop_company_wo for performance

Layer 2 — backend save edit-mode rewrite (workInstructionController.ts:save):
1. Load existing detail rows with is_locked
2. Classify payload items: detailId match → updates, no match → inserts, missing in payload → deleteIds
3. Lock guard:
   - UPDATE: locked row item/qty/routing change → throw
   - DELETE: locked row → throw
4. work_instruction header UPDATE (existing)
5. deleteIds: cascade DELETE process_work_result → work_order_process → work_instruction_detail
6. updates: locked → schedule/equipment/worker only; unlocked → full + wop.plan_qty sync
7. inserts: standard INSERT (shared with new-mode path)

Layer 3 — frontend COMPANY_7 mapping:
- relatedDetails.map adds detailId: d.detail_id, locked: d.is_locked === true

Verification:
- backend npm run build PASS
- frontend tsc work-instruction file errors 0
- DB SQL simulation: COMPANY_7 CODE-00010 detail correctly identified as locked

Companion to previous commit (POP batch-id separation restoration). Together they
re-establish mhkim's original batch-aware work-instruction lifecycle.

Scope: COMPANY_7 only. COMPANY_8/9/10/16/28/29/30/31 frontend mapping pending verification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 11:18:30 +09:00
kmh
1961385ddf Restore POP batch-id separation SQL in popProductionController (B1~B10)
Re-implements the batch-id separation backend SQL that was lost during
the 2026-05-21 jskim-node merge (commit 9da6b22a). The previous re-apply
commit (15fa3e37) covered packaging/material auto-input/autoComplete
but missed the batch separation block.

Changes (B1~B10 in POP.md log):
- syncWorkInstructions: detail SELECT + generateWorkProcessesForInstruction call use detail.id instead of detail.item_number
- generateWorkProcessesForInstruction: existCheck uses batch_id = $3 OR matching item_number via subquery
- syncWorkInstructions unsynced EXISTS: matches both wid.id and wid.item_number
- getProcessList prev_good_raw: 5 inner subqueries match COALESCE(wop2.batch_id,'') = COALESCE(wop.batch_id,'') and CTE exposes wop.batch_id
- prev_good CTE: first-process fallback uses COALESCE(wid.qty, wi.qty, 0) with LEFT JOIN work_instruction_detail wid ON wid.id = pgr.batch_id
- Final SELECT: ROW_NUMBER batch_index, COUNT batch_count, wid_b.item_number batch_item_number; LEFT JOIN wid_b; ORDER BY batch keys
- getPrevProcessGoodQty: batchId param + 3 SELECTs filter COALESCE(batch_id,'') = $batchKey
- evaluatePrevProcesses: batchId param + wop_with_seq CTE adds COALESCE(wop.batch_id,'') = $4 + fetchInstructionQty prefers work_instruction_detail.qty when batchKey present
- getAvailableQty: current SELECT adds wop.batch_id and passes to evaluatePrevProcesses
- acceptProcess: master FOR UPDATE SELECT adds wop.batch_id and passes to evaluatePrevProcesses

Verification (per POP.md):
- backend npm run build PASS
- GET /api/pop/production/processes responds with batch_id/batch_index/batch_count/batch_item_number
- COMPANY_7 GUI: 25 cards, 17 with -NN (n/m) suffix; CODE-00027 shows -01..04 of 4 correctly
- No regression on single-batch (batch_id NULL) rows due to COALESCE matching pattern

Known follow-up: work-instruction edit guard (locked detail rows) — implemented in next commit

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 11:18:14 +09:00
kmh
ba1f8af47b Change POP O/X label for CAT_JC_03 in COMPANY_7
- ChecklistRow buttons for CAT_JC_03 (O/X type): "✓ 합격" → "O", "✗ 불합격" → "X"
- Saved value (Y/N), colors and handlers unchanged
- POP.md work log updated (5th entry)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 09:40:13 +09:00
kmh
15fa3e37f9 Re-apply mhkim work lost in jskim-node conflict resolution
Backend:
- outboundController.ts: restore sales_order_id/shipment_plan_id/item_info_id columns in outbound_mng INSERT; restore getProductionResults endpoint
- popProductionController.ts: restore transactionPackagingService import (ensureLoadingInstance/insertPackagingRows); restore material auto-input + inventory_stock deduction before WIP trigger; restore autoCompleteProcess/savePackaging/getProcessPackaging endpoints
- workInstructionController.ts: restore getProcessResults function for production-result right panel
- workInstructionRoutes.ts: restore GET /:wiId/process-results route

Frontend:
- COMPANY_7/production/work-instruction/page.tsx: restore Lock icon, WorkRow detailId/locked fields, items mapping detailId, locked column UI with lock icon and disabled cells
- COMPANY_8/10/16/28/29/production/work-instruction/page.tsx: restore SelectedItem baseQty/splitMode fields, calcBatchCount/splitQty helpers, expandedItems batch split logic in finalizeRegistration payload (keeps jskim infos field)
- COMPANY_8/logistics/inbound-outbound/page.tsx: restore autoFilter:true (company scope) for user_info writer lookup — replaces jskim autoFilter:{enabled:false} which violated multitenancy policy

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 09:39:54 +09:00
kmh
9da6b22a18 Merge branch 'jskim-node' of https://g.wace.me/jskim/vexplor_dev into mhkim-node
Resolved 11 conflicts by taking the jskim side. mhkim-side changes lost
in conflict zones (to be re-applied separately):

backend-node/
  - outboundController.ts: source_table/sales_order_id/shipment_plan_id/item_info_id columns in outbound_mng INSERT
  - popProductionController.ts: ensureLoadingInstance/insertPackagingRows imports and material auto-input + inventory_stock deduction block
  - workInstructionController.ts: getProcessResults function for production-result right panel
  - routes/workInstructionRoutes.ts: GET /:wiId/process-results route

frontend/
  - COMPANY_7/production/work-instruction/page.tsx: Lock icon, detailId/locked fields on WorkRow, locked column and lock icon in items table
  - COMPANY_8/10/16/28/29/production/work-instruction/page.tsx: expandedItems._qty payload (batch-split) replaced by jskim confirmItems.qty + infos
  - COMPANY_8/logistics/inbound-outbound/page.tsx: autoFilter true replaced by autoFilter:{enabled:false}

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:25:27 +09:00
kmh
79962160d0 Update admin pages, API clients, and add transfer plan docs
- Update logistics/inbound-outbound pages across 9 companies
- Update production/result and production/work-instruction admin pages
- Add inventoryTransfer API client and enhance packaging/popInventoryAdjust/popInventoryMove clients
- Add transaction-packaging-loading-plan docs
- Add AdjustHistoryModal for COMPANY_9

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:04:11 +09:00
kmh
57079e5ea4 Refactor POP production, inventory, and shared components
- Refactor ProcessWork, WorkOrderList, AcceptProcessModal, ProcessDetailModal
- Add LossDetailModal and ProcessPackagingModal for COMPANY_7
- Add AdjustHistoryModal for inventory adjust history
- Add PopCalendarModal as shared calendar picker
- Enhance SimpleKeypadModal and useCartSync hook
- Update inventory/adjust, inventory/move, inventory/inout-manage pages
- Update production/page.tsx route handlers
- Update POP.md docs for COMPANY_7 and COMPANY_31

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:03:51 +09:00
kmh
75715011db Refactor POP outbound flow and add inventory-move send across companies
- Add InventoryMoveSend component for new inventory-move outbound type
- Add pop/outbound/inventory-move page for all 9 companies
- Refactor outbound type components (Production/Sales/Return/Subcontractor/Supplied/Etc)
- Refactor OutboundCartPage and OutboundManage
- Apply changes across COMPANY_7/8/9/10/16/28/29/30/31

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:03:24 +09:00
kmh
fb7902a9c0 Refactor POP inbound flow and add inventory-move receive across companies
- Add InventoryMoveReceive component for new inventory-move inbound type
- Add pop/inbound/inventory-move page for all 9 companies
- Remove deprecated InboundCart.tsx (replaced by InboundCartPage)
- Refactor inbound type components (Purchase/Production/Recovery/Return/Subcontractor/Supplied/Change/Error)
- Apply changes across COMPANY_7/8/9/10/16/28/29/30/31

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:03:04 +09:00
kjs
c8994b49fc Refactor Outbound and Work Instruction Controllers for Source Table Updates
- Updated the outbound and outsourcing outbound controllers to replace `source_type` with `source_table` for improved clarity and consistency in data handling.
- Enhanced the work instruction controller to include automatic migration for the `work_instruction_info` table, allowing for better management of work instruction notes.
- Implemented new logic to handle material input types in the work instruction detail modal, supporting both automatic and manual input methods.
- Added new routes for retrieving work instruction information, facilitating better data retrieval for editing purposes.

(TASK: ERP-node-095, ERP-node-096)
2026-05-21 15:03:09 +09:00
kjs
1ebd9348ae Enhance Work Instruction Functionality with Material Overrides
- Added validation for `materialOverrides` in the `save` function of the work instruction controller, ensuring proper structure and required fields.
- Implemented logic to handle the insertion and deletion of material input details based on the provided `materialOverrides`, maintaining data integrity during edits.
- Introduced new routes for retrieving BOM tree and material overrides, enhancing the work instruction management process.
- Updated the frontend to support new material mapping features, including a structured approach for handling BOM substitutes and material inputs.

(TASK: ERP-node-090)
2026-05-21 10:01:41 +09:00
kjs
c5364e1d20 Enhance Outbound and Excel Service Functionality
- Added `inventory_unit` to the item selection query in the outbound controller to improve data retrieval.
- Updated the multi-table Excel service to exclude overlapping headers between parent and child levels, ensuring accurate data insertion.
- Introduced new category combobox components for better user interaction in the supplied item page.
- Enhanced the inbound-outbound page to correctly map user IDs, including super admin handling for user information retrieval.

(TASK: ERP-XXX)
2026-05-20 15:24:19 +09:00
kjs
b2c96e616a Add Batch Process Equipment Registration Functionality
- Implemented a new endpoint for batch registration of process equipment, allowing users to add multiple equipment codes at once while skipping duplicates.
- Enhanced error handling to provide detailed feedback on the registration process, including the number of successfully inserted and skipped items.
- Updated the process info routes to include the new batch registration functionality.

(TASK: ERP-node-087)
2026-05-19 18:09:57 +09:00
kjs
ffd5ffc4c0 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)
2026-05-19 16:12:44 +09:00
kjs
6731ca4183 대진 오류사항 일부 수정 2026-05-19 11:57:05 +09:00
kjs
fa9f5451f6 Add Customer Contact Routes and Enhance User Management
- Introduced new routes for customer contact management, allowing for the retrieval of customer contact information.
- Updated the user management functionality to include validation for the hire date, ensuring proper date format and handling of null values.
- Enhanced the save user functionality to accommodate the new hire date field, maintaining existing values when not provided.

(TASK: ERP-XXX)
2026-05-18 16:13:29 +09:00
kjs
f8ad041a8c Enhance Shipping Order and Plan Functionality
- Added new fields for delivery details in the shipping order controller, including delivery date, delivery destination ID, and delivery address.
- Implemented validation logic to ensure that only confirmed sales orders can be processed, preventing the registration of shipments for orders that are waiting, canceled, or completed.
- Updated the save functionality to handle new delivery-related fields and improved error handling for blocked orders.
- Enhanced the shipping plan controller to include status checks and automatic updates based on changes in order quantities.

(TASK: ERP-047)
2026-05-14 15:46:35 +09:00
kjs
823f9034a8 Enhance Production Plan Date Calculation Logic
- Introduced helper functions to calculate working days while skipping weekends, improving the accuracy of date calculations in production planning.
- Updated the logic for determining start and end dates based on lead time and production capacity, ensuring that weekend days are excluded from the calculations.
- Refactored existing date calculation code in the `previewSchedule` and `generateSchedule` functions to utilize the new helper methods for better maintainability and clarity.

(TASK: ERP-XXX)
2026-05-14 12:03:04 +09:00
kjs
44f923df56 Add New Pages for COMPANY_31 in Admin Page Renderer
- Introduced multiple new routes for COMPANY_31, including master data management for item info, department, company, options, and various sales and production pages.
- Each route is dynamically imported to enhance performance and user experience.
- Updated the admin page renderer to accommodate the new COMPANY_31 structure, ensuring seamless navigation and access to the new functionalities.

(TASK: ERP-XXX)
2026-05-13 16:40:49 +09:00
kjs
d714077ddc Add New Design Management Pages for COMPANY_31
- Introduced multiple new pages for design management, including Change Management, Design Request, My Work, Project, Task Management, Equipment Info, and Inspection Record.
- Each page includes relevant UI components such as tables, forms, and modals for managing design-related tasks and equipment inspections.
- Implemented state management and API integration for fetching and manipulating design requests and equipment data.
- Enhanced user experience with dynamic search filters and responsive layouts.

(TASK: ERP-XXX)
2026-05-13 15:38:24 +09:00
kjs
bd978ff80c Enhance Shipping Order and Plan Functionality
- Updated the shipping order controller to improve customer name retrieval by removing unnecessary partner_id fallback.
- Implemented shipment plan number allocation logic in the shipping plan controller, ensuring unique numbering based on defined rules or fallback mechanisms.
- Enhanced the batch save functionality to include the new shipment plan number in the database insertions.
- Added new state management for production and shipment plans in the Cutting Plan page, allowing for better organization and retrieval of related data.
- Introduced delivery location field in the sales order page, improving data entry for shipping details.

(TASK: ERP-XXX)
2026-05-12 16:24:33 +09:00
kjs
1003273709 Implement Work Standard Copy Functionality for Items
- Added new API endpoints to retrieve the work standard tree by item and to copy work standards from a source item to target items, supporting conflict strategies.
- Enhanced the backend logic to handle the retrieval and copying of work standards, including validation for required parameters and error handling.
- Introduced a new modal component in the frontend for managing the copy operation, allowing users to select target items and define conflict resolution strategies.

(TASK: ERP-029)
2026-05-11 18:02:39 +09:00
kjs
663a51e94d Add All BOM Substitutes API and Update BOM Management
- Introduced a new API endpoint to retrieve all substitutes for a given BOM ID, allowing for bulk retrieval of substitute items.
- Enhanced the BOM service to support the new functionality, including company code filtering and versioning options.
- Updated the BOM management page to integrate the new substitute retrieval feature, enabling users to manage substitutes more effectively during the copy process.
- Added necessary state management and UI elements for handling substitutes in the copy modal.

(TASK: ERP-028)
2026-05-11 15:06:13 +09:00
kjs
5a4a6d5a5b Add BOM Copy Functionality to BOM Management
- Introduced a new API endpoint to copy a BOM tree to multiple target items, allowing for efficient duplication of BOM structures.
- Implemented payload validation to ensure correct data format and integrity during the copy process.
- Added a modal in the frontend for managing the BOM copy operation, including options for conflict resolution and progress tracking.
- Enhanced the BOM service with necessary logic for handling BOM copies, including versioning and error handling.

(TASK: ERP-028)
2026-05-11 13:27:57 +09:00
kmh
2a6577701b Add POP Inventory Move Feature and Update Shared POP Components
- New POP inventory move page and API (popInventoryMoveController, popInventoryMove client) deployed across COMPANY_7/8/9/10/16/29/30
- Updates to shared POP components (PopShell, AcceptProcessModal, ProcessWork) and inout-manage/inventory pages
- COMPANY_7 POP.md updated with new scope notes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 12:03:02 +09:00
kjs
d5320d86e7 Add Internal Manager Field and Smart Select Component to Customer Management Page
- Introduced a new field for '담당영업사원' (Internal Manager) in the customer management table, enhancing data visibility.
- Integrated the SmartSelect component for selecting internal managers, allowing users to easily choose from a list of employees.
- Updated data mapping to include internal manager information in the customer data structure, ensuring accurate display and functionality.
- Added UI elements for managing the internal manager selection, including a clear button to reset the selection.

(TASK: ERP-XXX)
2026-05-11 10:50:42 +09:00
kjs
0746db5eff Enhance Item Search Functionality in Sales Order Page
- Updated the item search logic to include additional filters for both item name and item number, improving search accuracy.
- Implemented an API call to fetch item information based on the search keyword, allowing for dynamic filtering of results.
- Adjusted the state management to handle cases where no items are found, ensuring a smooth user experience.

(TASK: ERP-031)
2026-05-08 17:01:54 +09:00
kjs
a8457de52f Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node
# Conflicts:
#	backend-node/src/controllers/outboundController.ts
2026-05-08 16:22:47 +09:00
kjs
b4f6139151 Implement Subcontractor Stock Management Features
- Added new routes and controller for subcontractor stock management, including endpoints for vendor summaries, stock details, history, adjustments, and scrap management.
- Integrated the subcontractor stock service to handle business logic related to inventory adjustments and history tracking.
- Developed frontend components for managing subcontractor stock, including modals for adjustments and history viewing, enhancing user interaction and data management.

(TASK: ERP-026)
2026-05-08 16:17:06 +09:00
kmh
212616d966 Migrate POP inventory adjust to v2 and remove legacy POP modules
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 16:07:41 +09:00
kjs
80148a0593 Update Receiving Page to Include Inventory Unit Field
- Modified the receiving controller to include the `inventory_unit` field in the item selection query.
- Updated the frontend components across multiple company pages to reference the new `inventory_unit` field instead of the previous `unit` field, ensuring consistency in data handling.
- Removed hardcoded company code from API calls to allow for dynamic fetching of item information.

(TASK: ERP-030)
2026-05-08 11:19:34 +09:00
kjs
b4346b5617 Implement Outsourcing Purchase Status Pages and Detail Modal for COMPANY_10, COMPANY_16, COMPANY_28, and COMPANY_29
- Created a detailed modal for viewing outsourcing purchase order details, including basic information and status rows for processes, vendors, and shipping vs. receiving.
- Developed an integrated status page for outsourcing purchase orders, featuring a dynamic search filter and a comprehensive table displaying order, process, vendor, and material information.
- Implemented Excel export functionality for the integrated status page, allowing users to download order data easily.

(TASK: ERP-025)
2026-05-08 09:59:23 +09:00
kjs
2e686f059d Implement Order Status Integration for Outsourcing Purchase Management
- Added a new endpoint `listOrderStatus` in the `outsourcePurchaseController` to retrieve integrated order status information, including filtering options for source type, order status, and date range.
- Updated the `outsourcePurchaseService` to handle the new order status retrieval logic, ensuring proper filtering and data aggregation.
- Introduced a new route for accessing the order status information in `outsourcePurchaseRoutes`.
- Created a detailed modal for viewing outsourcing purchase order details, enhancing the user interface for better data presentation.
- Developed a registration modal for creating and editing outsourcing purchase orders, featuring a tabbed interface for improved user experience.

(TASK: ERP-025, ERP-019)
2026-05-07 18:33:38 +09:00
kjs
ec1c95b8c5 Enhance Work Item Detail Management with Inspection and Material Fields
- Added new fields for inspection count application and material equipment details in the process work item detail controller and related functions.
- Updated the frontend components to include inspection count and material equipment options, improving the management of inspection processes and material inputs.
- Implemented logic to handle inspection count and material PLC data collection.

(TASK: ERP-021, ERP-022)
2026-05-07 17:24:15 +09:00
kjs
93a7214678 Enhance Work Item Detail Management with Loss Quantity Fields
- Added new fields for loss quantity auto-collection and PLC data in the process work item detail controller and related functions.
- Updated the frontend components to include loss quantity options in the production result section, allowing for better tracking and management of production losses.
- Implemented multi-upload functionality for images in the inspection management page.

(TASK: ERP-023)
2026-05-07 14:25:18 +09:00
kjs
528782a94b Refactor AdminPageRenderer to update Monitoring Settings page import
- Changed the import path for the Monitoring Settings page from the app directory to the components directory for better organization and maintainability.

(TASK:ERP-022)
2026-05-07 13:47:18 +09:00
kjs
a5e9d13100 Implement Outsourcing Purchase Order Management Features
- Added `DetailModal` for viewing detailed information of outsourcing purchase orders, including master, process, and material details.
- Created `RegistrationModal` for registering and editing outsourcing purchase orders with a tabbed interface for source selection and item mapping.
- Introduced `ReleaseRequestModal` for handling material release requests, grouping by subcontractor and allowing batch processing.
- Updated the main page to integrate these modals and provide a comprehensive management interface for outsourcing purchase orders.

(TASK:ERP-019)
2026-05-07 13:30:46 +09:00
kjs
c28e626dd5 Update Dockerfiles to increase Node.js memory limit
- Added `NODE_OPTIONS="--max-old-space-size=8192"` to both frontend Dockerfiles to allow Node.js to utilize more memory during the build process.
- This change aims to prevent memory-related issues during the application build.

(TASK:ERP-021)
2026-05-07 12:47:38 +09:00
kjs
629bc25cd5 Implement BOM base quantity retrieval functionality
- Added a new endpoint `/work-instruction/bom-base-qty` to retrieve base quantities for items based on their codes.
- Introduced the `getBomBaseQtyMap` function in the `workInstructionController` to handle the logic for fetching base quantities.
- Updated the frontend to call the new API and integrate base quantity mapping into the work instruction registration process.
- Enhanced the work instruction page to calculate batch counts and split quantities based on the retrieved base quantities.

(TASK:ERP-020)
2026-05-07 12:01:03 +09:00
kjs
91dc6a6d90 Merge branch 'gbpark-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-05-06 18:33:54 +09:00
kjs
fa0a28df42 Add preview functionality for outsource purchase order numbers
- Introduced a new endpoint `/preview-order-no` to generate order numbers based on registered numbering rules without incrementing the sequence.
- Implemented the `previewOrderNo` function in the `outsourcePurchaseController` to handle the logic for generating the preview order number.
- Updated the `outsourcePurchaseRoutes` to include the new route for previewing order numbers.
- Enhanced the `RegistrationModal` component to automatically fill the order number input with the preview value when the modal opens.
- Added a new API function `previewOrderNo` in the frontend to call the backend endpoint.

(TASK:ERP-019)
2026-05-06 18:33:23 +09:00
kjs
970a8f708a Implement process materials auto-fill functionality for outsource purchase orders
- Added a new endpoint to retrieve process materials based on routing details and work order ID.
- Introduced the `getProcessMaterials` function in the `outsourcePurchaseController` to handle the logic for fetching materials.
- Updated the `outsourcePurchaseRoutes` to include the new route for process materials.
- Enhanced the `RegistrationModal` component to toggle material needs and automatically fill materials when required.

(TASK:ERP-019)
2026-05-06 18:09:23 +09:00
DDD1542
17173be350 feat(bom): COMPANY_7 BOM에 대체 품목 관리 기능 추가
- bom_detail_substitute 테이블 신규 (varchar PK, FK 미설정 / 코드 조인)
- 백엔드: 단일 행 substitute CRUD + BOM 단위 갯수 맵 API 5종 추가
- 프론트(COMPANY_7): 트리 행에 '대체 N' 뱃지 + 대체 품목 모달
  · 드래그앤드롭으로 우선순위 변경 + 자동 채번/재할당
  · 250ms debounce 실시간 검색, 결과 클릭 시 자동 행 추가
  · inline blur 저장, zebra 행 구분, sticky 헤더 단색 처리
- 트리뷰 액션 버튼 통합: 가상 루트 선택 시 1레벨, 일반 행 선택 시 하위로 추가

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 17:32:10 +09:00
kjs
4ad669361d Implement outsource purchase management functionality
- Added routes for outsource purchase management, including CRUD operations and additional features such as auto-processes and release requests.
- Created the `outsourcePurchaseController` to handle business logic for managing outsource purchase orders.
- Introduced the `outsourcePurchaseService` for service layer operations related to outsource purchases.
- Updated `app.ts` to include the new routes for outsource purchase management.

(TASK:ERP-019)
2026-05-06 16:16:13 +09:00
kjs
92f73af633 Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-04-30 10:55:12 +09:00
kmh
ce9516802a Bundle POP sales outbound + inspection wiring
- outbound: wire 판매출고 to shipment_instruction with customer_mng JOIN, add customer filter, auto-transition shipment_instruction.status to COMPLETED/IN_PROGRESS based on remaining qty
- inspection: fix is_active filter ('Y' -> '사용') and JOIN inspection_standard to expose judgment_criteria
- POP InspectionModal (7 companies): hide measured-value input when judgment_criteria == CAT_JC_03 (O/X)
- POP SalesOutbound (7 companies): connect to /outbound/source/shipment-instructions, fix stale-closure bug in saveToDb via ref
- COMPANY_16/30 main: temporarily comment out 품질/안전관리 menu entries
2026-04-30 10:54:21 +09:00
kjs
0d4fcfb871 Remove 'source_type' column from GRID_COLUMNS in receiving pages for multiple companies to streamline data display. 2026-04-30 10:52:34 +09:00
kjs
8daf26af2a Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node
receivingController: production-receiving query 충돌 해소 — mhkim-node 채택 (raw row 기반 + is_rework/prev_skipped 노출). wopr_agg JOIN은 미사용 상태로 유지.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 21:13:01 +09:00
kjs
d549947fac Refactor analytics report and production plan services for improved data handling
- Updated the `getQualityReportData` function to utilize `inspection_result_mng` for quality report generation, enhancing data accuracy by aggregating inspection results.
- Refined date handling in the `getOrderSummary` function to improve filtering logic and ensure accurate stock calculations.
- Implemented virtual scrolling in the `TimelineScheduler` component to optimize performance when rendering large datasets.

These changes enhance data retrieval efficiency and user experience across analytics and production planning modules.
2026-04-29 21:05:38 +09:00