|  |  |  | 
|---|
|  |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; | 
|---|
|  |  |  | import MyCreateButton from "@/page/components/MyCreateButton"; | 
|---|
|  |  |  | import MyExportButton from '@/page/components/MyExportButton'; | 
|---|
|  |  |  | import PageEditDrawer from "@/page/components/PageEditDrawer"; | 
|---|
|  |  |  | import { Box, Typography, Card, Stack } from '@mui/material'; | 
|---|
|  |  |  | import PageDrawer from "@/page/components/PageDrawer"; | 
|---|
|  |  |  | import EmptyData from "@/page/components/EmptyData"; | 
|---|
|  |  |  | 
|---|
|  |  |  | import MyField from "@/page/components/MyField"; | 
|---|
|  |  |  | import { styled } from '@mui/material/styles'; | 
|---|
|  |  |  | import LocRevisePanel from "./LocRevisePanel"; | 
|---|
|  |  |  | import * as Common from '@/utils/common'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ | 
|---|
|  |  |  | '& .css-1vooibu-MuiSvgIcon-root': { | 
|---|
|  |  |  | 
|---|
|  |  |  | <SearchInput source="condition" alwaysOn />, | 
|---|
|  |  |  | <DateInput label='common.time.after' source="timeStart" alwaysOn />, | 
|---|
|  |  |  | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <TextInput source="code" label="table.field.locRevise.code" />, | 
|---|
|  |  |  | <SelectInput source="type" label="table.field.locRevise.type" | 
|---|
|  |  |  | choices={[ | 
|---|
|  |  |  | { id: 0, name: ' 库存调整' }, | 
|---|
|  |  |  | { id:  2, name: ' 盘点调整' }, | 
|---|
|  |  |  | { id: 2, name: ' 盘点调整' }, | 
|---|
|  |  |  | ]} | 
|---|
|  |  |  | />, | 
|---|
|  |  |  | <NumberInput source="anfme" label="table.field.locRevise.anfme" />, | 
|---|
|  |  |  | 
|---|
|  |  |  | <SelectInput source="exceStatus" label="table.field.locRevise.exceStatus" | 
|---|
|  |  |  | choices={[ | 
|---|
|  |  |  | { id: 0, name: '未执行' }, | 
|---|
|  |  |  | { id:  1, name: '执行中' }, | 
|---|
|  |  |  | { id:  2, name: '执行完成' }, | 
|---|
|  |  |  | { id: 1, name: '执行中' }, | 
|---|
|  |  |  | { id: 2, name: '执行完成' }, | 
|---|
|  |  |  | ]} | 
|---|
|  |  |  | />, | 
|---|
|  |  |  | <NumberInput source="orgAreaId" label="table.field.locRevise.orgAreaId" />, | 
|---|
|  |  |  | <TextInput source="orgAreaName" label="table.field.locRevise.orgAreaName" />, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <TextInput label="common.field.memo" source="memo" />, | 
|---|
|  |  |  | <SelectInput | 
|---|
|  |  |  | label="common.field.status" | 
|---|
|  |  |  | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const LocReviseList = () => { | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const [createDialog, setCreateDialog] = useState(false); | 
|---|
|  |  |  | const [drawerVal, setDrawerVal] = useState(false); | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <Box display="flex"> | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <StyledDatagrid | 
|---|
|  |  |  | preferenceKey='locRevise' | 
|---|
|  |  |  | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} | 
|---|
|  |  |  | bulkActionButtons={false} | 
|---|
|  |  |  | rowClick={(id, resource, record) => false} | 
|---|
|  |  |  | expand={() => <LocRevisePanel />} | 
|---|
|  |  |  | expand={false} | 
|---|
|  |  |  | expandSingle={true} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo']} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'orgAreaId', 'memo']} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <NumberField source="id" /> | 
|---|
|  |  |  | <TextField source="code" label="table.field.locRevise.code" /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <NumberField source="anfme" label="table.field.locRevise.anfme" /> | 
|---|
|  |  |  | <NumberField source="reviseQty" label="table.field.locRevise.reviseQty" /> | 
|---|
|  |  |  | <TextField source="exceStatus$" label="table.field.locRevise.exceStatus" sortable={false} /> | 
|---|
|  |  |  | <NumberField source="orgAreaId" label="table.field.locRevise.orgAreaId" /> | 
|---|
|  |  |  | <TextField source="orgAreaName" label="table.field.locRevise.orgAreaName" /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> | 
|---|
|  |  |  | <TextField source="nickname" /> | 
|---|
|  |  |  | </ReferenceField> | 
|---|
|  |  |  | <NumberField source="orgAreaId" label="table.field.locRevise.areaId" /> | 
|---|
|  |  |  | <TextField source="orgAreaName" label="table.field.locRevise.areaName" /> | 
|---|
|  |  |  | <TextField source="updateBy$" label="common.field.updateBy" /> | 
|---|
|  |  |  | <DateField source="updateTime" label="common.field.updateTime" showTime /> | 
|---|
|  |  |  | <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> | 
|---|
|  |  |  | <TextField source="nickname" /> | 
|---|
|  |  |  | </ReferenceField> | 
|---|
|  |  |  | <DateField 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} /> | 
|---|
|  |  |  | 
|---|
|  |  |  | </WrapperField> | 
|---|
|  |  |  | </StyledDatagrid> | 
|---|
|  |  |  | </List> | 
|---|
|  |  |  | <LocReviseCreate | 
|---|
|  |  |  | open={createDialog} | 
|---|
|  |  |  | setOpen={setCreateDialog} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <PageDrawer | 
|---|
|  |  |  | title='LocRevise Detail' | 
|---|
|  |  |  | drawerVal={drawerVal} | 
|---|
|  |  |  | setDrawerVal={setDrawerVal} | 
|---|
|  |  |  | <PageEditDrawer | 
|---|
|  |  |  | title={"toolbar.createLocRevise"} | 
|---|
|  |  |  | drawerVal={createDialog} | 
|---|
|  |  |  | setDrawerVal={setCreateDialog} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </PageDrawer> | 
|---|
|  |  |  | <LocReviseCreate | 
|---|
|  |  |  | open={createDialog} | 
|---|
|  |  |  | setOpen={setCreateDialog} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </PageEditDrawer> | 
|---|
|  |  |  | </Box> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|