diff --git a/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts b/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts index 1a1c075f..07fc61fe 100644 --- a/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts +++ b/src/modules/container-loading/pages/GlobalSmartLoadingView.test.ts @@ -81,7 +81,6 @@ describe('GlobalSmartLoadingView', () => { { label: '待装柜', value: 'WAIT_LOADING' }, { label: '预装柜中', value: 'EDITING' }, { label: '拣货中', value: 'LOADING' }, - { label: '装柜完成', value: 'COMPLETED' }, ]) expect(wrapper.text()).not.toContain('税率') @@ -138,19 +137,15 @@ describe('GlobalSmartLoadingView', () => { expect(wrapper.findAll('button').some((item) => item.text().trim() === '推送预装')).toBe(false) }) - it('routes completed containers to the read-only loading list', async () => { + it('hides completed containers from the smart loading workbench', async () => { const completed = { ...container, id: '9007199254740997', planId: '9007199254740998', cabinetNo: 'CB-3', planStatus: 'COMPLETED' as const } vi.mocked(listContainers).mockResolvedValue({ records: [completed], page: 1, size: 100, total: 1, pages: 1 }) const wrapper = mount(GlobalSmartLoadingView, { global: { plugins: [ElementPlus] } }) await flushPromises() expect(getSmartLoadingPlanByBooking).not.toHaveBeenCalled() - expect(wrapper.text()).toContain('该柜次已完成装柜') - await wrapper.findAll('button').find((item) => item.text().includes('查看装柜清单'))!.trigger('click') - expect(routerPush).toHaveBeenCalledWith({ - name: 'loading-lists', - query: { planId: completed.planId, warehouseId: completed.warehouseId }, - }) + expect(wrapper.text()).not.toContain('CB-3') + expect(wrapper.text()).not.toContain('装柜完成') }) it('refreshes the latest plan after A0409 without losing the selected container', async () => { diff --git a/src/modules/container-loading/pages/GlobalSmartLoadingView.vue b/src/modules/container-loading/pages/GlobalSmartLoadingView.vue index c04cfa2f..c9e05e39 100644 --- a/src/modules/container-loading/pages/GlobalSmartLoadingView.vue +++ b/src/modules/container-loading/pages/GlobalSmartLoadingView.vue @@ -74,7 +74,6 @@ const queryFields = computed(() => [ { label: '待装柜', value: 'WAIT_LOADING' }, { label: '预装柜中', value: 'EDITING' }, { label: '拣货中', value: 'LOADING' }, - { label: '装柜完成', value: 'COMPLETED' }, ] }, ]) @@ -82,6 +81,7 @@ const filteredContainers = computed(() => { const keyword = String(appliedQuery.value.containerKeyword || '').trim().toLowerCase() const status = String(appliedQuery.value.status || '') return containers.value.filter((item) => { + if (item.planStatus === 'COMPLETED') return false if (status && item.planStatus !== status) return false if (!keyword) return true return [item.cabinetNo, item.containerNo, item.bookingNo, item.destinationWarehouseCode, item.destinationWarehouseName] @@ -382,7 +382,7 @@ onMounted(load)