| @@ -306,7 +306,84 @@ export interface CompletedDoPickOrderSearchParams { | |||
| deliveryNo?: string; | |||
| ticketNo?: string; | |||
| } | |||
| export interface PickExecutionIssue { | |||
| id: number; | |||
| pickOrderId: number; | |||
| pickOrderCode: string; | |||
| pickOrderCreateDate: string; | |||
| pickExecutionDate: string; | |||
| pickOrderLineId: number; | |||
| issueNo: string; | |||
| joPickOrderId?: number; | |||
| doPickOrderId?: number; | |||
| issueCategory: string; | |||
| itemId: number; | |||
| itemCode: string; | |||
| itemDescription: string; | |||
| lotId?: number; | |||
| lotNo?: string; | |||
| storeLocation?: string; | |||
| requiredQty: number; | |||
| actualPickQty?: number; | |||
| missQty?: number; | |||
| badItemQty?: number; | |||
| issueRemark?: string; | |||
| pickerName?: string; | |||
| handleStatus: string; | |||
| handleDate?: string; | |||
| handledBy?: string; | |||
| created: string; | |||
| createdBy: string; | |||
| modified: string; | |||
| modifiedBy: string; | |||
| } | |||
| export interface FetchPickExecutionIssuesParams { | |||
| type?: "jo" | "do" | "material"; | |||
| } | |||
| export const fetchAllPickExecutionIssues = cache( | |||
| async (params?: FetchPickExecutionIssuesParams): Promise<PickExecutionIssue[]> => { | |||
| const queryParams = new URLSearchParams(); | |||
| if (params?.type) { | |||
| queryParams.append("type", params.type); | |||
| } | |||
| const url = `${BASE_API_URL}/pickExecution/issues/all${ | |||
| queryParams.toString() ? `?${queryParams.toString()}` : "" | |||
| }`; | |||
| const result = await serverFetchJson<PickExecutionIssue[]>(url, { | |||
| method: "GET", | |||
| headers: { "Content-Type": "application/json" }, | |||
| }); | |||
| return result ?? []; | |||
| } | |||
| ); | |||
| export interface UpdatePickExecutionIssueRequest { | |||
| issueId: number; | |||
| handleStatus: string; | |||
| handleDate?: string; | |||
| handledBy?: string; | |||
| handleRemark?: string; | |||
| } | |||
| export const updatePickExecutionIssueStatus = async ( | |||
| data: UpdatePickExecutionIssueRequest | |||
| ): Promise<PostPickOrderResponse> => { | |||
| const result = await serverFetchJson<PostPickOrderResponse>( | |||
| `${BASE_API_URL}/pickExecution/updateIssueStatus`, | |||
| { | |||
| method: "POST", | |||
| body: JSON.stringify(data), | |||
| headers: { "Content-Type": "application/json" }, | |||
| } | |||
| ); | |||
| revalidateTag("pickExecutionIssues"); | |||
| return result; | |||
| }; | |||
| // ✅ 新增:获取已完成的 DO Pick Orders API | |||
| export const fetchCompletedDoPickOrders = async ( | |||
| userId: number, | |||
| @@ -17,6 +17,7 @@ | |||
| "Clean Record": "重置", | |||
| "Dashboard": "資訊展示面板", | |||
| "Store Management": "原材料", | |||
| "Stock Take Management": "盤點管理", | |||
| "Store Management": "倉庫管理", | |||
| "Delivery": "送貨訂單", | |||
| "Scheduling": "排程", | |||
| @@ -17,5 +17,69 @@ | |||
| "Expiry Date": "到期日", | |||
| "No items are selected yet.": "未選擇貨品", | |||
| "Item selected": "已選擇貨品", | |||
| "Warehouse": "倉庫" | |||
| "Warehouse": "倉庫", | |||
| "Adjusted By": "處理者", | |||
| "Adjustment": "處理", | |||
| "Adjustment No": "處理編號", | |||
| "Adjustment No, Item, Lot...": "處理編號, 貨品, 批號...", | |||
| "After Qty": "處理後數量", | |||
| "All": "全部", | |||
| "Approved": "已批准", | |||
| "Before Qty": "處理前數量", | |||
| "Damage": "損壞", | |||
| "Date": "日期", | |||
| "Item": "貨品", | |||
| "Location": "位置", | |||
| "Manual": "手動", | |||
| "No adjustments found": "未找到調整", | |||
| "Pending": "待處理", | |||
| "Reason": "原因", | |||
| "Rejected": "已拒絕", | |||
| "Return": "退貨", | |||
| "Search": "搜索", | |||
| "Stock Take": "盤點", | |||
| "This is a demo with fake data. API integration pending.": "", | |||
| "Total Adjustments": "總調整數量", | |||
| "Action": "操作", | |||
| "Actual Qty": "實際數量", | |||
| "Category": "類型", | |||
| "Close": "關閉", | |||
| "Delivery Order": "交貨單", | |||
| "Detail": "詳細", | |||
| "Handle Remark": "處理備註", | |||
| "Issue Detail": "問題詳細", | |||
| "Issue No": "問題編號", | |||
| "Issue Remark": "問題備註", | |||
| "Job Order": "工單", | |||
| "Mark as Resolved": "標記為已解決", | |||
| "Material": "物料", | |||
| "Miss Qty": "缺貨數量", | |||
| "No issues found": "未找到問題", | |||
| "Pick Order": "揀貨單", | |||
| "Pick Order, Issue No, Item, Lot...": "揀貨單, 問題編號, 貨品, 批號...", | |||
| "Picker": "揀貨員", | |||
| "Refresh": "刷新", | |||
| "Required Qty": "所需數量", | |||
| "Resolved": "已解決", | |||
| "Total Issues": "總問題數量", | |||
| "Inventory Adjustments": "存貨調整", | |||
| "Inventory Exception Management": "存貨異常管理", | |||
| "Pick Execution Issues": "揀貨執行問題", | |||
| "Back": "返回", | |||
| "Cancel": "取消", | |||
| "Confirm Adjustment": "確認調整", | |||
| "Counted Qty": "盤點數量", | |||
| "Item Code": "貨品編號", | |||
| "Item Name": "貨品名稱", | |||
| "Perform Stock Take": "執行盤點", | |||
| "Review Variance": "審核差異", | |||
| "Select": "選擇", | |||
| "Select Section": "選擇區域", | |||
| "Select Stock Take Section": "選擇盤點區域", | |||
| "Start New Stock Take": "開始新的盤點", | |||
| "Stock Take Variance": "盤點差異", | |||
| "Stock take adjustment confirmed! (Demo only)": "盤點調整確認!(僅演示)", | |||
| "Stock take adjustment has been confirmed successfully!": "盤點調整確認成功!", | |||
| "System Qty": "系統數量", | |||
| "Variance": "差異" | |||
| } | |||