This commit is contained in:
2026-08-27 16:42:36 +08:00
parent 8131d58d21
commit b1f46835b2
3 changed files with 37 additions and 23 deletions
+2 -13
View File
@@ -40,7 +40,6 @@
<view class="scan-row">
<ScanTargetInput v-model="scanValue" name="boxCode" label="箱码扫码框" placeholder="扫描或输入箱唛标签码" :active="activeScanField === 'boxCode'" @activate="setScanTarget" @submit="handleManualSubmit" />
</view>
<text class="scan-hardware-tip">支持硬件广播扫码,也可点击输入后按“完成”确认</text>
<view v-if="lastScanResult" class="last-scan" :class="lastScanResult.type" role="status">
<view class="last-scan-icon">{{ lastScanResult.type === 'success' ? '✓' : '!' }}</view>
<view class="last-scan-content">
@@ -58,18 +57,8 @@
<view class="progress-header">
<text class="progress-title">拣货进度</text>
<view class="progress-actions">
<view class="progress-stats">
<template v-if="summary.partial > 0">
<text>已拣 </text><text class="progress-number">{{ summary.picked }}</text>
<text> · 部分拣 </text><text class="progress-number">{{ summary.partial }}</text>
<text> / {{ summary.total }} 箱</text>
</template>
<template v-else>
<text>已拣 </text><text class="progress-number">{{ summary.picked }}</text>
<text> / {{ summary.total }} 箱</text>
</template>
</view>
<button class="box-tasks-btn" @tap="openBoxList('pending')">柜次任务 {{ completedCount }}/{{ boxes.length }}</button>
<view class="progress-stats"><text>已处理 </text><text class="progress-number">{{ summary.processed }}</text><text>/{{ summary.total }} 箱</text></view>
<button class="box-tasks-btn" :aria-label="`查看柜次任务,已完成 ${completedCount}/${boxes.length}`" @tap="openBoxList('pending')"><text>柜次</text><text class="box-tasks-count">{{ completedCount }}/{{ boxes.length }}</text><text class="box-tasks-arrow">›</text></button>
</view>
</view>
<view class="progress-bar-bg">
+14 -10
View File
@@ -415,8 +415,6 @@
gap: 10px;
}
.scan-hardware-tip { display: block; margin-top: 9px; color: #41668f; font-size: 11px; font-weight: 600; line-height: 17px; }
.last-scan {
display: flex;
align-items: center;
@@ -441,31 +439,37 @@
.progress-section {
margin: 0 12px 10px;
padding: 13px 14px;
padding: 10px 12px;
border-radius: 12px;
background: $card;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.progress-header {
align-items: flex-start;
align-items: center;
justify-content: space-between;
gap: 10px;
gap: 8px;
}
.progress-title {
flex-shrink: 0;
font-size: 14px;
font-weight: 700;
}
.progress-stats {
color: $text-secondary;
font-size: 12px;
font-size: 11px;
text-align: right;
white-space: nowrap;
}
.progress-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.box-tasks-btn { height: 48px; padding: 0 12px; border: 1px solid #cdd9e7; border-radius: 8px; color: #3f5f81; font-size: 12px; line-height: 46px; background: #f7faff; }
.progress-actions { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: flex-end; gap: 8px; }
.box-tasks-btn { display: flex; height: 40px; flex-shrink: 0; align-items: center; gap: 3px; padding: 0 9px 0 11px; border: 0; border-radius: 999px; color: #245c9c; font-size: 11px; line-height: 40px; background: #edf5ff; }
.box-tasks-btn::after { border: 0; }
.box-tasks-btn:active { color: #0f4f9b; background: #dcecff; }
.box-tasks-count { color: $primary; font-weight: 700; }
.box-tasks-arrow { margin-left: 1px; color: $primary; font-size: 16px; line-height: 16px; }
.progress-number {
color: $success;
@@ -474,8 +478,8 @@
.progress-bar-bg {
overflow: hidden;
height: 7px;
margin-top: 10px;
height: 5px;
margin-top: 8px;
border-radius: 999px;
background: #e5e7eb;
}
+21
View File
@@ -0,0 +1,21 @@
import test from 'node:test'
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
const read = (path) => readFile(new URL(path, import.meta.url), 'utf8')
test('picking header omits persistent scanner help and keeps progress compact', async () => {
const [page, styles] = await Promise.all([
read('../pages/picking/picking.vue'),
read('../styles/pda.scss')
])
assert.doesNotMatch(page, /支持硬件广播扫码,也可点击输入后按“完成”确认/)
assert.doesNotMatch(styles, /\.scan-hardware-tip/)
assert.match(page, /已处理[\s\S]*?summary\.processed[\s\S]*?summary\.total[\s\S]*?>柜次<[\s\S]*?box-tasks-count[\s\S]*?completedCount[\s\S]*?boxes\.length[\s\S]*?box-tasks-arrow/)
assert.match(styles, /\.progress-section \{[^}]*padding: 10px 12px/)
assert.match(styles, /\.progress-actions \{[^}]*align-items: center;[^}]*gap: 8px/)
assert.match(styles, /\.box-tasks-btn \{[^}]*height: 40px;[^}]*border: 0;[^}]*border-radius: 999px/)
assert.match(styles, /\.box-tasks-count \{[^}]*font-weight: 700;/)
assert.match(styles, /\.progress-bar-bg \{[^}]*height: 5px;[^}]*margin-top: 8px/)
})