| | |
| | | checkDiff: 'Check Diff', |
| | | transfer: 'Transfer', |
| | | locRevise: 'Loc Revise', |
| | | statisticReport: 'Statistical Report', |
| | | locDeadReport: 'Locs Dead Report', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | anfme: "anfme", |
| | | outQty: 'Revise Qty', |
| | | qty: 'Qty', |
| | | deadTime: 'Dead (Days)', |
| | | workQty: 'Work Qty', |
| | | reviseQty: 'Revise Qty', |
| | | batch: "batch", |
| | |
| | | transfer: '调拔单', |
| | | transferItem: '调拔单明细', |
| | | locRevise: '库存调整', |
| | | statisticReport: '日志报表', |
| | | locDeadReport : '库存停滞报表', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | trackCode: "跟踪码", |
| | | workQty: '执行数', |
| | | reviseQty: '实际数量', |
| | | deadTime: '停留时间(天)', |
| | | qty: '完成数', |
| | | batch: "批次", |
| | | splrBatch: "批次", |
| | |
| | | import checkDiff from "./orders/check/checkDiff"; |
| | | import transfer from "./orders/transfer"; |
| | | import locRevise from './stockManage/locRevise'; |
| | | |
| | | import locDeadReport from './statistics/deadTime'; |
| | | |
| | | const ResourceContent = (node) => { |
| | | switch (node.component) { |
| | |
| | | return transfer; |
| | | case "locRevise": |
| | | return locRevise; |
| | | case "locDeadReport": |
| | | return locDeadReport; |
| | | default: |
| | | return { |
| | | list: ListGuesser, |
| | |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */} |
| | | <SelectColumnsButton preferenceKey='locItem' /> |
| | | {/* <MyExportButton /> */} |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_ITEM_PAGE_SIZE} |
| | |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} redirect={false}/> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | } from 'react-admin'; |
| | | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import { display, width } from "@mui/system"; |
| | | import { color } from "framer-motion"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-deadTime': { |
| | | width: 140, |
| | | textAlign: 'center', |
| | | color: 'red', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | | color: 'black', |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 150 |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <NumberInput source="locId" label="table.field.locItem.locId" />, |
| | | <NumberInput source="orderId" label="table.field.locItem.orderId" />, |
| | | <TextInput source="type$" label="table.field.locItem.type" />, |
| | | <NumberInput source="orderItemId" label="table.field.locItem.orderItemId" />, |
| | | <NumberInput source="wkType$" label="table.field.locItem.wkType" />, |
| | | <NumberInput source="matnrId" label="table.field.locItem.matnrId" />, |
| | | <TextInput source="maktx" label="table.field.locItem.maktx" />, |
| | | <TextInput source="matnrCode" label="table.field.locItem.matnrCode" />, |
| | | <TextInput source="trackCode" label="table.field.locItem.trackCode" />, |
| | | <TextInput source="unit" label="table.field.locItem.unit" />, |
| | | <NumberInput source="anfme" label="table.field.locItem.anfme" />, |
| | | <TextInput source="batch" label="table.field.locItem.batch" />, |
| | | <TextInput source="splrBatch" label="table.field.locItem.splrBatch" />, |
| | | <TextInput source="spec" label="table.field.locItem.spec" />, |
| | | <TextInput source="model" label="table.field.locItem.model" />, |
| | | <TextInput source="fieldsIndex" label="table.field.locItem.fieldsIndex" />, |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | | source="status" |
| | | choices={[ |
| | | { id: '1', name: 'common.enums.statusTrue' }, |
| | | { id: '0', name: 'common.enums.statusFalse' }, |
| | | ]} |
| | | resettable |
| | | />, |
| | | ] |
| | | |
| | | const LocItemDeadList = () => { |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="inStock/num" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | }} |
| | | title={"menu.locItem"} |
| | | empty={false} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "asc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='locItem' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='InStockNumList' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'locId', 'orderId', 'orderItemId', 'matnrId', 'trackCode', 'fieldsIndex', 'splrBatch', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="locCode" label="table.field.locItem.locCode" /> |
| | | <NumberField source="deadTime" label="table.field.locItem.deadTime" /> |
| | | <NumberField source="locId" label="table.field.locItem.locId" /> |
| | | <NumberField source="matnrId" label="table.field.locItem.matnrId" /> |
| | | <TextField source="matnrCode" label="table.field.locItem.matnrCode" /> |
| | | <TextField source="maktx" label="table.field.locItem.maktx" /> |
| | | <NumberField source="anfme" label="table.field.locItem.anfme" /> |
| | | <TextField source="batch" label="table.field.locItem.batch" /> |
| | | <TextField source="trackCode" label="table.field.locItem.trackCode" /> |
| | | <TextField source="unit" label="table.field.locItem.unit" /> |
| | | <TextField source="splrBatch" label="table.field.locItem.splrBatch" /> |
| | | <TextField source="spec" label="table.field.locItem.spec" /> |
| | | <TextField source="model" label="table.field.locItem.model" /> |
| | | <TextField source="fieldsIndex" label="table.field.locItem.fieldsIndex" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default LocItemDeadList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import LocItemDeadList from "./LocItemDeadList"; |
| | | |
| | | export default { |
| | | list: LocItemDeadList, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
| | | } |
| | | }; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | } from 'react-admin'; |
| | | |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import { display, width } from "@mui/system"; |
| | | import { color } from "framer-motion"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-deadTime': { |
| | | width: 140, |
| | | textAlign: 'center', |
| | | color: 'red', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | | color: 'black', |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 150 |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" />, |
| | | <DateInput label='common.time.before' source="timeEnd" />, |
| | | <NumberInput source="locId" label="table.field.locItem.locId" />, |
| | | <NumberInput source="orderId" label="table.field.locItem.orderId" />, |
| | | <TextInput source="type$" label="table.field.locItem.type" />, |
| | | <NumberInput source="orderItemId" label="table.field.locItem.orderItemId" />, |
| | | <NumberInput source="wkType$" label="table.field.locItem.wkType" />, |
| | | <NumberInput source="matnrId" label="table.field.locItem.matnrId" />, |
| | | <TextInput source="maktx" label="table.field.locItem.maktx" />, |
| | | <TextInput source="matnrCode" label="table.field.locItem.matnrCode" />, |
| | | <TextInput source="trackCode" label="table.field.locItem.trackCode" />, |
| | | <TextInput source="unit" label="table.field.locItem.unit" />, |
| | | <NumberInput source="anfme" label="table.field.locItem.anfme" />, |
| | | <TextInput source="batch" label="table.field.locItem.batch" />, |
| | | <TextInput source="splrBatch" label="table.field.locItem.splrBatch" />, |
| | | <TextInput source="spec" label="table.field.locItem.spec" />, |
| | | <TextInput source="model" label="table.field.locItem.model" />, |
| | | <TextInput source="fieldsIndex" label="table.field.locItem.fieldsIndex" />, |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | | source="status" |
| | | choices={[ |
| | | { id: '1', name: 'common.enums.statusTrue' }, |
| | | { id: '0', name: 'common.enums.statusFalse' }, |
| | | ]} |
| | | resettable |
| | | />, |
| | | ] |
| | | |
| | | const InStockNumList = () => { |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="locItem" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.locItem"} |
| | | empty={false} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "asc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='locItem' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='locDeadReport' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'locId', 'orderId', 'orderItemId', 'matnrId', 'trackCode', 'fieldsIndex', 'splrBatch', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="locCode" label="table.field.locItem.locCode" /> |
| | | <NumberField source="deadTime" label="table.field.locItem.deadTime" /> |
| | | <NumberField source="locId" label="table.field.locItem.locId" /> |
| | | <NumberField source="matnrId" label="table.field.locItem.matnrId" /> |
| | | <TextField source="matnrCode" label="table.field.locItem.matnrCode" /> |
| | | <TextField source="maktx" label="table.field.locItem.maktx" /> |
| | | <NumberField source="anfme" label="table.field.locItem.anfme" /> |
| | | <TextField source="batch" label="table.field.locItem.batch" /> |
| | | <TextField source="trackCode" label="table.field.locItem.trackCode" /> |
| | | <TextField source="unit" label="table.field.locItem.unit" /> |
| | | <TextField source="splrBatch" label="table.field.locItem.splrBatch" /> |
| | | <TextField source="spec" label="table.field.locItem.spec" /> |
| | | <TextField source="model" label="table.field.locItem.model" /> |
| | | <TextField source="fieldsIndex" label="table.field.locItem.fieldsIndex" /> |
| | | <TextField source="updateBy$" label="common.field.updateBy" /> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <TextField source="createBy$" label="common.field.createBy" /> |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default InStockNumList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import InStockNumList from "./InStockNumList"; |
| | | |
| | | export default { |
| | | list: InStockNumList, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
| | | } |
| | | }; |