| | |
| | | title: 'Update' |
| | | }, |
| | | menu: { |
| | | basStationArea: 'BasStationArea', |
| | | dashboard: 'Dashboard', |
| | | settings: 'Settings', |
| | | basicInfo: 'BasicInfo', |
| | |
| | | }, |
| | | table: { |
| | | field: { |
| | | basStationArea: { |
| | | type: "type", |
| | | stationAreaName: "stationAreaName", |
| | | inAble: "inAble", |
| | | outAble: "outAble", |
| | | useStatus: "useStatus", |
| | | area: "area", |
| | | isCrossZone: "isCrossZone", |
| | | crossZoneArea: "crossZoneArea", |
| | | isWcs: "isWcs", |
| | | wcsData: "wcsData", |
| | | containerType: "containerType", |
| | | barcode: "barcode", |
| | | autoTransfer: "autoTransfer", |
| | | stationAreaId: "stationAreaId", |
| | | stationAlias: "stationAlias", |
| | | }, |
| | | taskPathTemplateMerge: { |
| | | templateCode: "templateCode", |
| | | templateName: "templateName", |
| | |
| | | title: '修改' |
| | | }, |
| | | menu: { |
| | | basStationArea: '站点区域', |
| | | dashboard: '控制台', |
| | | settings: '个人设置', |
| | | basicInfo: '基础信息', |
| | |
| | | }, |
| | | table: { |
| | | field: { |
| | | basStationArea: { |
| | | type: "类型", |
| | | stationAreaName: "站点区域名称", |
| | | inAble: "入库", |
| | | outAble: "出库", |
| | | useStatus: "使用状态", |
| | | area: "区域", |
| | | isCrossZone: "是否跨区", |
| | | crossZoneArea: "跨区区域", |
| | | isWcs: "是否WCS", |
| | | wcsData: "WCS数据", |
| | | containerType: "容器类型", |
| | | barcode: "条码", |
| | | autoTransfer: "自动移位", |
| | | stationAreaId: "区域编码", |
| | | stationAlias: "区域包含站点", |
| | | }, |
| | | taskPathTemplateMerge: { |
| | | templateCode: "模板编码", |
| | | templateName: "模板名称", |
| | |
| | | import menuPda from './menuPda'; |
| | | import taskPathTemplate from './taskPathTemplate'; |
| | | import taskPathTemplateMerge from './taskPathTemplateMerge'; |
| | | import basStationArea from './basStationArea'; |
| | | |
| | | const ResourceContent = (node) => { |
| | | switch (node.component) { |
| | |
| | | return taskPathTemplate; |
| | | case 'taskPathTemplateMerge': |
| | | return taskPathTemplateMerge; |
| | | case 'basStationArea': |
| | | return basStationArea; |
| | | // case "locItem": |
| | | // return locItem; |
| | | default: |
| | |
| | | useNotify, |
| | | Form, |
| | | useCreateController, |
| | | SelectArrayInput, |
| | | } from 'react-admin'; |
| | | import { |
| | | Dialog, |
| | |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import DictionarySelect from "../components/DictionarySelect"; |
| | | import DictionaryArraySelect from "../components/DictionaryArraySelect"; |
| | | |
| | | const BasStationAreaCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | |
| | | </DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.type" |
| | | source="type" |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.stationAreaName" |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.inAble" |
| | | source="inAble" |
| | | <ReferenceInput source="area" reference="warehouseAreas" sort={{ field: 'sort', order: 'ASC' }}> |
| | | <SelectInput |
| | | label="table.field.basStation.area" |
| | | optionText="name" |
| | | optionValue="id" |
| | | fullWidth |
| | | validate={[required()]} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.outAble" |
| | | source="outAble" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.useStatus" |
| | | source="useStatus" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.area" |
| | | source="area" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.isCrossZone" |
| | | source="isCrossZone" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.crossZoneArea" |
| | | source="crossZoneArea" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.isWcs" |
| | | source="isWcs" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.wcsData" |
| | | source="wcsData" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.containerType" |
| | | source="containerType" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.basStationArea.barcode" |
| | | source="barcode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.autoTransfer" |
| | | source="autoTransfer" |
| | | <DictionaryArraySelect |
| | | label={translate("table.field.basStation.containerType")} |
| | | name="containerTypes" |
| | | size="small" |
| | | validate={[required()]} |
| | | dictTypeCode="sys_container_type" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | |
| | | <ReferenceArrayInput source="stationAlias" reference="basStation"> |
| | | <SelectArrayInput |
| | | label="table.field.basStationArea.stationAlias" |
| | | source="stationAlias" |
| | | parse={v => v} |
| | | optionText="stationName" |
| | | optionValue="id" |
| | | fullWidth |
| | | // validate={(value) => { |
| | | // if (value && value.length > 1) { |
| | | // return '只能选择一个模板'; |
| | | // } |
| | | // return undefined; |
| | | // }} |
| | | /> |
| | | </ReferenceArrayInput> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | NumberField, |
| | | required, |
| | | useRecordContext, |
| | | DeleteButton, |
| | | DeleteButton, SelectArrayInput, |
| | | } from 'react-admin'; |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography } from '@mui/material'; |
| | |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import DictionarySelect from "../components/DictionarySelect"; |
| | | import DictionaryArraySelect from "../components/DictionaryArraySelect"; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.type" |
| | | source="type" |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.basStationArea.stationAreaName" |
| | | source="stationAreaName" |
| | |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.inAble" |
| | | source="inAble" |
| | | <ReferenceInput source="area" reference="warehouseAreas" sort={{ field: 'sort', order: 'ASC' }}> |
| | | <SelectInput |
| | | label="table.field.basStation.area" |
| | | optionText="name" |
| | | optionValue="id" |
| | | fullWidth |
| | | validate={[required()]} |
| | | /> |
| | | </ReferenceInput> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.outAble" |
| | | source="outAble" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.basStationArea.useStatus" |
| | | source="useStatus" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.area" |
| | | source="area" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.isCrossZone" |
| | | source="isCrossZone" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.basStationArea.crossZoneArea" |
| | | source="crossZoneArea" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.isWcs" |
| | | source="isWcs" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.basStationArea.wcsData" |
| | | source="wcsData" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.basStationArea.containerType" |
| | | source="containerType" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.basStationArea.barcode" |
| | | source="barcode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.basStationArea.autoTransfer" |
| | | source="autoTransfer" |
| | | <DictionaryArraySelect |
| | | label={translate("table.field.basStation.containerType")} |
| | | name="containerTypes" |
| | | size="small" |
| | | validate={[required()]} |
| | | dictTypeCode="sys_container_type" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | <ReferenceArrayInput source="stationAlias" reference="basStation"> |
| | | <SelectArrayInput |
| | | label="table.field.basStationArea.stationAlias" |
| | | source="stationAlias" |
| | | parse={v => v} |
| | | optionText="stationName" |
| | | optionValue="id" |
| | | fullWidth |
| | | validate={[required()]} |
| | | // validate={(value) => { |
| | | // if (value && value.length > 1) { |
| | | // return '只能选择一个模板'; |
| | | // } |
| | | // return undefined; |
| | | // }} |
| | | /> |
| | | </ReferenceArrayInput> |
| | | </Stack> |
| | | |
| | | </Grid> |
| | | <Grid item xs={12} md={4}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.common')} |
| | | </Typography> |
| | | <StatusSelectInput /> |
| | | <Box mt="2em" /> |
| | | <MemoInput /> |
| | | </Grid> |
| | | </Grid> |
| | | </SimpleForm> |
| | |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | SelectColumnsButton, |
| | | ColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import BasStationAreaCreate from "./BasStationAreaCreate"; |
| | | import BasStationAreaPanel from "./BasStationAreaPanel"; |
| | | import EmptyData from "../components/EmptyData"; |
| | |
| | | import MyExportButton from '../components/MyExportButton'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import MyField from "../components/MyField"; |
| | | import StickyDataTable from "@/page/components/StickyDataTable"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | })); |
| | | import useTableLayout from '@/utils/useTableLayout'; |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const { boxMaxWidth, boxMaxHeight } = useTableLayout(drawerVal); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <Box display="flex" sx={{ |
| | | '& .opt': { |
| | | width: 200 |
| | | } |
| | | }}> |
| | | <List |
| | | sx={{ |
| | | flexGrow: 1, |
| | |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='basStationArea' /> |
| | | <ColumnsButton storeKey='basStationArea' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='basStationArea' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | <Box |
| | | sx={{ |
| | | position: 'relative', |
| | | maxHeight: boxMaxHeight, |
| | | maxWidth: boxMaxWidth, |
| | | overflowX: 'auto', |
| | | overflowY: 'auto', |
| | | '& .MuiTableCell-root': { |
| | | whiteSpace: 'nowrap', |
| | | } |
| | | }} |
| | | > |
| | | <StickyDataTable |
| | | storeKey='basStationArea' |
| | | bulkActionButtons={<BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <BasStationAreaPanel />} |
| | | stickyRight={['opt']} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | hiddenColumns={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <NumberField source="type" label="table.field.basStationArea.type" /> |
| | | <TextField source="stationAreaName" label="table.field.basStationArea.stationAreaName" /> |
| | | <NumberField source="inAble" label="table.field.basStationArea.inAble" /> |
| | | <NumberField source="outAble" label="table.field.basStationArea.outAble" /> |
| | | <TextField source="useStatus" label="table.field.basStationArea.useStatus" /> |
| | | <NumberField source="area" label="table.field.basStationArea.area" /> |
| | | <NumberField source="isCrossZone" label="table.field.basStationArea.isCrossZone" /> |
| | | <TextField source="crossZoneArea" label="table.field.basStationArea.crossZoneArea" /> |
| | | <NumberField source="isWcs" label="table.field.basStationArea.isWcs" /> |
| | | <TextField source="wcsData" label="table.field.basStationArea.wcsData" /> |
| | | <TextField source="containerType" label="table.field.basStationArea.containerType" /> |
| | | <TextField source="barcode" label="table.field.basStationArea.barcode" /> |
| | | <NumberField source="autoTransfer" label="table.field.basStationArea.autoTransfer" /> |
| | | <TextField source="stationAreaId" label="table.field.basStationArea.stationAreaId" /> |
| | | <TextField source="stationAlias" label="table.field.basStationArea.stationAlias" /> |
| | | |
| | |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <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 cellClassName="opt" label="common.field.opt"> |
| | | |
| | | <WrapperField source="opt" cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </StickyDataTable> |
| | | </Box> |
| | | |
| | | </List> |
| | | <BasStationAreaCreate |
| | | open={createDialog} |
| | |
| | | '& .RaBulkActionsToolbar-toolbar:not(.RaBulkActionsToolbar-collapsed)': { |
| | | transform: `translateY(${bulkActionsOffsetY}px)`, |
| | | zIndex: 10, |
| | | opacity: 1, |
| | | }, |
| | | '& .RaBulkActionsToolbar-toolbar.RaBulkActionsToolbar-collapsed': { |
| | | zIndex: 10, |
| | | opacity: 1, |
| | | }, |
| | | }; |
| | | }, [bulkActionsOffsetY]); |
| | |
| | | import { Select, MenuItem, FormControl, InputLabel } from '@mui/material'; |
| | | |
| | | const WarehouseSelect = (props) => { |
| | | const { dictTypeCode, label, name, validate, ...params } = props; |
| | | const { dictTypeCode, label, name, validate, onChange, ...params } = props; |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const [list, setList] = useState([]); |
| | |
| | | const handleChange = (event) => { |
| | | const selectedValue = event.target.value; |
| | | field.onChange(selectedValue); |
| | | if (onChange) { |
| | | onChange(event); |
| | | } |
| | | }; |
| | | |
| | | const validValue = list.some(item => item.id === field.value) ? field.value : ''; |
| | |
| | | const [columns, setColumns] = useState([ |
| | | { field: 'maktx', headerName: translate('table.field.matnr.name'), width: 300 }, |
| | | { field: 'matnrCode', headerName: translate('table.field.matnr.code'), width: 200 }, |
| | | { field: 'locCode', headerName: translate('table.field.locItem.locCode'), width: 100 }, |
| | | // { field: 'locCode', headerName: translate('table.field.locItem.locCode'), width: 100 }, |
| | | { field: 'spec', headerName: translate('table.field.matnr.spec'), width: 100 }, |
| | | { field: 'batch', headerName: translate('table.field.locItem.batch'), width: 100 }, |
| | | { field: 'model', headerName: translate('table.field.matnr.model'), width: 100 }, |
| | |
| | | } |
| | | |
| | | const newAddClick = () => { |
| | | if (formData.orgAreaId == null || formData.orgAreaId == undefined) { |
| | | if (!formData.orgAreaId) { |
| | | notify("原库区不能为空!!", { type: 'error' }) |
| | | return |
| | | } |
| | | if (formData.tarAreaId == null || formData.tarAreaId == undefined) { |
| | | if (!formData.tarAreaId) { |
| | | notify("目标库区不能为空!!", { type: 'error' }) |
| | | return |
| | | } |
| | |
| | | </Grid> |
| | | <Grid item md={2}> |
| | | <WarehouseSelect |
| | | name="orgAreaId" |
| | | value={formData.orgAreaId} |
| | | variant="filled" |
| | | dictTypeCode="warehouse" |
| | |
| | | </Grid> |
| | | <Grid item md={2}> |
| | | <WarehouseSelect |
| | | name="tarAreaId" |
| | | label={translate("table.field.transfer.tarAreaName")} |
| | | value={formData.tarAreaId} |
| | | dictTypeCode="warehouse" |
| | |
| | | }} |
| | | pageSizeOptions={[10, 20, 50, 100]} |
| | | editMode="row" |
| | | processRowUpdate={processRowUpdate} |
| | | checkboxSelection |
| | | rowSelectionModel={tableIds} |
| | | onRowSelectionModelChange={handleSelectionChange} |
| | |
| | | if (!locs.isEmpty()) { |
| | | Page<LocItem> page = new Page<>(params.getCurrent(), params.getPageSize()); |
| | | QueryWrapper<LocItem> wrapper = new QueryWrapper<>(); |
| | | wrapper.select("id, matnr_id, maktx, matnr_code, SUM(anfme) anfme, SUM(work_qty) work_qty, SUM(qty) qty, batch, unit, fields_index, model, spec, loc_id, loc_code ") |
| | | wrapper.select("id, matnr_id, maktx, matnr_code, SUM(anfme) anfme, SUM(work_qty) work_qty, SUM(qty) qty, batch, unit, fields_index, model, spec") |
| | | .lambda() |
| | | .eq(StringUtils.isNotBlank(params.getMatnrCode()), LocItem::getMatnrCode, params.getMatnrCode()) |
| | | .like(StringUtils.isNotBlank(params.getMaktx()), LocItem::getMaktx, params.getMaktx()); |