CANCERYS\kw093 1 місяць тому
джерело
коміт
744d94fb40
9 змінених файлів з 97 додано та 16 видалено
  1. +3
    -0
      src/app/api/inventory/actions.ts
  2. +1
    -1
      src/app/api/pickOrder/actions.ts
  3. +14
    -0
      src/app/api/pickOrder/index.ts
  4. +7
    -0
      src/app/utils/formatUtil.ts
  5. +18
    -0
      src/components/DashboardPage/DashboardLineChart.tsx
  6. +28
    -7
      src/components/DashboardPage/DashboardPage.tsx
  7. +18
    -0
      src/components/DashboardPage/DashboardProgressChart.tsx
  8. +1
    -1
      src/i18n/zh/common.json
  9. +7
    -7
      src/i18n/zh/pickOrder.json

+ 3
- 0
src/app/api/inventory/actions.ts Переглянути файл

@@ -10,6 +10,9 @@ import { RecordsRes } from "../utils";

export interface LotLineInfo {
inventoryLotLineId: number,
itemId: number,
itemNo: string,
itemName: string,
lotNo: string,
remainingQty: number,
uom: string


+ 1
- 1
src/app/api/pickOrder/actions.ts Переглянути файл

@@ -91,7 +91,7 @@ export const consolidatePickOrder_revert = async (ids: number[]) => {
export const releasePickOrder = async (data: ReleasePickOrderInputs) => {
console.log(data)
console.log(JSON.stringify(data))
const po = await serverFetchJson<any>(`${BASE_API_URL}/pickOrder/releaseConso`, {
const po = await serverFetchJson<{body: any, status: number}>(`${BASE_API_URL}/pickOrder/releaseConso`, {
method: "POST",
body: JSON.stringify(data),
headers: { "Content-Type": "application/json" },


+ 14
- 0
src/app/api/pickOrder/index.ts Переглянути файл

@@ -2,6 +2,7 @@ import "server-only";
import { Pageable, serverFetchJson } from "@/app/utils/fetchUtil";
import { BASE_API_URL } from "@/config/api";
import { cache } from "react";
import { String } from "lodash";

interface PickOrderItemInfo {
name: string,
@@ -31,6 +32,19 @@ export interface PickOrderLine {
uomCode: string,
uomDesc: string
}
export interface StockOutLine {
id: number
itemId: number
itemName: string
itemNo: string
qty: number
stockOutId?: number
pickOrderLineId: number
lotNo?: string
inventoryLotLineId?: number
status: string
pickTime?: string
}
export interface ConsoPickOrderResult{
id: number,
code: string,


+ 7
- 0
src/app/utils/formatUtil.ts Переглянути файл

@@ -67,6 +67,13 @@ export const stockInLineStatusMap: { [status: string]: number } = {
"rejected": 9,
};

export const stockOutLineStatusMap: { [status: string]: number } = {
"draft": 0,
"pending": 1, // waiting for qc
// after qc = completed
"completed": 2,
};

export const pickOrderStatusMap: { [status: string]: number } = {
"pending": 1,
"consolidated": 2,


+ 18
- 0
src/components/DashboardPage/DashboardLineChart.tsx Переглянути файл

@@ -0,0 +1,18 @@
"use client"
// npm install
interface Props { // params type

}

const DashboardLineChart: React.FC<Props> = ({
// params
}) => {

return (
<>
line chart
</>
)
}
export default DashboardLineChart


+ 28
- 7
src/components/DashboardPage/DashboardPage.tsx Переглянути файл

@@ -5,20 +5,41 @@ import theme from "../../theme";
import { TabsProps } from "@mui/material/Tabs";
import React, { useCallback, useEffect, useState } from "react";
import { useRouter } from "next/navigation";
import { Card, CardContent, CardHeader, Grid } from "@mui/material";
import DashboardProgressChart from "../DashboardProgressChart/DashboardProgressChart";
import DashboardLineChart from "../DashboardLineChart/DashboardLineChart";

type Props = {
}
const DashboardPage: React.FC<Props> = ({
}) => {
type Props = {};

const DashboardPage: React.FC<Props> = ({}) => {
const { t } = useTranslation("dashboard");
const router = useRouter();

return (
<ThemeProvider theme={theme}>
<>

<Grid container>
<Grid item xs={12}>
<Card>
<CardHeader
title={t("Progress chart")}
/>
<CardContent>
<DashboardProgressChart />
</CardContent>
</Card>
</Grid>
<Grid item xs={12}>
<Card>
<CardHeader
title={t("Line chart")}
/>
<CardContent>
<DashboardLineChart />
</CardContent>
</Card>
</Grid>
</Grid>
</>
</ThemeProvider>
);


+ 18
- 0
src/components/DashboardPage/DashboardProgressChart.tsx Переглянути файл

@@ -0,0 +1,18 @@
"use client"

interface Props { // params type

}

const DashboardProgressChart: React.FC<Props> = ({
// params
}) => {

return (
<>
progress chart
</>
)
}
export default DashboardProgressChart


+ 1
- 1
src/i18n/zh/common.json Переглянути файл

@@ -30,7 +30,7 @@
"Supplier": "供應商",
"Purchase Order":"採購單",
"Demand Forecast":"需求預測",
"Pick Order":"挑選貨單",
"Pick Order": "提料單",
"Deliver Order":"交貨單",
"Project":"專案",
"Product":"產品",


+ 7
- 7
src/i18n/zh/pickOrder.json Переглянути файл

@@ -90,16 +90,16 @@



"Pick Order": "挑選貨單",
"Pick Order": "提料單",
"Type": "類型",
"Reset": "重置",
"Search": "搜尋",
"Pick Orders": "挑選貨單",
"Consolidated Pick Orders": "合併挑選貨單",
"Pick Order No.": "挑選貨單編號",
"Pick Order Date": "挑選貨單日期",
"Pick Order Status": "挑選貨單狀態",
"Pick Order Type": "挑選貨單類型",
"Pick Orders": "提料單",
"Consolidated Pick Orders": "合併提料單",
"Pick Order No.": "提料單編號",
"Pick Order Date": "提料單日期",
"Pick Order Status": "提料單狀態",
"Pick Order Type": "提料單類型",
"Consolidated Code": "合併編號",
"type": "類型",
"Items": "項目",


Завантаження…
Відмінити
Зберегти