Commit 394dc6782f76cfc426f6b0097943d52468b39bfd
1 parent
368dfefb
fix: 新增普通租户和客户账号时,手机号像超管新增租户管理员一样,到11位就停止输入,图二为新增普通租户和账号时,组织展开忘记选择组织,提示放到上面来,方便用户知晓原因
Showing
3 changed files
with
6 additions
and
1 deletions
@@ -181,6 +181,7 @@ export const accountFormSchema: FormSchema[] = [ | @@ -181,6 +181,7 @@ export const accountFormSchema: FormSchema[] = [ | ||
181 | componentProps({ formActionType }) { | 181 | componentProps({ formActionType }) { |
182 | const { clearValidate } = formActionType; | 182 | const { clearValidate } = formActionType; |
183 | return { | 183 | return { |
184 | + maxlength: 11, | ||
184 | onChange(value) { | 185 | onChange(value) { |
185 | if (value == olderPhoneNumber) { | 186 | if (value == olderPhoneNumber) { |
186 | clearValidate('phoneNumber'); | 187 | clearValidate('phoneNumber'); |
@@ -260,8 +260,11 @@ | @@ -260,8 +260,11 @@ | ||
260 | async function handleSubmit() { | 260 | async function handleSubmit() { |
261 | setModalProps({ confirmLoading: true }); | 261 | setModalProps({ confirmLoading: true }); |
262 | try { | 262 | try { |
263 | - await validate(); | ||
264 | const values = getFieldsValue(); | 263 | const values = getFieldsValue(); |
264 | + if (!('organizationIds' in values)) { | ||
265 | + createMessage.error('组织必选'); | ||
266 | + } | ||
267 | + await validate(); | ||
265 | await addTenantList({ ...values, level: 4, tenantId: userInfo.getUserInfo.tenantId! }); | 268 | await addTenantList({ ...values, level: 4, tenantId: userInfo.getUserInfo.tenantId! }); |
266 | createMessage.success(unref(isAdd) ? '新增成功' : '编辑成功'); | 269 | createMessage.success(unref(isAdd) ? '新增成功' : '编辑成功'); |
267 | closeModal(); | 270 | closeModal(); |
@@ -162,6 +162,7 @@ export const accountFormSchema: FormSchema[] = [ | @@ -162,6 +162,7 @@ export const accountFormSchema: FormSchema[] = [ | ||
162 | componentProps({ formActionType }) { | 162 | componentProps({ formActionType }) { |
163 | const { clearValidate } = formActionType; | 163 | const { clearValidate } = formActionType; |
164 | return { | 164 | return { |
165 | + maxlength: 11, | ||
165 | onChange(value) { | 166 | onChange(value) { |
166 | if (value == olderPhoneNumber) { | 167 | if (value == olderPhoneNumber) { |
167 | clearValidate('phoneNumber'); | 168 | clearValidate('phoneNumber'); |