skyouc
昨天 8fa94157065826a8f1086856fc002fbefd173a77
日库存次数统计
4个文件已修改
4个文件已添加
373 ■■■■■ 已修改文件
rsf-admin/src/i18n/en.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/zh.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/ResourceContent.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/basicInfo/loc/LocItemList.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/statistics/deadTime/LocItemDeadList.jsx 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/statistics/deadTime/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/statistics/inStockNum/InStockNumList.jsx 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/statistics/inStockNum/index.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/en.js
@@ -212,6 +212,8 @@
        checkDiff: 'Check Diff',
        transfer: 'Transfer',
        locRevise: 'Loc Revise',
        statisticReport: 'Statistical Report',
        locDeadReport: 'Locs Dead Report',
    },
    table: {
        field: {
@@ -1135,6 +1137,7 @@
                anfme: "anfme",
                outQty: 'Revise Qty',
                qty: 'Qty',
                deadTime: 'Dead (Days)',
                workQty: 'Work Qty',
                reviseQty: 'Revise Qty',
                batch: "batch",
rsf-admin/src/i18n/zh.js
@@ -219,6 +219,8 @@
        transfer: '调拔单',
        transferItem: '调拔单明细',
        locRevise: '库存调整',
        statisticReport: '日志报表',
        locDeadReport : '库存停滞报表',
    },
    table: {
        field: {
@@ -1143,6 +1145,7 @@
                trackCode: "跟踪码",
                workQty: '执行数',
                reviseQty: '实际数量',
                deadTime: '停留时间(天)',
                qty: '完成数',
                batch: "批次",
                splrBatch: "批次",
rsf-admin/src/page/ResourceContent.js
@@ -57,7 +57,7 @@
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) {
@@ -167,6 +167,8 @@
      return transfer;
    case "locRevise":
      return locRevise;
    case "locDeadReport":
      return locDeadReport;
    default:
      return {
        list: ListGuesser,
rsf-admin/src/page/basicInfo/loc/LocItemList.jsx
@@ -114,9 +114,7 @@
                actions={(
                    <TopToolbar>
                        <FilterButton />
                        {/* <MyCreateButton onClick={() => { setCreateDialog(true) }} /> */}
                        <SelectColumnsButton preferenceKey='locItem' />
                        {/* <MyExportButton /> */}
                    </TopToolbar>
                )}
                perPage={DEFAULT_ITEM_PAGE_SIZE}
@@ -154,7 +152,7 @@
                    <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>
rsf-admin/src/page/statistics/deadTime/LocItemDeadList.jsx
New file
@@ -0,0 +1,163 @@
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;
rsf-admin/src/page/statistics/deadTime/index.jsx
New file
@@ -0,0 +1,16 @@
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}`
    }
};
rsf-admin/src/page/statistics/inStockNum/InStockNumList.jsx
New file
@@ -0,0 +1,164 @@
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;
rsf-admin/src/page/statistics/inStockNum/index.jsx
New file
@@ -0,0 +1,16 @@
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}`
    }
};