"fix(订单复核): 团购篮号取 box_no + 波次首行选中高亮 + 散单总单数/复核要求列修正

- 团购(pick_mode=1)篮号优先取 data.list[x].box_no,兜底 wave_index;顶部篮号标签移入商品明细标签行,pick_mode=2/3 不显示
- 散单分播(pick_mode=3)明细篮号列改用 order.boxNo
- 修复团购波次首行选中态被 wave-group-header 底色覆盖(新增 .wave-group-header.table-row--selected)
- 修复散单「波次总单数」显示 0(散单=列表行数,团购=累加 total_orders/order_count)
- 表头「打包要求」更名「复核要求」,复核要求仅文字高亮"
This commit is contained in:
zm2000 2026-10-23 20:17:47 +08:00
parent b85dcf41f1
commit e636ab33ca

View File

@ -131,8 +131,6 @@
<view v-if="printerOpened" class="tool-select-mask" @click="closePrinterDropdown"></view>
<text v-if="hasSelection" class="tool-info-text tool-info-text--blue">拣货人:{{ pickerName || '-' }}</text>
<text v-if="hasSelection" class="tool-info-text tool-info-text--blue">货主:{{ storeRemark || '-' }}</text>
<text v-if="hasSelection && scanListType === 'single'" class="tool-info-text tool-info-text--gray">波次:{{ selectedWaveNo || '-' }}</text>
<text v-if="hasSelection && scanListType === 'single'" class="tool-info-text tool-info-text--orange">蓝号:{{ selectedWaveIndex || '-' }}</text>
</view>
<template v-if="hasSelection">
@ -145,7 +143,9 @@
<view class="detail-tab">
<view class="detail-tab-left">
<text v-if="scanListType === 'group'" class="detail-tab-tag">订单数:{{ currentOrderCount || '-' }}</text>
<text class="detail-tab-tag">篮号:{{ basketSummary || '-' }}</text>
<text v-if="showTopBasketTag && scanListType === 'single'" class="detail-tab-tag">波次:{{ selectedWaveNo || '-' }}</text>
<text v-if="showTopBasketTag && scanListType === 'single'" class="detail-tab-tag detail-tab-tag--orange">篮号:{{ selectedWaveIndex || '-' }}</text>
<text v-else-if="showTopBasketTag" class="detail-tab-tag detail-tab-tag--orange">篮号:{{ selectedWaveIndex || '-' }}</text>
<text class="detail-tab-text">商品明细</text>
</view>
<text class="detail-tab-summary">已扫<text class="detail-tab-summary--em">{{ scannedCount }}</text>/{{ totalCount }}件</text>
@ -161,7 +161,7 @@
<view class="table-cell cell-image" :style="getColStyle('image')" ref="detail-header-image">图片<view class="col-resizer" @mousedown.prevent.stop="startResize('image', $event)"></view></view>
<view class="table-cell cell-barcode" :style="getColStyle('barcode')" ref="detail-header-barcode">条码<view class="col-resizer" @mousedown.prevent.stop="startResize('barcode', $event)"></view></view>
<view class="table-cell cell-spec" :style="getColStyle('spec')" ref="detail-header-spec">规格<view class="col-resizer" @mousedown.prevent.stop="startResize('spec', $event)"></view></view>
<view v-if="showPackColumn" class="table-cell cell-pack" :style="getColStyle('pack')" ref="detail-header-pack">打包要求<view class="col-resizer" @mousedown.prevent.stop="startResize('pack', $event)"></view></view>
<view v-if="showPackColumn" class="table-cell cell-pack" :style="getColStyle('pack')" ref="detail-header-pack">复核要求<view class="col-resizer" @mousedown.prevent.stop="startResize('pack', $event)"></view></view>
</view>
<scroll-view v-if="hasSelection && displayOrders.length > 0" class="table-scroll table-scroll--detail table-scroll--detail-body" scroll-y>
@ -174,7 +174,7 @@
@contextmenu.prevent="handleNoBarcodeReviewDirect(order)"
@longtap = "handleProductRowClick(order)"
>
<text v-if="showBasketColumn" class="table-cell cell-basket" :style="getColStyle('basket')">{{ order.basketNo || '-' }}</text>
<text v-if="showBasketColumn" class="table-cell cell-basket" :style="getColStyle('basket')">{{ order.boxNo || '-' }}</text>
<text class="table-cell cell-total" :style="getColStyle('total')">{{ order.quantity }}</text>
<text class="table-cell cell-scanned" :style="getColStyle('scanned')">{{ order.scannedQty }}</text>
<text class="table-cell cell-name" :style="getColStyle('name')">{{ order.productName }}</text>
@ -186,7 +186,7 @@
<text class="cell-barcode-value">{{ order.barcode }}<text v-if="order.barcodeExtra" class="cell-barcode-extra">{{ order.barcodeExtra }}</text></text>
</text>
<text class="table-cell cell-spec" :style="getColStyle('spec')">{{ order.spec }}</text>
<text v-if="showPackColumn" class="table-cell cell-pack cell-pack-value" :style="getColStyle('pack')">{{ order.packingRequirements }}</text>
<text v-if="showPackColumn" class="table-cell cell-pack cell-pack-value" :style="getColStyle('pack')"><text v-if="order.packingRequirements" class="cell-pack-value-inner">{{ order.packingRequirements }}</text></text>
</view>
</view>
</scroll-view>
@ -952,10 +952,15 @@ export default {
return qty <= 0 || this.isRecheckExempt(order) || scanned >= qty
})
},
// pick_mode=3 散单分播模式:商品明细显示“篮号”列(位置在总数列前)
// pick_mode=3(先拣后分)散单分播:商品明细总数列前新增“篮号”列(值取 item.boxNo)
showBasketColumn() {
return this.scanListType === 'single' && Number(this.currentPickMode) === 3
},
// 顶部商品明细标签行的“篮号”:pick_mode=2(单品单件)/3(先拣后分)时不显示
showTopBasketTag() {
const mode = Number(this.currentPickMode)
return mode !== 2 && mode !== 3
},
// 商品明细标签行左侧:团购模式显示当前波次订单数(order_count)
currentOrderCount() {
if (this.scanListType !== 'group' || !this.currentOrderHeader) {
@ -1138,6 +1143,8 @@ export default {
needRecheck,
// 篮号(pick_mode=3 散单分播,明细行 box_no 等字段)
basketNo: this.getRowValue(row, ['box_no', 'boxNo', 'basket_no', 'basketNo', 'seed_no', 'seedNo']),
// 明细行“篮号”列取值(先拣后分 pick_mode=3:item.boxNo)
boxNo: this.getRowValue(row, ['boxNo', 'box_no']),
// 共享条码:库内存在相同条码的其它商品(has_shared_barcode,布尔)
hasSharedBarcode: !!this.getRowValue(row, ['has_shared_barcode', 'hasSharedBarcode']),
scannedQty,
@ -2254,11 +2261,21 @@ export default {
this.warehouseId = scanWarehouseId
}
// 汇总数据:波次总单数 = 该次查询所有波次的订单数(order_count)累加
this.waveTotalOrders = list.reduce(
(sum, row) => sum + (Number(this.getRowValue(row, ['order_count', 'orderCount'])) || 0),
0
)
// 汇总数据:波次总单数
if (this.scanListType === 'single') {
// 散单:扁平订单列表,每行一个订单,总数 = 列表行数(含刷新后回填的已复核项)
this.waveTotalOrders = this.scanOrderList.length
} else {
// 团购:各波次的订单数(total_orders / order_count)累加
this.waveTotalOrders = this.scanOrderList.reduce(
(sum, row) =>
sum +
(Number(
this.getRowValue(row, ['total_orders', 'totalOrders', 'order_count', 'orderCount'])
) || 0),
0
)
}
// 剩余未复核数:前端统计并排除拦截/已拦截订单
this.waveUnreviewedCount = this.countUnreviewedExcludingIntercepted(list)
this.clearSelection()
@ -4465,6 +4482,13 @@ export default {
}
this.selectedPendingOrderKey = ''
this.selectedOrderNo = this.getRowValue(wave, ['wave_no', 'waveNo']) || ''
// 篮号:团购 pick_mode=1 时优先取波次 box_no(data.list[x].box_no),缺失兜底 wave_index
const wavePickMode = Number(this.getRowValue(wave, ['pick_mode', 'pickMode']))
const waveBoxNo = this.getRowValue(wave, ['box_no', 'boxNo'])
this.selectedWaveIndex =
wavePickMode === 1 && waveBoxNo !== ''
? waveBoxNo
: this.getRowValue(wave, ['wave_index', 'waveIndex'])
this.selectedItemsWeight = this.getRowValue(wave, ['items_weight', 'itemsWeight'])
const pkg = this.resolveSuggestedPackageMaterial(wave)
this.selectedPackageMaterial = pkg ? this.formatPackageMaterial(pkg) : null
@ -5149,10 +5173,16 @@ export default {
.cell-pack-value {
color: var(--wms-danger-strong);
background-color: #fdecea;
}
/* 已扫行(绿底白字)也统一显示:打包要求值保持红字 + 浅红底 */
/* 仅文字本身带浅红底(高亮),单元格不整列浅红 */
.cell-pack-value-inner {
background-color: #fdecea;
border-radius: 0.04rem;
padding: 0.02rem 0.06rem;
}
/* 已扫行(绿底白字)也统一显示:复核要求值保持红字 */
.detail-row--scanned .cell-pack-value {
color: var(--wms-danger-strong);
}
@ -6069,6 +6099,12 @@ export default {
background-color: #f6f8fc;
}
/* 波次行选中态:.wave-group-header 的底色声明在 .table-row--selected 之后,
会覆盖选中高亮,这里显式提高优先级,保证首个/被点击波次选中后仍显示高亮 */
.wave-group-header.table-row--selected {
background-color: #a6c8ff;
}
.wave-group-header:active {
background-color: #d6e8ff;
}
@ -6386,6 +6422,11 @@ export default {
white-space: nowrap;
}
.detail-tab-tag--orange {
color: var(--wms-warning);
background-color: #fff3e6;
}
.detail-tab-summary {
flex-shrink: 0;
font-size: 0.18rem;