|
|
|
@@ -24,49 +24,49 @@ export interface ReportDefinition { |
|
|
|
} |
|
|
|
|
|
|
|
export const REPORTS: ReportDefinition[] = [ |
|
|
|
{ |
|
|
|
id: "rep-001", |
|
|
|
title: "報告 1", |
|
|
|
apiEndpoint: `${NEXT_PUBLIC_API_URL}/report/print-report1`, |
|
|
|
fields: [ |
|
|
|
{ label: "From Date", name: "fromDate", type: "date", required: true }, // Mandatory |
|
|
|
{ label: "To Date", name: "toDate", type: "date", required: true }, // Mandatory |
|
|
|
{ label: "Item Code", name: "itemCode", type: "text", required: false, placeholder: "e.g. FG"}, |
|
|
|
{ label: "Item Type", name: "itemType", type: "select", required: false, |
|
|
|
options: [ |
|
|
|
{ label: "FG", value: "FG" }, |
|
|
|
{ label: "Material", value: "Mat" } |
|
|
|
] }, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "rep-002", |
|
|
|
title: "報告 2", |
|
|
|
apiEndpoint: `${NEXT_PUBLIC_API_URL}/report/print-report2`, |
|
|
|
fields: [ |
|
|
|
{ label: "Target Date", name: "targetDate", type: "date", required: false }, |
|
|
|
{ label: "Item Code", name: "itemCode", type: "text", required: false }, |
|
|
|
{ label: "Shift", name: "shift", type: "select", options: [ |
|
|
|
{ label: "Day", value: "D" }, |
|
|
|
{ label: "Night", value: "N" } |
|
|
|
], required: false} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "rep-003", |
|
|
|
title: "報告 3", |
|
|
|
apiEndpoint: `${NEXT_PUBLIC_API_URL}/report/print-report3`, |
|
|
|
fields: [ |
|
|
|
{ label: "From Date", name: "fromDate", type: "date", required: true }, // Mandatory |
|
|
|
{ label: "To Date", name: "toDate", type: "date", required: true }, // Mandatory |
|
|
|
{ label: "Item Code", name: "itemCode", type: "text", required: false, placeholder: "e.g. FG"}, |
|
|
|
{ label: "Item Type", name: "itemType", type: "select", required: false, |
|
|
|
options: [ |
|
|
|
{ label: "FG", value: "FG" }, |
|
|
|
{ label: "Material", value: "Mat" } |
|
|
|
] }, |
|
|
|
] |
|
|
|
}, |
|
|
|
//{ |
|
|
|
// id: "rep-001", |
|
|
|
// title: "報告 1", |
|
|
|
// apiEndpoint: `${NEXT_PUBLIC_API_URL}/report/print-report1`, |
|
|
|
// fields: [ |
|
|
|
// { label: "From Date", name: "fromDate", type: "date", required: true }, // Mandatory |
|
|
|
// { label: "To Date", name: "toDate", type: "date", required: true }, // Mandatory |
|
|
|
// { label: "Item Code", name: "itemCode", type: "text", required: false, placeholder: "e.g. FG"}, |
|
|
|
// { label: "Item Type", name: "itemType", type: "select", required: false, |
|
|
|
// options: [ |
|
|
|
// { label: "FG", value: "FG" }, |
|
|
|
// { label: "Material", value: "Mat" } |
|
|
|
// ] }, |
|
|
|
// ] |
|
|
|
//}, |
|
|
|
//{ |
|
|
|
// id: "rep-002", |
|
|
|
// title: "報告 2", |
|
|
|
// apiEndpoint: `${NEXT_PUBLIC_API_URL}/report/print-report2`, |
|
|
|
// fields: [ |
|
|
|
// { label: "Target Date", name: "targetDate", type: "date", required: false }, |
|
|
|
// { label: "Item Code", name: "itemCode", type: "text", required: false }, |
|
|
|
// { label: "Shift", name: "shift", type: "select", options: [ |
|
|
|
// { label: "Day", value: "D" }, |
|
|
|
// { label: "Night", value: "N" } |
|
|
|
// ], required: false} |
|
|
|
// ] |
|
|
|
//}, |
|
|
|
//{ |
|
|
|
// id: "rep-003", |
|
|
|
// title: "報告 3", |
|
|
|
// apiEndpoint: `${NEXT_PUBLIC_API_URL}/report/print-report3`, |
|
|
|
// fields: [ |
|
|
|
// { label: "From Date", name: "fromDate", type: "date", required: true }, // Mandatory |
|
|
|
// { label: "To Date", name: "toDate", type: "date", required: true }, // Mandatory |
|
|
|
// { label: "Item Code", name: "itemCode", type: "text", required: false, placeholder: "e.g. FG"}, |
|
|
|
// { label: "Item Type", name: "itemType", type: "select", required: false, |
|
|
|
// options: [ |
|
|
|
// { label: "FG", value: "FG" }, |
|
|
|
// { label: "Material", value: "Mat" } |
|
|
|
// ] }, |
|
|
|
// ] |
|
|
|
//}, |
|
|
|
{ |
|
|
|
id: "rep-004", |
|
|
|
title: "入倉記錄報告", |
|
|
|
@@ -94,14 +94,41 @@ export const REPORTS: ReportDefinition[] = [ |
|
|
|
] }, |
|
|
|
{ label: "物料編號 Item Code", name: "itemCode", type: "select", required: false, |
|
|
|
multiple: true, |
|
|
|
allowInput: true, // Allow user to input custom item codes |
|
|
|
allowInput: true, |
|
|
|
dynamicOptions: true, |
|
|
|
dynamicOptionsEndpoint: `${NEXT_PUBLIC_API_URL}/report/semi-fg-item-codes`, |
|
|
|
dynamicOptionsParam: "stockCategory", |
|
|
|
options: [] }, // Options will be loaded dynamically |
|
|
|
options: [] }, |
|
|
|
{ label: "年份 Year", name: "year", type: "text", required: false, placeholder: "e.g. 2026" }, |
|
|
|
{ label: "完成生產日期:由 Last Out Date Start", name: "lastOutDateStart", type: "date", required: false, placeholder: "dd/mm/yyyy" }, |
|
|
|
{ label: "完成生產日期:至 Last Out Date End", name: "lastOutDateEnd", type: "date", required: false, placeholder: "dd/mm/yyyy" }, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
id: "rep-006", |
|
|
|
title: "庫存商品消費趨勢報告", |
|
|
|
apiEndpoint: `${NEXT_PUBLIC_API_URL}/report/print-stock-item-consumption-trend`, |
|
|
|
fields: [ |
|
|
|
{ label: "倉存類別 Stock Category", name: "stockCategory", type: "select", required: false, |
|
|
|
multiple: true, |
|
|
|
options: [ |
|
|
|
{ label: "All", value: "All" }, |
|
|
|
{ label: "MAT", value: "MAT" }, |
|
|
|
{ label: "WIP", value: "WIP" }, |
|
|
|
{ label: "NM", value: "NM" }, |
|
|
|
{ label: "FG", value: "FG" }, |
|
|
|
{ label: "CMB", value: "CMB" } |
|
|
|
] }, |
|
|
|
{ label: "物料編號 Item Code", name: "itemCode", type: "select", required: false, |
|
|
|
multiple: true, |
|
|
|
allowInput: true, |
|
|
|
dynamicOptions: true, |
|
|
|
dynamicOptionsEndpoint: `${NEXT_PUBLIC_API_URL}/report/stock-item-code-prefixes`, |
|
|
|
dynamicOptionsParam: "stockCategory", |
|
|
|
options: [] }, |
|
|
|
{ label: "年份 Year", name: "year", type: "text", required: false, placeholder: "e.g. 2026" }, |
|
|
|
{ label: "完成生產日期:由 Last Out Date Start", name: "lastOutDateStart", type: "date", required: false }, |
|
|
|
{ label: "完成生產日期:至 Last Out Date End", name: "lastOutDateEnd", type: "date", required: false }, |
|
|
|
] |
|
|
|
} |
|
|
|
]; |