|  |  |  | 
|---|
|  |  |  | import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting'; | 
|---|
|  |  |  | import EditBaseAside from "../../components/EditBaseAside"; | 
|---|
|  |  |  | import CustomerTopToolBar from "../../components/EditTopToolBar"; | 
|---|
|  |  |  | import AsnOrderItemList from "./AsnOrderItemList"; | 
|---|
|  |  |  | import OutOrderItemList from "./OutOrderItemList"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const FormToolbar = () => { | 
|---|
|  |  |  | const { getValues } = useFormContext(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <Toolbar sx={{ justifyContent: 'end' }}> | 
|---|
|  |  |  | <></> | 
|---|
|  |  |  | {/* <SaveButton /> | 
|---|
|  |  |  | <DeleteButton mutationMode="optimistic" /> */} | 
|---|
|  |  |  | </Toolbar> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const OutOrderEdit = () => { | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  | 
|---|
|  |  |  | <SimpleForm | 
|---|
|  |  |  | shouldUnregister | 
|---|
|  |  |  | warnWhenUnsavedChanges | 
|---|
|  |  |  | toolbar={<FormToolbar />} | 
|---|
|  |  |  | toolbar={false} | 
|---|
|  |  |  | mode="onTouched" | 
|---|
|  |  |  | defaultValues={{}} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | 
|---|
|  |  |  | </Typography> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.asnOrder.code" | 
|---|
|  |  |  | label="table.field.outStock.code" | 
|---|
|  |  |  | source="code" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.asnOrder.poCode" | 
|---|
|  |  |  | label="table.field.outStock.poCode" | 
|---|
|  |  |  | source="poCode" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | choices={dicts} | 
|---|
|  |  |  | optionText="label" | 
|---|
|  |  |  | label="table.field.asnOrder.type" | 
|---|
|  |  |  | label="table.field.outStock.type" | 
|---|
|  |  |  | source="type" | 
|---|
|  |  |  | optionValue="value" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | choices={business} | 
|---|
|  |  |  | optionText="label" | 
|---|
|  |  |  | label="table.field.asnOrder.wkType" | 
|---|
|  |  |  | label="table.field.outStock.wkType" | 
|---|
|  |  |  | source="wkType" | 
|---|
|  |  |  | optionValue="value" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.asnOrder.logisNo" | 
|---|
|  |  |  | label="table.field.outStock.logisNo" | 
|---|
|  |  |  | source="logisNo" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.asnOrder.anfme" | 
|---|
|  |  |  | label="table.field.outStock.anfme" | 
|---|
|  |  |  | source="anfme" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.asnOrder.qty" | 
|---|
|  |  |  | label="table.field.outStock.qty" | 
|---|
|  |  |  | source="qty" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <DateInput | 
|---|
|  |  |  | label="table.field.asnOrder.arrTime" | 
|---|
|  |  |  | label="table.field.outStock.arrTime" | 
|---|
|  |  |  | source="arrTime" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <SelectInput | 
|---|
|  |  |  | label="table.field.asnOrder.rleStatus" | 
|---|
|  |  |  | label="table.field.outStock.rleStatus" | 
|---|
|  |  |  | source="rleStatus" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | choices={[ | 
|---|
|  |  |  | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | </SimpleForm> | 
|---|
|  |  |  | </Edit > | 
|---|
|  |  |  | <AsnOrderItemList /> | 
|---|
|  |  |  | <OutOrderItemList /> | 
|---|
|  |  |  | </> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|