fix(customers): close editor after successful save

This commit is contained in:
2026-09-14 15:38:29 +08:00
parent b0de9c026f
commit 877fcc2740
2 changed files with 5 additions and 1 deletions
@@ -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('联系电话(登录用户名)')
})