skyouc
2025-04-07 1b5a58ec0da1ae8eb40a66e41dcd23bb7c2b2e94
rsf-admin/src/page/basicInfo/matnr/MatnrEdit.jsx
@@ -22,7 +22,7 @@
    useNotify,
} from 'react-admin';
import PropTypes from 'prop-types';
import { useWatch, useFormContext } from "react-hook-form";
import { useWatch, useFormContext, useForm, useFormState } from "react-hook-form";
import { Stack, Grid, Box, Typography, Tabs, Tab, } from '@mui/material';
import * as Common from '@/utils/common';
import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting';
@@ -33,7 +33,7 @@
import TreeSelectInput from "@/page/components/TreeSelectInput";
import request from '@/utils/request';
const FormToolbar = () => {
    const { getValues } = useFormContext();
    const { getValues } = useFormState();
    return (
        <Toolbar sx={{ justifyContent: 'space-between' }}>
            <SaveButton />
@@ -74,6 +74,7 @@
const MatnrEdit = () => {
    const translate = useTranslate();
    const [value, setValue] = React.useState(0);
    const form = useForm();
    const notify = useNotify();
    const [dynamicFields, setDynamicFields] = useState([]);
@@ -88,6 +89,7 @@
        if (code === 200) {
            setDynamicFields(data || [])
        } else {
            notify(msg);
        }