Enhance receiving and sales management functionality

- Updated the getItems function in receivingController to include a division filter, allowing for more refined item retrieval based on division.
- Added state management for continuous input in EquipmentInfoPage, enabling users to clear forms after saving or keep them open for further entries.
- Implemented deletion functionality for selected customer mappings in SalesItemPage, improving data management capabilities.
- Enhanced ShippingOrderPage to visually indicate selected orders, improving user interaction and experience.

These changes collectively improve the efficiency and usability of the receiving and sales management features.
This commit is contained in:
kjs
2026-03-31 14:34:43 +09:00
parent b1b10f5e27
commit 18f78a6702
12 changed files with 326 additions and 61 deletions

View File

@@ -783,7 +783,7 @@ export async function getShipments(req: AuthenticatedRequest, res: Response) {
export async function getItems(req: AuthenticatedRequest, res: Response) {
try {
const companyCode = req.user!.companyCode;
const { keyword, page, pageSize } = req.query;
const { keyword, page, pageSize, division } = req.query;
const currentPage = Math.max(1, Number(page) || 1);
const limit = Math.min(500, Math.max(1, Number(pageSize) || 20));
const offset = (currentPage - 1) * limit;
@@ -800,6 +800,12 @@ export async function getItems(req: AuthenticatedRequest, res: Response) {
paramIdx++;
}
if (division) {
conditions.push(`division ILIKE $${paramIdx}`);
params.push(`%${division}%`);
paramIdx++;
}
const whereClause = conditions.join(" AND ");
const pool = getPool();