1
zhang
2025-09-11 3fa7cdec6ce44f07a0dc7e1910511ead606990f3
zy-acs-flow/src/page/sta/StaEdit.jsx
@@ -23,7 +23,7 @@
import { useWatch, useFormContext } from "react-hook-form";
import { Stack, Grid, Box, Typography } from '@mui/material';
import * as Common from '@/utils/common';
import { EDIT_MODE } from '@/config/setting';
import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting';
import EditBaseAside from "../components/EditBaseAside";
import CustomerTopToolBar from "../components/EditTopToolBar";
import MemoInput from "../components/MemoInput";
@@ -63,69 +63,60 @@
                        <Typography variant="h6" gutterBottom>
                            {translate('common.edit.title.main')}
                        </Typography>
                        <Stack direction='row' gap={2}>
                        {/* <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.sta.uuid"
                                source="uuid"
                                parse={v => v}
                                autoFocus
                            />
                        </Stack>
                        </Stack> */}
                        <Stack direction='row' gap={2}>
                            <ReferenceInput
                                source="zoneId"
                                reference="zone"
                                perPage={REFERENCE_INPUT_PAGESIZE}
                            >
                                <AutocompleteInput
                                    label="table.field.sta.zoneId"
                                    optionText="name"
                                    filterToQuery={(val) => ({ name: val })}
                                    validate={required()}
                                />
                            </ReferenceInput>
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.sta.staNo"
                                source="staNo"
                                parse={v => v}
                                validate={required()}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
                        {/* <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.sta.name"
                                source="name"
                                parse={v => v}
                            />
                        </Stack>
                        </Stack> */}
                        <Stack direction='row' gap={2}>
                            <ReferenceInput
                                source="staType"
                                reference="staType"
                            >
                                <AutocompleteInput
                                    label="table.field.sta.staType"
                                    optionText="name"
                                    filterToQuery={(val) => ({ name: val })}
                                    validate={required()}
                                />
                            </ReferenceInput>
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <ReferenceInput
                                source="code"
                                reference="code"
                                perPage={REFERENCE_INPUT_PAGESIZE}
                            >
                                <AutocompleteInput
                                    label="table.field.sta.code"
                                    optionText="uuid"
                                    optionText="data"
                                    filterToQuery={(val) => ({ data: val })}
                                    validate={required()}
                                />
                            </ReferenceInput>
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <NumberInput
                                label="table.field.sta.offset"
                                source="offset"
                                validate={required()}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
@@ -134,8 +125,6 @@
                                source="autoing"
                                parse={v => v}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.sta.loading"
                                source="loading"
@@ -148,39 +137,39 @@
                                source="inEnable"
                                parse={v => v}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.sta.outEnable"
                                source="outEnable"
                                parse={v => v}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <TextInput
                                label="table.field.sta.zpallet"
                                source="zpallet"
                                parse={v => v}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <ReferenceInput
                                source="staSts"
                                reference="staSts"
                            >
                                <AutocompleteInput
                                    label="table.field.sta.staSts"
                                    optionText="name"
                                    filterToQuery={(val) => ({ name: val })}
                                />
                            </ReferenceInput>
                        </Stack>
                    </Grid>
                    <Grid item xs={12} md={4}>
                        <Typography variant="h6" gutterBottom>
                            {translate('common.edit.title.common')}
                        </Typography>
                        <ReferenceInput
                            source="staSts"
                            reference="staSts"
                            perPage={REFERENCE_INPUT_PAGESIZE}
                        >
                            <AutocompleteInput
                                label="table.field.sta.staSts"
                                optionText="name"
                                filterToQuery={(val) => ({ name: val })}
                            />
                        </ReferenceInput>
                        <ReferenceInput
                            source="staType"
                            reference="staType"
                            perPage={REFERENCE_INPUT_PAGESIZE}
                        >
                            <AutocompleteInput
                                label="table.field.sta.staType"
                                optionText="name"
                                filterToQuery={(val) => ({ name: val })}
                            />
                        </ReferenceInput>
                        <StatusSelectInput />
                        <Box mt="2em" />
                        <MemoInput />