From e686e137729f1540c199e8724038bacd7e2c022e Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Mon, 31 Aug 2026 17:10:46 +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/history/history.vue | 6 +++--- pages/picking/picking.vue | 26 ++++++++++---------------- pages/tasks/tasks.vue | 13 ++++--------- tests/page-contract.test.mjs | 5 ++--- tests/picking-evidence-stage.test.mjs | 2 +- tests/production-ui.test.mjs | 2 +- tests/user-facing-identifiers.test.mjs | 18 +++++++++++------- utils/user-facing.js | 14 +++++++------- 8 files changed, 39 insertions(+), 47 deletions(-) diff --git a/pages/history/history.vue b/pages/history/history.vue index d37affc..a40977b 100644 --- a/pages/history/history.vue +++ b/pages/history/history.vue @@ -1,7 +1,7 @@ diff --git a/pages/picking/picking.vue b/pages/picking/picking.vue index 1f35439..baa2bb0 100644 --- a/pages/picking/picking.vue +++ b/pages/picking/picking.vue @@ -14,7 +14,7 @@ @@ -25,7 +25,7 @@ :class="{ active: index === currentBoxIndex, completed: completedBoxes[index] }" @tap="requestBoxSwitch(index)" > - 集装箱号 {{ displayBusinessValue(box.currentContainerNo) }}柜次号 {{ displayBusinessValue(box.cabinetNo) }} · {{ businessReference(box) }} + {{ containerReference(box) }} 已完成 有草稿 @@ -78,7 +78,7 @@ :class="itemState(item)" > - {{ itemBusinessReference(item) }} + 拣货明细 已拣 ✓ @@ -190,7 +190,7 @@ @tap="selectBoxFromList(entry)" > - 集装箱号 {{ displayBusinessValue(entry.box.currentContainerNo || entry.box.boxNo) }}{{ entry.index === currentBoxIndex ? '(当前)' : '' }} + {{ containerReference(entry.box) }}{{ entry.index === currentBoxIndex ? '(当前)' : '' }} {{ boxListDetail(entry) }} @@ -299,7 +299,7 @@ ✓ - 集装箱号 {{ displayBusinessValue(currentBox.currentContainerNo) }} · 柜次号 {{ displayBusinessValue(currentBox.cabinetNo) }} · {{ businessReference(currentBox) }} + {{ containerReference(currentBox) }} 装柜照片已拍 {{ evidenceCapturedTypeCount }}/{{ evidenceSlots.length }} 类 {{ sealNo ? '封签号已填写' : '封签号未填写' }} @@ -347,7 +347,7 @@ import { stableOperationId } from '@/utils/idempotency.js' import { stableTaskOperationIdentity } from '@/utils/task-identity.js' import { COMPLETION_PHASE, resolveCompletionPhase, shouldReconcileCompletion } from '@/utils/loading-completion-state.js' - import { businessReference, displayBusinessValue, formatApiError, sanitizeUserMessage } from '@/utils/user-facing.js' + import { containerReference, formatApiError, sanitizeUserMessage } from '@/utils/user-facing.js' import ScanTargetInput from '@/components/ScanTargetInput.vue' import PopupHeader from '@/components/PopupHeader.vue' @@ -562,13 +562,7 @@ return false }, methods: { - displayBusinessValue, - businessReference, - itemBusinessReference(item) { - if (String(item?.inboundCode ?? '').trim()) return `入仓码 ${item.inboundCode}` - if (String(item?.orderNo ?? '').trim()) return `订单号 ${item.orderNo}` - return '业务编号未关联' - }, + containerReference, isSelectableTask(task) { return Boolean(task?.recordStatus === 'ACTIVE' && !task?.mergedIntoContainerBookingId @@ -1467,7 +1461,7 @@ this.itemStates = { ...this.itemStates, [item.id]: pickedCount >= plannedCount ? ITEM_STATUS.PICKED : ITEM_STATUS.PARTIAL } this.recordScanResult('success', '箱码扫描成功', boxCode, - `${item.inboundCode || item.orderNo || '当前明细'} · 已拣 ${pickedCount}/${plannedCount} 箱`) + `当前明细 · 已拣 ${pickedCount}/${plannedCount} 箱`) this.showToast(`已拣箱 ${pickedCount}/${plannedCount}`, 'success') this.persistSession() }, @@ -1565,11 +1559,11 @@ const processed = draft ? Object.values(draft.itemStates).filter((status) => status !== ITEM_STATUS.PENDING).length : 0 - return `${businessReference(entry.box)} · 已处理${processed}件 · 待拣${entry.box.items.length - processed}件` + return `已处理${processed}件 · 待拣${entry.box.items.length - processed}件` } const picked = entry.box.items.filter((item) => item.finalState === ITEM_STATUS.PICKED).length const partial = entry.box.items.filter((item) => item.finalState === ITEM_STATUS.PARTIAL).length - return `${businessReference(entry.box)} · 拣出${picked}件${partial ? ` · 部分拣${partial}件` : ''}` + return `拣出${picked}件${partial ? ` · 部分拣${partial}件` : ''}` }, selectBoxFromList(entry) { if (this.boxListType === 'done' || entry.index === this.currentBoxIndex) return diff --git a/pages/tasks/tasks.vue b/pages/tasks/tasks.vue index 6f392a3..37cf4de 100644 --- a/pages/tasks/tasks.vue +++ b/pages/tasks/tasks.vue @@ -14,12 +14,11 @@ 暂无待处理的拣货任务 {{ notice }} -