更新客户管理的修改功能参数
This commit is contained in:
@@ -148,14 +148,14 @@ export function AddUserDialog({
|
||||
const onSubmit = handleSubmit(async data => {
|
||||
const payload = {
|
||||
username: data.username,
|
||||
password: data.password,
|
||||
password: data?.password,
|
||||
phone: data.phone,
|
||||
email: data?.email || "",
|
||||
name: data?.name,
|
||||
admin_id: data.admin_id ? Number(data.admin_id) : undefined,
|
||||
discount_id: data.discount_id ? Number(data.discount_id) : undefined,
|
||||
avatar: data?.avatar,
|
||||
status: data.status ? parseInt(data.status) : 1,
|
||||
status: data.status ? parseInt(data?.status) : 1,
|
||||
contact_qq: data?.contact_qq,
|
||||
contact_wechat: data?.contact_wechat,
|
||||
}
|
||||
@@ -233,7 +233,6 @@ export function AddUserDialog({
|
||||
{...field}
|
||||
type="password"
|
||||
placeholder="请输入密码(至少6位)"
|
||||
autoComplete="off"
|
||||
/>
|
||||
<FieldError>{fieldState.error?.message}</FieldError>
|
||||
</Field>
|
||||
@@ -249,7 +248,6 @@ export function AddUserDialog({
|
||||
{...field}
|
||||
type="password"
|
||||
placeholder="请再次输入密码"
|
||||
autoComplete="off"
|
||||
/>
|
||||
<FieldError>{fieldState.error?.message}</FieldError>
|
||||
</Field>
|
||||
|
||||
Reference in New Issue
Block a user