diff --git a/src/modules/customers/pages/CustomersView.test.ts b/src/modules/customers/pages/CustomersView.test.ts index 1b1165d9..8c75e138 100644 --- a/src/modules/customers/pages/CustomersView.test.ts +++ b/src/modules/customers/pages/CustomersView.test.ts @@ -27,6 +27,7 @@ import { createPlatformExportTask } from '@/modules/downloads' import { useAccessPreviewStore } from '@/core/access/accessPreview' import { useAuthStore } from '@/core/auth/auth' import QueryToolbar from '@/shared/components/QueryToolbar.vue' +import AppDialog from '@/shared/components/AppDialog.vue' import { showExportTaskCreatedDialog } from '@/shared/components/exportTaskCreatedDialog' import CustomersView from './CustomersView.vue' @@ -285,6 +286,7 @@ describe('CustomersView', () => { expect(uploadPlatformTenantRequiredQualificationPackage).toHaveBeenCalledWith( fullTenant.id, licenseFile, null, fullTenant.unifiedSocialCreditCode, false, false, ) + expect(wrapper.findComponent(AppDialog).props('modelValue')).toBe(false) }) it('keeps the company contact phone editable without changing a member login phone', async () => { @@ -309,6 +311,7 @@ describe('CustomersView', () => { await flushPromises() expect(updatePlatformTenant).toHaveBeenCalledWith(fullTenant.id, expect.objectContaining({ contactPhone: '0755-12345678' })) + expect(wrapper.findComponent(AppDialog).props('modelValue')).toBe(false) expect(document.body.textContent).toContain('不会修改企业管理员登录手机号') expect(customersSource).not.toContain('联系电话(登录用户名)') }) diff --git a/src/modules/customers/pages/CustomersView.vue b/src/modules/customers/pages/CustomersView.vue index 93464f15..1d92eb41 100644 --- a/src/modules/customers/pages/CustomersView.vue +++ b/src/modules/customers/pages/CustomersView.vue @@ -615,6 +615,7 @@ async function saveCustomer() { ElMessage.success('客户资料已保存') } await loadCustomers() + if (!failures.length) editorOpen.value = false } catch (error) { ElMessage.error(getApiErrorMessage(error, '客户资料保存失败,请稍后重试')) } finally { saving.value = false } } @@ -1084,7 +1085,7 @@ onMounted(() => { void loadCustomers() })
- 用于非法定打印与简短展示;报关、合同等法定单据仍使用公司全称。 + 创建后仍可在客户资料中修改。