| | |
| | | statisticReport: 'Statistical Report', |
| | | locDeadReport: 'Locs Dead Report', |
| | | stockStatistic: 'Stock Statistic', |
| | | statisticCount: 'Statistic Count', |
| | | |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | startTime: "startTime", |
| | | endTime: "endTime", |
| | | }, |
| | | stockStatistic: { |
| | | id: "id", |
| | | dayTime: "dayTime", |
| | | taskType: "taskType", |
| | | taskStatus: "taskStatus", |
| | | maktx: "maktx", |
| | | matnrCode: "matnrCode", |
| | | count: "count", |
| | | batch: "batch", |
| | | anfme: "anfme", |
| | | unit: "unit", |
| | | }, |
| | | stockStatistic: { |
| | | id: "id", |
| | | dayTime: "dayTime", |
| | | taskType: "taskType", |
| | | taskStatus: "taskStatus", |
| | | maktx: "maktx", |
| | | matnrCode: "matnrCode", |
| | | count: "count", |
| | | inAnfmeCount: 'In Anfme Count', |
| | | outAnfmeCount: 'Count Anfme Count', |
| | | inAnfme: 'In Anfme', |
| | | outAnfme: 'Out Anfme', |
| | | locCode: 'Loc Code', |
| | | barcode: 'Barcode', |
| | | batch: "batch", |
| | | anfme: "anfme", |
| | | unit: "unit", |
| | | }, |
| | | delivery: { |
| | | code: "code", |
| | | platId: "platId", |
| | |
| | | transferItem: '调拔单明细', |
| | | locRevise: '库存调整', |
| | | statisticReport: '日志报表', |
| | | locDeadReport : '库存停滞报表', |
| | | stockStatistic: '日库存统计', |
| | | locDeadReport: '库存停滞报表', |
| | | stockStatistic: '日入库汇总查询', |
| | | outStatistic: '日出库汇总查询', |
| | | inStatistic: '日入库汇总查询', |
| | | inStatisticItem: '日入库明细查询', |
| | | outStatisticItem: '日出库明细查询', |
| | | statisticCount: '日出入库汇总统计', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | useStatus: '库位状态', |
| | | locAreaId: '逻辑分区' |
| | | }, |
| | | stockStatistic: { |
| | | id: "id", |
| | | dayTime: "日期", |
| | | taskType: "任务类型", |
| | | taskStatus: "任务状态", |
| | | maktx: "物料名称", |
| | | matnrCode: "物料编码", |
| | | count: "次数", |
| | | batch: "批次", |
| | | anfme: "数量", |
| | | unit: "单位", |
| | | }, |
| | | stockStatistic: { |
| | | id: "id", |
| | | dayTime: "日期", |
| | | taskType: "任务类型", |
| | | taskStatus: "任务状态", |
| | | inAnfmeCount: '入库次数', |
| | | outAnfmeCount: '出库次数', |
| | | inAnfme: '入库量', |
| | | outAnfme: '出库量', |
| | | maktx: "物料名称", |
| | | matnrCode: "物料编码", |
| | | locCode: '库位', |
| | | barcode: '托盘码', |
| | | count: "总次数", |
| | | batch: "批次", |
| | | anfme: "数量", |
| | | unit: "单位", |
| | | }, |
| | | locType: { |
| | | name: "库位类型", |
| | | code: "编号", |
| | |
| | | import transfer from "./orders/transfer"; |
| | | import locRevise from './stockManage/locRevise'; |
| | | import locDeadReport from './statistics/deadTime'; |
| | | import inStatistic from './statistics/inStockNum'; |
| | | import outStatistic from './statistics/outStockNum'; |
| | | import outStatisticItem from './statistics/outStockItem'; |
| | | import inStatisticItem from './statistics/inStockItem'; |
| | | import statisticCount from './statistics/stockStatisticNum'; |
| | | |
| | | const ResourceContent = (node) => { |
| | | switch (node.component) { |
| | |
| | | return locRevise; |
| | | case "locDeadReport": |
| | | return locDeadReport; |
| | | case "inStatistic": |
| | | return inStatistic; |
| | | case "outStatistic": |
| | | return outStatistic; |
| | | case "outStatisticItem": |
| | | return outStatisticItem; |
| | | case "inStatisticItem": |
| | | return inStatisticItem; |
| | | case "statisticCount": |
| | | return statisticCount; |
| | | default: |
| | | return { |
| | | list: ListGuesser, |
| | |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | |
| | | '& .column-deadTime': { |
| | | width: 140, |
| | | textAlign: 'center', |
| | | color: 'red', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | | color: 'black', |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 150 |
| | | }, |
| | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="inStock/num" |
| | | resource="locItem" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='InStockNumList' |
| | | preferenceKey='locDeadReport' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
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'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | |
| | | '& .column-dayTime': { |
| | | width: 120, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .column-taskType$': { |
| | | width: 130, |
| | | }, |
| | | |
| | | '& .column-matnrCode': { |
| | | width: 150, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | | color: 'black', |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 350 |
| | | }, |
| | | })); |
| | | |
| | | const InStockItemList = () => { |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_task_type' && dict.group == 3)) || []; |
| | | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.before' source="dayTime" alwaysOn />, |
| | | // <AutocompleteInput optionText="label" |
| | | // choices={dict} |
| | | // optionValue="value" |
| | | // label="table.field.stockStatistic.taskType" |
| | | // filter |
| | | // source="taskType" |
| | | // alwaysOn />, |
| | | <TextInput source="maktx" label="table.field.locItem.maktx" />, |
| | | <TextInput source="matnrCode" label="table.field.locItem.matnrCode" alwaysOn />, |
| | | <TextInput source="batch" label="table.field.locItem.batch" />, |
| | | ] |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="inStatisticItem" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | }} |
| | | title={false} |
| | | empty={false} |
| | | filter={{ taskType: 1, taskStatus: 100 }} |
| | | filters={filters} |
| | | sort={{ field: "day_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='inStatisticItem' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='inStatisticItem' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id']} |
| | | > |
| | | <TextField source="id" key="id-key" /> |
| | | {/* <TextField source="taskType$" label="table.field.stockStatistic.taskType" /> */} |
| | | <TextField source="locCode" label="table.field.stockStatistic.locCode" /> |
| | | <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="unit" label="table.field.locItem.unit" /> |
| | | <TextField source="barcode" label="table.field.stockStatistic.barcode" /> |
| | | <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 /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default InStockItemList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import InStockItemList from "./InStockItemList"; |
| | | |
| | | export default { |
| | | list: InStockItemList, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
| | | } |
| | | }; |
| | |
| | | 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': { |
| | |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-deadTime': { |
| | | width: 140, |
| | | |
| | | '& .column-dayTime': { |
| | | width: 120, |
| | | textAlign: 'center', |
| | | color: 'red', |
| | | }, |
| | | |
| | | '& .column-taskType$': { |
| | | width: 130, |
| | | }, |
| | | |
| | | '& .column-matnrCode': { |
| | | width: 150, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 150 |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | width: 350 |
| | | }, |
| | | })); |
| | | |
| | | 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); |
| | | const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_task_type' && dict.group == 3)) || []; |
| | | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.before' source="dayTime" alwaysOn />, |
| | | // <AutocompleteInput optionText="label" |
| | | // choices={dict} |
| | | // optionValue="value" |
| | | // label="table.field.stockStatistic.taskType" |
| | | // filter |
| | | // source="taskType" |
| | | // alwaysOn />, |
| | | <TextInput source="maktx" label="table.field.locItem.maktx" />, |
| | | <TextInput source="matnrCode" label="table.field.locItem.matnrCode" alwaysOn/>, |
| | | <TextInput source="batch" label="table.field.locItem.batch" />, |
| | | ] |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="locItem" |
| | | resource="inStatistic" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.locItem"} |
| | | title={false} |
| | | empty={false} |
| | | filter={{taskType: 1, taskStatus: 100}} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "asc" }} |
| | | sort={{ field: "day_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='locItem' /> |
| | | <SelectColumnsButton preferenceKey='stockStatistic' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='locDeadReport' |
| | | preferenceKey='stockStatistics' |
| | | 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" /> |
| | | <NumberField source="id" key="id-key"/> |
| | | {/* <TextField source="taskType$" label="table.field.stockStatistic.taskType" /> */} |
| | | <TextField source="dayTime" label="table.field.stockStatistic.dayTime" /> |
| | | <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> |
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'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | |
| | | '& .column-dayTime': { |
| | | width: 120, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .column-taskType$': { |
| | | width: 130, |
| | | }, |
| | | |
| | | '& .column-matnrCode': { |
| | | width: 150, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | | color: 'black', |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 350 |
| | | }, |
| | | })); |
| | | |
| | | const OutStockNumList = () => { |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | // const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_task_type' && dict.group == 3)) || []; |
| | | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.before' source="dayTime" alwaysOn />, |
| | | // <AutocompleteInput optionText="label" |
| | | // choices={dict} |
| | | // optionValue="value" |
| | | // label="table.field.stockStatistic.taskType" |
| | | // filter |
| | | // source="taskType" |
| | | // alwaysOn />, |
| | | <TextInput source="maktx" label="table.field.locItem.maktx" />, |
| | | <TextInput source="matnrCode" label="table.field.locItem.matnrCode" alwaysOn />, |
| | | <TextInput source="batch" label="table.field.locItem.batch" />, |
| | | ] |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="outStatisticItem" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | }} |
| | | title={false} |
| | | empty={false} |
| | | filter={{ taskType: 101, taskStatus: 200 }} |
| | | filters={filters} |
| | | sort={{ field: "day_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='outStatisticItem' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='outStatisticItem' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'memo']} |
| | | > |
| | | <TextField source="id" key="id-key" /> |
| | | <TextField source="dayTime" label="table.field.stockStatistic.dayTime" /> |
| | | <TextField source="locCode" label="table.field.stockStatistic.locCode" /> |
| | | <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="unit" label="table.field.locItem.unit" /> |
| | | <TextField source="barcode" label="table.field.stockStatistic.barcode" /> |
| | | <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 /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default OutStockNumList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import OutStockItemList from "./OutStockItemList"; |
| | | |
| | | export default { |
| | | list: OutStockItemList, |
| | | 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'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | |
| | | '& .column-dayTime': { |
| | | width: 120, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .column-taskType$': { |
| | | width: 130, |
| | | }, |
| | | |
| | | '& .column-matnrCode': { |
| | | width: 150, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | | color: 'black', |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 350 |
| | | }, |
| | | })); |
| | | |
| | | const OutStockNumList = () => { |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | // const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_task_type' && dict.group == 3)) || []; |
| | | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.before' source="dayTime" alwaysOn />, |
| | | // <AutocompleteInput optionText="label" |
| | | // choices={dict} |
| | | // optionValue="value" |
| | | // label="table.field.stockStatistic.taskType" |
| | | // filter |
| | | // source="taskType" |
| | | // alwaysOn />, |
| | | <TextInput source="maktx" label="table.field.locItem.maktx" />, |
| | | <TextInput source="matnrCode" label="table.field.locItem.matnrCode" alwaysOn/>, |
| | | <TextInput source="batch" label="table.field.locItem.batch" />, |
| | | ] |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="outStatistic" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | }} |
| | | title={false} |
| | | empty={false} |
| | | filter={{taskType: 101, taskStatus: 200}} |
| | | filters={filters} |
| | | sort={{ field: "day_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='outStatistic' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='outStatistic' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'memo']} |
| | | > |
| | | <NumberField source="id" key="id-key"/> |
| | | {/* <TextField source="taskType$" label="table.field.stockStatistic.taskType" /> */} |
| | | <TextField source="dayTime" label="table.field.stockStatistic.dayTime" /> |
| | | <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="unit" label="table.field.locItem.unit" /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default OutStockNumList; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import OutStockNumList from "./OutStockNumList"; |
| | | |
| | | export default { |
| | | list: OutStockNumList, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
| | | } |
| | | }; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import StockStatistic from "./stockStatisticList"; |
| | | |
| | | export default { |
| | | list: StockStatistic, |
| | | 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'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | |
| | | '& .column-dayTime': { |
| | | width: 120, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .column-taskType$': { |
| | | width: 130, |
| | | }, |
| | | |
| | | '& .column-matnrCode': { |
| | | width: 150, |
| | | textAlign: 'center', |
| | | }, |
| | | |
| | | '& .RaDatagrid-headerCell': { |
| | | color: 'black', |
| | | }, |
| | | |
| | | '& .column-maktx': { |
| | | width: 350 |
| | | }, |
| | | })); |
| | | |
| | | const stockStatisticList = () => { |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | // const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_task_type' && dict.group == 3)) || []; |
| | | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.before' source="dayTime" alwaysOn />, |
| | | // <AutocompleteInput optionText="label" |
| | | // choices={dict} |
| | | // optionValue="value" |
| | | // label="table.field.stockStatistic.taskType" |
| | | // filter |
| | | // source="taskType" |
| | | // alwaysOn />, |
| | | <TextInput source="maktx" label="table.field.locItem.maktx" />, |
| | | <TextInput source="matnrCode" label="table.field.locItem.matnrCode" alwaysOn />, |
| | | <TextInput source="batch" label="table.field.locItem.batch" />, |
| | | ] |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | resource="statistic/num" |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | }} |
| | | title={false} |
| | | empty={false} |
| | | filter={{ taskType: 101, taskStatus: 200 }} |
| | | filters={filters} |
| | | sort={{ field: "day_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <SelectColumnsButton preferenceKey='outStatisticCount' /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='outStatisticCount' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'memo']} |
| | | > |
| | | <NumberField source="id" key="id-key" /> |
| | | <TextField source="dayTime" label="table.field.stockStatistic.dayTime" /> |
| | | <NumberField source="count" label="table.field.stockStatistic.count" /> |
| | | <TextField source="inAnfmeCount" label="table.field.stockStatistic.inAnfmeCount" /> |
| | | <TextField source="outAnfmeCount" label="table.field.stockStatistic.outAnfmeCount" /> |
| | | <NumberField source="anfme" label="table.field.stockStatistic.anfme" /> |
| | | <NumberField source="inAnfme" label="table.field.stockStatistic.inAnfme" /> |
| | | <TextField source="outAnfme" label="table.field.stockStatistic.outAnfme" /> |
| | | </StyledDatagrid> |
| | | </List> |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default stockStatisticList; |
| | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<StockStatistic, BaseParam> pageParam = new PageParam<>(baseParam, StockStatistic.class); |
| | | QueryWrapper<StockStatistic> wrapper = pageParam.buildWrapper(true); |
| | | wrapper.select("id, day_time, COUNT( barcode ) `count`, SUM( anfme ) anfme, COUNT(IF (task_type = 1, 0, NULL)) in_anfme_count, COUNT(IF ( task_type = 101, 0, NULL)) out_anfme_count, SUM(CASE WHEN task_type = 1 THEN)"); |
| | | wrapper.select("id, day_time, COUNT( barcode ) `count`, " + |
| | | "SUM( anfme ) anfme," + |
| | | "COUNT(IF (task_type = 1, 0, NULL)) in_anfme_count, " + |
| | | "COUNT(IF ( task_type = 101, 0, NULL)) out_anfme_count, " + |
| | | "SUM( CASE WHEN task_type = 1 THEN anfme ELSE 0 END ) in_anfme," + |
| | | "SUM( CASE WHEN task_type = 101 THEN anfme ELSE 0 END ) out_anfme"); |
| | | wrapper.groupBy("barcode, day_time"); |
| | | return R.ok().add(stockStatisticService.page(pageParam, wrapper)); |
| | | } |