feat: Enhance packaging and work instruction functionality

- Updated SQL queries in the packaging and work instruction controllers to include additional fields such as `inventory_unit` and `material`, improving data retrieval for packaging items.
- Implemented new columns in the `work_instruction_detail` table for better tracking of item schedules, equipment, and personnel involved in work instructions.
- Enhanced frontend components to utilize the new data structure, including category options for inventory units and materials, improving user experience in the packaging and subcontractor item pages.
- Refactored item inspection display logic to format pass criteria more clearly, enhancing readability for inspection data.
This commit is contained in:
kjs
2026-04-22 14:49:40 +09:00
parent af6c309a46
commit d9ced89a95
30 changed files with 1079 additions and 182 deletions

View File

@@ -175,7 +175,7 @@ export async function getPkgUnitItems(
const pool = getPool();
const result = await pool.query(
`SELECT pui.*, ii.item_name, ii.size AS spec, ii.unit
`SELECT pui.*, ii.item_name, ii.size AS spec, ii.unit, ii.inventory_unit, ii.material
FROM pkg_unit_item pui
LEFT JOIN item_info ii ON pui.item_number = ii.item_number AND pui.company_code = ii.company_code
WHERE pui.pkg_code=$1 AND pui.company_code=$2
@@ -532,7 +532,7 @@ export async function getItemsByDivision(
}
const result = await pool.query(
`SELECT id, item_number, item_name, size, material, unit, division
`SELECT id, item_number, item_name, size, material, unit, inventory_unit, division
FROM item_info
WHERE ${conditions.join(" AND ")}
ORDER BY item_name`,
@@ -585,7 +585,7 @@ export async function getGeneralItems(
}
const result = await pool.query(
`SELECT id, item_number, item_name, size AS spec, material, unit, division
`SELECT id, item_number, item_name, size AS spec, material, unit, inventory_unit, division
FROM item_info
WHERE ${conditions.join(" AND ")}
ORDER BY item_name