| 作者 | SHA1 | 備註 | 提交日期 |
|---|---|---|---|
|
|
4464aafbdb | Merge branch 'master' of https://git.2fi-solutions.com/derek/FPSMS-frontend | 1 周之前 |
|
|
e689ad4c0f | stock issue | 1 周之前 |
| @@ -0,0 +1,29 @@ | |||||
| import SearchPage from "@/components/StockIssue/index"; | |||||
| import { PreloadList } from "@/components/StockIssue/action"; | |||||
| import { getServerI18n } from "@/i18n"; | |||||
| import { I18nProvider } from "@/i18n"; | |||||
| import { Stack, Typography } from "@mui/material"; | |||||
| import { Metadata } from "next"; | |||||
| import { Suspense } from "react"; | |||||
| export const metadata: Metadata = { | |||||
| title: "Pick Order", | |||||
| }; | |||||
| const SearchView: React.FC = async () => { | |||||
| const { t } = await getServerI18n("pickOrder"); | |||||
| PreloadList(); | |||||
| return ( | |||||
| <> | |||||
| <I18nProvider namespaces={["pickOrder", "common"]}> | |||||
| <Suspense fallback={<SearchPage.Loading />}> | |||||
| <SearchPage /> | |||||
| </Suspense> | |||||
| </I18nProvider> | |||||
| </> | |||||
| ); | |||||
| }; | |||||
| export default SearchView; | |||||
| @@ -28,6 +28,7 @@ const pathToLabelMap: { [path: string]: string } = { | |||||
| "/jo": "Job Order", | "/jo": "Job Order", | ||||
| "/jo/edit": "Edit Job Order", | "/jo/edit": "Edit Job Order", | ||||
| "/putAway": "Put Away", | "/putAway": "Put Away", | ||||
| "/stockIssue": "Stock Issue", | |||||
| }; | }; | ||||
| const Breadcrumb = () => { | const Breadcrumb = () => { | ||||
| @@ -84,6 +84,12 @@ const NavigationContent: React.FC = () => { | |||||
| label: "Stock Take Management", | label: "Stock Take Management", | ||||
| path: "/stocktakemanagement", | path: "/stocktakemanagement", | ||||
| }, | }, | ||||
| //TODO: anna | |||||
| // { | |||||
| // icon: <RequestQuote />, | |||||
| // label: "Stock Issue", | |||||
| // path: "/stockIssue", | |||||
| // }, | |||||
| { | { | ||||
| icon: <RequestQuote />, | icon: <RequestQuote />, | ||||
| label: "Put Away Scan", | label: "Put Away Scan", | ||||
| @@ -20,7 +20,7 @@ const SearchPage: React.FC<Props> = ({dataList}) => { | |||||
| () => [ | () => [ | ||||
| { | { | ||||
| label: t("Lot No."), | label: t("Lot No."), | ||||
| paramName: "lot_no", | |||||
| paramName: "lotNo", | |||||
| type: "text", | type: "text", | ||||
| }, | }, | ||||
| ], | ], | ||||
| @@ -29,11 +29,11 @@ const SearchPage: React.FC<Props> = ({dataList}) => { | |||||
| const columns = useMemo<Column<StockIssueResult>[]>( | const columns = useMemo<Column<StockIssueResult>[]>( | ||||
| () => [ | () => [ | ||||
| { name: "item_code", label: t("Item Code") }, | |||||
| { name: "item_description", label: t("Item") }, | |||||
| { name: "lot_no", label: t("Lot No.") }, | |||||
| { name: "store_location", label: t("Location") }, | |||||
| { name: "bad_item_qty", label: t("Defective Qty") } | |||||
| { name: "itemCode", label: t("Item Code") }, | |||||
| { name: "itemDescription", label: t("Item") }, | |||||
| { name: "lotNo", label: t("Lot No.") }, | |||||
| { name: "storeLocation", label: t("Location") }, | |||||
| { name: "badItemQty", label: t("Defective Qty") } | |||||
| ], | ], | ||||
| [t], | [t], | ||||
| ); | ); | ||||
| @@ -7,21 +7,25 @@ import { cache } from "react"; | |||||
| export interface StockIssueResult { | export interface StockIssueResult { | ||||
| action: any; | action: any; | ||||
| id: number; | id: number; | ||||
| item_id: number; | |||||
| item_code: string; | |||||
| item_description: string; | |||||
| lot_id: number; | |||||
| lot_no: string; | |||||
| store_location: string; | |||||
| required_qty: number; | |||||
| bad_item_qty: number; | |||||
| issue_remark: string; | |||||
| picker_name: string; | |||||
| handle_status: string; | |||||
| handle_date: string; | |||||
| handled_by: number; | |||||
| itemId: number; | |||||
| itemCode: string; | |||||
| itemDescription: string; | |||||
| lotId: number; | |||||
| lotNo: string; | |||||
| storeLocation: string; | |||||
| requiredQty: number; | |||||
| badItemQty: number; | |||||
| issueRemark: string; | |||||
| pickerName: string; | |||||
| handleStatus: string; | |||||
| handleDate: string; | |||||
| handledBy: number; | |||||
| } | } | ||||
| export const PreloadList = () => { | |||||
| fetchList(); | |||||
| }; | |||||
| export const fetchList = cache(async () => { | export const fetchList = cache(async () => { | ||||
| return serverFetchJson<StockIssueResult[]>(`${BASE_API_URL}/pickExecution/badItemList`, { | return serverFetchJson<StockIssueResult[]>(`${BASE_API_URL}/pickExecution/badItemList`, { | ||||
| next: { tags: ["Bad Item List"] }, | next: { tags: ["Bad Item List"] }, | ||||