From 1b602ba053af06651d5c8f50146866d98f82934c Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期二, 18 三月 2025 11:12:29 +0800 Subject: [PATCH] #修改 1.库位size字段,修改为长,宽, 高(完成 2.货架批量处理(完成 3.库位初始化功能(完成 4.筛选导出(完成 5.库位可绑定多种类型(中,高,低),可使用类型批量修改库位信息(完成 6.库位信息添加一个使用状态 (出库预约,入库预约,在库,空库,禁用, 空板)(完成 7.物料模板导出添加扩展字段 --- rsf-admin/src/page/settings/BaseSettings.jsx | 46 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 37 insertions(+), 9 deletions(-) diff --git a/rsf-admin/src/page/settings/BaseSettings.jsx b/rsf-admin/src/page/settings/BaseSettings.jsx index bb680be..3a7ff59 100644 --- a/rsf-admin/src/page/settings/BaseSettings.jsx +++ b/rsf-admin/src/page/settings/BaseSettings.jsx @@ -17,6 +17,7 @@ MenuItem, FormHelperText, CircularProgress, + LinearProgress, } from '@mui/material'; import { updateUserInfo } from '@/api/auth'; import avatar from '/avatar.jpg' @@ -26,7 +27,21 @@ const notify = useNotify(); const { children, userInfo } = props; - const { control, handleSubmit, watch, setValue, getValues, formState: { isDirty } } = useForm(); + const { + control, + handleSubmit, + watch, + setValue, + getValues, + reset, + formState: { + errors, + isDirty, + }, + setError, + clearErrors, + } = useForm(); + const [loading, setLoading] = useState(false); useEffect(() => { @@ -56,6 +71,10 @@ username: data.username } localStorage.setItem("user", JSON.stringify(userToPersist)); + } else if (code === 10005 || code === 10006) { + setError('email', { + message: msg + }) } else { notify(msg, { type: 'error', messageArgs: { _: msg } }); } @@ -67,14 +86,23 @@ } return ( - <Box - sx={{ - p: 3, - flex: 1, - overflow: 'auto', - }} - > - {/* https://github.com/themeselection/materio-mui-nextjs-admin-template-free/blob/main/javascript-version/src/views/account-settings/account/AccountDetails.jsx */} + <Box sx={{ + position: 'relative', + p: 3, + flex: 1, + overflow: 'auto', + }}> + {!userInfo && ( + <LinearProgress + sx={{ + height: "2px", + position: 'absolute', + top: 0, + left: 0, + right: 0, + }} + /> + )} <form onSubmit={handleSubmit(onSubmit)} noValidate> <Stack direction='column' -- Gitblit v1.9.1