From 9d9b8943b862e43c1fc34961579813310b3c0fcf Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Wed, 12 Aug 2026 18:00:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/ContainersView.test.ts | 9 +++++++++ .../pages/ContainersView.vue | 2 +- .../pages/GlobalSmartLoadingView.test.ts | 10 ++++++++++ .../pages/GlobalSmartLoadingView.vue | 5 +++-- .../pages/SmartLoadingWorkbenchView.test.ts | 11 +++++++++++ .../pages/SmartLoadingWorkbenchView.vue | 4 ++-- .../pages/CarrierRatesView.test.ts | 14 ++++++++++++++ .../carrier-rates/pages/CarrierRatesView.vue | 19 +++++++++++++++---- .../fee-items/pages/FeeItemsView.test.ts | 9 +++++++++ src/modules/fee-items/pages/FeeItemsView.vue | 2 ++ .../InboundWorkflowWorkspace.test.ts | 11 +++++++++++ .../inbounds/pages/InboundOrdersView.test.ts | 5 +++++ .../inbounds/pages/InboundOrdersView.vue | 4 ++-- .../weight/components/WeightOcrPanel.vue | 2 +- .../components/LoadingListsView.test.ts | 11 +++++++++++ .../components/LoadingListsView.vue | 12 ++++++++---- 16 files changed, 114 insertions(+), 16 deletions(-) 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)