| | |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | // import AsnOrderItemLogList from "./AsnOrderItemLogList" |
| | | import AsnOrderItemLogList from "./AsnOrderItemLogList" |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | | |
| | |
| | | {translate('common.edit.title.common')} |
| | | </Typography> |
| | | </Grid> |
| | | {/* <AsnOrderItemLogList /> */} |
| | | <AsnOrderItemLogList /> |
| | | </> |
| | | ) |
| | | } |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate, useLocation } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | } from 'react-admin'; |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | |
| | | <NumberInput source="purchaseId" label="table.field.purchaseItem.purchaseId" />, |
| | | <TextInput source="platItemId" label="table.field.purchaseItem.platItemId" />, |
| | | <TextInput source="matnrCode" label="table.field.purchaseItem.matnrCode" />, |
| | |
| | | <TextInput source="splrName" label="table.field.purchaseItem.splrName" />, |
| | | <TextInput source="splrCode" label="table.field.purchaseItem.splrCode" />, |
| | | <TextInput source="splrBatch" label="table.field.purchaseItem.splrBatch" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | useRedirect, |
| | | useEditContext, |
| | | EditBase, |
| | | useGetOne, |
| | | } from 'react-admin'; |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'; |
| | |
| | | setOpen(false); |
| | | } |
| | | }; |
| | | const {data, isPending, } = useGetOne('dictData', {id: record?.id}); |
| | | if (data == null || data == undefined) {return} |
| | | return ( |
| | | <> |
| | | <Edit |
| | |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.dictData"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | empty={false} |
| | | filters={filters} |
| | | filter={{ dictTypeId: dictId }} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | |
| | | > |
| | | <StyledDatagrid |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource ,record)=> { |
| | | rowClick={(id, resource, record) => { |
| | | setSelect(record) |
| | | setEditDialog(true) |
| | | }} |
| | |
| | | <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"> |
| | | {/* <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} type="button" redirect={"/dictType/" + dictId} onClick={()=> { |
| | | setEditDialog(true) |
| | | }} /> */} |
| | | <Button onClick={()=>{setEditDialog(true)}}>编辑</Button> |
| | | <Button onClick={() => { setEditDialog(true) }}>编辑</Button> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode='pessimistic' redirect={"/dictType/" + dictId} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <DictDataEdit |
| | | open={editDialog} |
| | | record={select} |
| | | setOpen={setEditDialog} |
| | | /> |
| | | if (!select == null) { |
| | | <DictDataEdit |
| | | open={editDialog} |
| | | record={select} |
| | | setOpen={setEditDialog} |
| | | /> |
| | | } |
| | | <DictDataCreate |
| | | open={createDialog} |
| | | record={dicts} |
| | |
| | | const { getValues } = useFormContext(); |
| | | |
| | | return ( |
| | | <Toolbar sx={{ justifyContent: 'space-between' }}> |
| | | <Toolbar sx={{ justifyContent: 'end' }}> |
| | | <SaveButton /> |
| | | <DeleteButton mutationMode="optimistic" /> |
| | | </Toolbar> |
| | |
| | | setOpen(false); |
| | | } |
| | | }; |
| | | const {data, isPending, } = useGetOne('serialRuleItem', {id: record?.id}); |
| | | if (data == null || data == undefined) {return} |
| | | |
| | | return ( |
| | | <Edit |
| | | id={record.id} |
| | |
| | | FieldsItem item = new FieldsItem(); |
| | | item.setUuid(index) |
| | | .setFieldsId(field.getId()) |
| | | .setMatnrId(Long.parseLong(params.get("matnrId").toString())) |
| | | .setMatnrId(!Objects.isNull(params.get("matnrId")) ? Long.parseLong(params.get("matnrId").toString()) : null) |
| | | .setValue(params.get(field.getFields()).toString()); |
| | | if (!fieldsItemService.save(item)) { |
| | | throw new CoolException("扩展字段修改失败!!"); |