diff --git a/src/pages/packaging/index.vue b/src/pages/packaging/index.vue
index 6009662..691eb9f 100644
--- a/src/pages/packaging/index.vue
+++ b/src/pages/packaging/index.vue
@@ -90,7 +90,7 @@
class="pack-order-type"
:class="isGroupOrder ? 'pack-order-type--group' : 'pack-order-type--single'"
>{{ isGroupOrder ? '团单' : '散单' }}
- 长按/右键商品行免验
+ 单击/右键商品行免验
已扫 {{ scannedKindCount }}/{{ totalKindCount }} 种
共{{ detailList.length }}项
@@ -103,8 +103,8 @@
:key="index"
class="pack-detail-row"
:class="{ 'pack-detail-row--scanned': isGroupOrder && isItemScanned(item) }"
- @longpress="!groupVerifyDone && handleLongPressProduct(item)"
- @contextmenu.prevent="!groupVerifyDone && handleLongPressProduct(item)"
+ @click="handleDetailRowClick(item)"
+ @contextmenu.prevent="handleVerifyItemDirect(item)"
>
{{ index + 1 }}
@@ -114,7 +114,7 @@
class="pack-item-img"
:src="item.image"
mode="aspectFit"
- @click="previewItemImage(item)"
+ @click.stop="previewItemImage(item)"
/>
-
{{ item.imageCount }}
@@ -144,7 +144,7 @@
-
+
今日打包
@@ -315,6 +315,23 @@
+
+
+
+
+ 免验确认
+ ×
+
+
+ 将「{{ verifyConfirmItem?.name || verifyConfirmItem?.barcode || '-' }}」标记为已核实(免验)?
+
+
+
+
+
@@ -478,6 +495,9 @@ export default {
// ---- 打包订单类型 / 无条码复核 ----
isSandan: null,
cancelVerifyPopupOpen: false,
+ // 免验确认弹窗(单击商品行触发;右键直接免验不走这里)
+ verifyConfirmVisible: false,
+ verifyConfirmItem: null,
idleLogoutTimer: null,
idleLoggingOut: false,
// ---- 打包流程(预检/上报/完成)----
@@ -588,7 +608,7 @@ export default {
groupVerifyCompleted() {
return this.totalKindCount > 0 && this.groupVerifiedCount >= this.totalKindCount
},
- // 核实已完成或已开始打包:商品行右键/长按免验事件移除
+ // 行级拦截已取消(单击/右键都只看这一行);保留它仅供诊断日志显示当时状态
groupVerifyDone() {
return this.groupVerifyCompleted || this.packStarted
},
@@ -886,6 +906,13 @@ export default {
})
this.precheckPassed = true
this.packStarted = true
+ // 留痕:这条一旦出现,说明是「服务端有进行中的任务」把 packStarted 置为 true 的
+ // (开发库没有进行中任务,所以只会在生产包上复现"长按免验被拦")
+ diagNote('pack-restore-task', {
+ packMode: order?.pack_mode ?? wave?.pack_mode ?? '',
+ wave: this.currentWaveNo,
+ items: this.detailList.length,
+ })
// 恢复进行中的大团购打包时长闸门倒计时(若服务端随任务下发倒计时字段)
const restoreWait = Number(
this.pickInfoField(order, {}, ['pack_wait_seconds', 'packWaitSeconds']) ||
@@ -1126,20 +1153,78 @@ export default {
const scanned = Number(item?.scannedQty) || 0
return qty > 0 && scanned >= qty
},
- handleLongPressProduct(item) {
- if (!item || !this.isGroupOrder || this.groupVerifyDone) {
+ // 单击商品行:弹免验确认窗(关闭 / 免验)
+ // 2026-09-26:长按在真机上"非常难摁"(要挟住不动),改成单击弹窗 + 右键直执行
+ handleDetailRowClick(item) {
+ if (!item || !this.isGroupOrder) {
return
}
+ const reason = this.verifyBlockReason(item)
+ if (reason) {
+ diagNote('免验-blocked', { reason, source: 'click', item: item?.name || item?.barcode || '' })
+ uni.showToast({ title: reason, icon: 'none' })
+ return
+ }
+ diagNote('免验-open', {
+ source: 'click',
+ item: item?.name || item?.barcode || '',
+ // 保留整单状态快照,便于事后判读(不再用它拦截)
+ done: this.groupVerifyDone,
+ completed: this.groupVerifyCompleted,
+ packStarted: this.packStarted,
+ verified: `${this.scannedKindCount}/${this.totalKindCount}`,
+ })
+ this.verifyConfirmItem = item
+ this.verifyConfirmVisible = true
+ },
+ closeVerifyConfirm() {
+ this.verifyConfirmVisible = false
+ this.verifyConfirmItem = null
+ },
+ confirmVerifyItem() {
+ const item = this.verifyConfirmItem
+ this.verifyConfirmVisible = false
+ this.verifyConfirmItem = null
+ this.doVerifyItem(item, 'dialog')
+ },
+ // 右键(含电脑右键菜单键):不弹窗,直接免验
+ handleVerifyItemDirect(item) {
+ if (!item || !this.isGroupOrder) {
+ return
+ }
+ const reason = this.verifyBlockReason(item)
+ if (reason) {
+ diagNote('免验-blocked', { reason, source: 'contextmenu', item: item?.name || item?.barcode || '' })
+ uni.showToast({ title: reason, icon: 'none' })
+ return
+ }
+ this.doVerifyItem(item, 'contextmenu')
+ },
+ // 不能免验的原因文案('' = 可以免验):单击弹窗与右键直执行共用
+ verifyBlockReason(item) {
if (this.isItemScanned(item)) {
- uni.showToast({ title: '该商品已核实', icon: 'none' })
+ return '该商品已核实'
+ }
+ if ((Number(item?.qty) || 0) <= 0) {
+ return '该商品无数量,无法免验'
+ }
+ return ''
+ },
+ // 免验执行(单击确认窗与右键共用)
+ doVerifyItem(item, source) {
+ if (!item) {
return
}
const total = Number(item.qty) || 0
if (total <= 0) {
- uni.showToast({ title: '该商品无数量,无法免验', icon: 'none' })
return
}
- // 长按免验:直接标记为已核实(标绿),无需扫码
+ diagNote('免验-execute', {
+ source,
+ item: item.name || item.barcode || '',
+ qty: total,
+ })
+ // 直接标记为已核实(标绿),无需扫码
item.scannedQty = total
this.addScanRecord(`免验:${item.name || item.barcode || ''}`)
this.speak('免验通过')
@@ -3439,6 +3524,7 @@ export default {