|  |  |  | 
|---|
|  |  |  | '& .opt': { | 
|---|
|  |  |  | width: 200 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | '& .MuiTableCell-root': { | 
|---|
|  |  |  | whiteSpace: 'nowrap', | 
|---|
|  |  |  | overflow: 'visible', | 
|---|
|  |  |  | textOverflow: 'unset' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | })); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const filters = [ | 
|---|
|  |  |  | <SearchInput source="condition" alwaysOn />, | 
|---|
|  |  |  | <TextField source="warehouseId" label="table.field.warehouseAreas.wareId" alwaysOn />, | 
|---|
|  |  |  | <ReferenceInput | 
|---|
|  |  |  | source="warehouseId" | 
|---|
|  |  |  | label="table.field.loc.warehouseId" | 
|---|
|  |  |  | reference="warehouse" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | label="table.field.loc.warehouseId" | 
|---|
|  |  |  | optionText="name" | 
|---|
|  |  |  | filterToQuery={(val) => ({ name: val })} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </ReferenceInput>, | 
|---|
|  |  |  | <TextInput source="uuid" label="table.field.warehouseAreas.uuid" />, | 
|---|
|  |  |  | <TextInput source="name" label="table.field.warehouseAreas.name" />, | 
|---|
|  |  |  | <TextInput source="code" label="table.field.warehouseAreas.code" />, | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const WarehouseAreasList = () => { | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const [createDialog, setCreateDialog] = useState(false); | 
|---|
|  |  |  | const [drawerVal, setDrawerVal] = useState(false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | title={"menu.warehouseAreas"} | 
|---|
|  |  |  | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} | 
|---|
|  |  |  | filters={filters} | 
|---|
|  |  |  | sort={{ field: "create_time", order: "desc" }} | 
|---|
|  |  |  | sort={{ field: "warehouseId", order: "desc" }} | 
|---|
|  |  |  | actions={( | 
|---|
|  |  |  | <TopToolbar> | 
|---|
|  |  |  | <FilterButton /> | 
|---|
|  |  |  | 
|---|
|  |  |  | </TopToolbar> | 
|---|
|  |  |  | )} | 
|---|
|  |  |  | perPage={DEFAULT_PAGE_SIZE} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <StyledDatagrid | 
|---|
|  |  |  | > | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <StyledDatagrid | 
|---|
|  |  |  | preferenceKey='warehouseAreas' | 
|---|
|  |  |  | bulkActionButtons={ | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | <BatchButton /> | 
|---|
|  |  |  | {/* <WareButton /> | 
|---|
|  |  |  | <MixButton /> | 
|---|
|  |  |  | <StatusButton /> */} | 
|---|
|  |  |  | <BulkDeleteButton mutationMode={OPERATE_MODE} /> | 
|---|
|  |  |  | </> | 
|---|
|  |  |  | } | 
|---|
|  |  |  | rowClick={(id, resource, record) => false} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo']} | 
|---|
|  |  |  | omit={['id', 'createTime', 'createBy', 'memo','statusBool','flagMix$','flagLabelMange$','shipperId$','supplierId']} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <NumberField source="id" /> | 
|---|
|  |  |  | {/* <TextField source="uuid" label="table.field.warehouseAreas.uuid" /> */} | 
|---|
|  |  |  | <TextField source="name" label="table.field.warehouseAreas.name" /> | 
|---|
|  |  |  | <TextField source="code" label="table.field.warehouseAreas.code" /> | 
|---|
|  |  |  | <TextField source="name" label="table.field.warehouseAreas.name" /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <TextField source="type$" label="table.field.warehouseAreas.type"/> | 
|---|
|  |  |  | {/* <ReferenceField source="shipperId" label="table.field.warehouseAreas.shipperId" reference="shipper" link={false} sortable={false}> | 
|---|
|  |  |  | <TextField source="name" /> | 
|---|
|  |  |  | </ReferenceField> */} | 
|---|
|  |  |  | 
|---|
|  |  |  | <TextField source="flagMinus$" label="table.field.warehouseAreas.flagMinus" sortable={false} /> | 
|---|
|  |  |  | <TextField source="flagLabelMange$" label="table.field.warehouseAreas.flagLabelMange" sortable={false} /> | 
|---|
|  |  |  | <TextField source="flagMix$" label="table.field.warehouseAreas.flagMix" sortable={false} /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> | 
|---|
|  |  |  | <TextField source="nickname" /> | 
|---|
|  |  |  | </ReferenceField> | 
|---|
|  |  |  | 
|---|
|  |  |  | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> | 
|---|
|  |  |  | </WrapperField> | 
|---|
|  |  |  | </StyledDatagrid> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </List> | 
|---|
|  |  |  | <WarehouseAreasCreate | 
|---|
|  |  |  | open={createDialog} | 
|---|
|  |  |  | 
|---|
|  |  |  | export default WarehouseAreasList; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const BatchButton = () => { | 
|---|
|  |  |  | const MixButton = () => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  | const refresh = useRefresh(); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | <Button onClick={() => setCreateDialog(true)} label={"toolbar.batch"}> | 
|---|
|  |  |  | <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchMix"}> | 
|---|
|  |  |  | <EditIcon /> | 
|---|
|  |  |  | </Button> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <BatchModal | 
|---|
|  |  |  | open={createDialog} | 
|---|
|  |  |  | setOpen={setCreateDialog} | 
|---|
|  |  |  | fieldType={'flagMix'} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const WareButton = () => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  | const refresh = useRefresh(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const [createDialog, setCreateDialog] = useState(false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchWarehouse"}> | 
|---|
|  |  |  | <EditIcon /> | 
|---|
|  |  |  | </Button> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <BatchModal | 
|---|
|  |  |  | open={createDialog} | 
|---|
|  |  |  | setOpen={setCreateDialog} | 
|---|
|  |  |  | fieldType={'wareId'} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const StatusButton = () => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  | const refresh = useRefresh(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const [createDialog, setCreateDialog] = useState(false); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchStatus"}> | 
|---|
|  |  |  | <EditIcon /> | 
|---|
|  |  |  | </Button> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <BatchModal | 
|---|
|  |  |  | open={createDialog} | 
|---|
|  |  |  | setOpen={setCreateDialog} | 
|---|
|  |  |  | fieldType={'status'} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </> | 
|---|
|  |  |  |  | 
|---|