This commit is contained in:
2026-08-12 12:19:02 +08:00
parent f9ff9086d5
commit 11e085e30f
24 changed files with 230 additions and 50 deletions
@@ -112,7 +112,7 @@ describe('PartnersView real API integration', () => {
expect(wrapper.text()).toContain('深圳示例贸易有限公司')
expect(wrapper.text()).toContain('CUS-001')
expect(wrapper.text()).toContain('contact@example.com')
expect(wrapper.text()).toContain('广东省 深圳市 宝安区 航城街道示例路 1 号')
expect(wrapper.find('.data-table').text()).not.toContain('广东省 深圳市 宝安区 航城街道示例路 1 号')
expect(wrapper.text()).not.toContain('往来单位总数')
expect(wrapper.text()).not.toContain('往来单位档案')
expect(wrapper.find('.query-toolbar').exists()).toBe(true)
@@ -123,6 +123,10 @@ describe('PartnersView real API integration', () => {
expect(wrapper.find('.data-table__toolbar-start').exists()).toBe(false)
expect(wrapper.find('.data-table__pagination-left').text()).toContain('平台公共数据 · 共 1 个往来单位')
expect(wrapper.find('.list-page-layout__state').exists()).toBe(false)
const detailButton = wrapper.findAll('button').find((button) => button.text().trim() === '详情')
await detailButton?.trigger('click')
await flushPromises()
expect(document.body.textContent).toContain('广东省 深圳市 宝安区 航城街道示例路 1 号')
})
it('opens the create form without selecting an enterprise', async () => {
@@ -154,9 +154,9 @@ const partnerColumns: DataTableColumn[] = [
{ key: 'partner', label: '往来单位', minWidth: 210, slotName: 'partner' },
{ key: 'type', label: '类型', minWidth: 115, slotName: 'type' },
{ key: 'contact', label: '联系人', minWidth: 165, slotName: 'contact' },
{ key: 'address', label: '地址', minWidth: 240, slotName: 'address' },
{ key: 'address', label: '地址', minWidth: 240, slotName: 'address', defaultVisible: false },
{ key: 'status', label: '状态', width: 90, slotName: 'status' },
{ key: 'updatedAt', prop: 'updatedAt', label: '更新时间', minWidth: 140, formatter: (row: PlatformPartnerResource) => formatUpdatedAt(row.updatedAt) },
{ key: 'updatedAt', prop: 'updatedAt', label: '更新时间', minWidth: 140, defaultVisible: false, formatter: (row: PlatformPartnerResource) => formatUpdatedAt(row.updatedAt) },
]
watch(
@@ -122,7 +122,7 @@ const expressCompanyColumns: DataTableColumn[] = [
{ key: 'company', label: '快递公司', minWidth: 210, slotName: 'company' },
{ key: 'servicePhone', prop: 'servicePhone', label: '客服电话', minWidth: 130, formatter: (row: PlatformExpressCompanyResource) => row.servicePhone || '—' },
{ key: 'website', label: '官方网站', minWidth: 210, slotName: 'website' },
{ key: 'updatedAt', prop: 'updatedAt', label: '更新时间', minWidth: 150, formatter: (row: PlatformExpressCompanyResource) => formatUpdatedAt(row.updatedAt) },
{ key: 'updatedAt', prop: 'updatedAt', label: '更新时间', minWidth: 150, defaultVisible: false, formatter: (row: PlatformExpressCompanyResource) => formatUpdatedAt(row.updatedAt) },
{ key: 'status', label: '状态', width: 100, slotName: 'status' },
]