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 | 181 | componentProps({ formActionType }) { |
182 | 182 | const { clearValidate } = formActionType; |
183 | 183 | return { |
184 | + maxlength: 11, | |
184 | 185 | onChange(value) { |
185 | 186 | if (value == olderPhoneNumber) { |
186 | 187 | clearValidate('phoneNumber'); | ... | ... |
... | ... | @@ -260,8 +260,11 @@ |
260 | 260 | async function handleSubmit() { |
261 | 261 | setModalProps({ confirmLoading: true }); |
262 | 262 | try { |
263 | - await validate(); | |
264 | 263 | const values = getFieldsValue(); |
264 | + if (!('organizationIds' in values)) { | |
265 | + createMessage.error('组织必选'); | |
266 | + } | |
267 | + await validate(); | |
265 | 268 | await addTenantList({ ...values, level: 4, tenantId: userInfo.getUserInfo.tenantId! }); |
266 | 269 | createMessage.success(unref(isAdd) ? '新增成功' : '编辑成功'); |
267 | 270 | closeModal(); | ... | ... |
... | ... | @@ -162,6 +162,7 @@ export const accountFormSchema: FormSchema[] = [ |
162 | 162 | componentProps({ formActionType }) { |
163 | 163 | const { clearValidate } = formActionType; |
164 | 164 | return { |
165 | + maxlength: 11, | |
165 | 166 | onChange(value) { |
166 | 167 | if (value == olderPhoneNumber) { |
167 | 168 | clearValidate('phoneNumber'); | ... | ... |