| | |
| | | DateInput, |
| | | SelectInput, |
| | | ReferenceInput, |
| | | SelectArrayInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | SaveButton, |
| | |
| | | required, |
| | | useRecordContext, |
| | | DeleteButton, |
| | | useNotify, |
| | | } 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 request from '@/utils/request'; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | |
| | | |
| | | const LocEdit = () => { |
| | | const translate = useTranslate(); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || []; |
| | | |
| | | |
| | | return ( |
| | | <Edit |
| | |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="warehouseId$" |
| | | source="warehouseId" |
| | | reference="warehouse" |
| | | > |
| | | <AutocompleteInput |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.loc.type" |
| | | {/* <AutocompleteInput |
| | | choices={dicts} |
| | | source="type" |
| | | optionText="label" |
| | | label="table.field.loc.type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.loc.name" |
| | | source="name" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.flagLogic" |
| | | source="flagLogic" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.loc.fucAtrrs" |
| | | source="fucAtrrs" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.loc.barcode" |
| | | source="barcode" |
| | | parse={v => v} |
| | | /> |
| | | validate={[required()]} |
| | | /> */} |
| | | <ReferenceArrayInput source="typeIds" reference="locType" > |
| | | <SelectArrayInput label="table.field.loc.type" /> |
| | | </ReferenceArrayInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.loc.size" |
| | | source="size" |
| | | parse={v => v} |
| | | <NumberInput |
| | | label="table.field.loc.length" |
| | | source="length" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.width" |
| | | source="width" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.height" |
| | | source="height" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.row" |
| | | source="lrow" |
| | | source="row" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.channel" |
| | | source="channel" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.maxParts" |
| | | source="maxParts" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.maxPack" |
| | | source="maxPack" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.loc.flagLabelMange" |
| | | source="flagLabelMange" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.loc.locAttrs" |
| | | source="locAttrs" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | </Grid> |
| | | |
| | | |
| | | </Grid> |
| | | </Grid> |
| | | <Grid item xs={12} md={2}> |
| | | <Typography variant="h6" gutterBottom> |