diff --git a/src/modules/container-loading/pages/ContainersView.test.ts b/src/modules/container-loading/pages/ContainersView.test.ts index 19f3c0de..26c149ea 100644 --- a/src/modules/container-loading/pages/ContainersView.test.ts +++ b/src/modules/container-loading/pages/ContainersView.test.ts @@ -180,4 +180,13 @@ describe('ContainersView', () => { previous = current } }) + + it('renders container business actions as buttons without changing the transport gate', () => { + const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8') + expect(source).toContain('size="small" type="primary" plain :aria-label="containerViewLabel') + expect(source).toContain("row.planStatus === 'LOADING' ? '录入集装箱号' : '编辑'") + expect(source).toContain("row.planStatus === 'EDITING' && canSmartLoading") + expect(source).not.toContain('canSmartLoading && row.containerNo') + expect(source).not.toContain('link type="primary" :aria-label="containerViewLabel') + }) }) diff --git a/src/modules/container-loading/pages/ContainersView.vue b/src/modules/container-loading/pages/ContainersView.vue index c096a5f3..64c7edf3 100644 --- a/src/modules/container-loading/pages/ContainersView.vue +++ b/src/modules/container-loading/pages/ContainersView.vue @@ -325,7 +325,7 @@ onMounted(() => { void Promise.all([loadWarehouses(), loadBusinessOptions(), loa
- + diff --git a/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts b/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts index 39e2402c..060fad9d 100644 --- a/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts +++ b/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts @@ -3,6 +3,8 @@ import { AxiosError } from 'axios' import { createPinia, setActivePinia } from 'pinia' import { flushPromises, mount } from '@vue/test-utils' import { beforeEach, describe, expect, it, vi } from 'vitest' +import { readFileSync } from 'node:fs' +import { resolve } from 'node:path' import QueryToolbar from '@/shared/components/QueryToolbar.vue' import GlobalSmartLoadingView from './GlobalSmartLoadingView.vue' import { @@ -213,4 +215,12 @@ describe('GlobalSmartLoadingView', () => { expect(errorMessage).toHaveBeenCalledWith('该订单在拣货中不许删除') expect(wrapper.text()).toContain('该订单在拣货中不许删除') }) + + it('uses bordered assignment and adjustment actions at narrow widths', () => { + const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/GlobalSmartLoadingView.vue'), 'utf8') + expect(source).toContain('size="small"') + expect(source).toContain('type="danger" plain') + expect(source).not.toContain('link type="danger"') + expect(source).toContain('@media (max-width: 720px)') + }) }) diff --git a/src/modules/container-loading/pages/GlobalSmartLoadingView.vue b/src/modules/container-loading/pages/GlobalSmartLoadingView.vue index 1539d3d2..9f518e81 100644 --- a/src/modules/container-loading/pages/GlobalSmartLoadingView.vue +++ b/src/modules/container-loading/pages/GlobalSmartLoadingView.vue @@ -369,8 +369,9 @@ onMounted(load)