fix: sync PDA picking actions immediately
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
:class="itemState(item)"
|
||||
>
|
||||
<view class="pick-item-row1">
|
||||
<text class="pick-item-sku">{{ isSealedPalletItem(item) ? '整托拣货' : '拣货明细' }}</text>
|
||||
<text class="pick-item-sku">{{ isSealedPalletItem(item) ? item.palletNo : '拣货明细' }}</text>
|
||||
<view class="pick-item-meta">
|
||||
<text v-if="itemState(item) === ITEM_STATUS.PICKED" class="pick-status-tag tag-picked">已拣 ✓</text>
|
||||
<text v-else-if="itemState(item) === ITEM_STATUS.PARTIAL" class="pick-status-tag tag-partial">
|
||||
@@ -99,7 +99,7 @@
|
||||
</view>
|
||||
|
||||
<view v-if="itemState(item) === ITEM_STATUS.PENDING && isSealedPalletItem(item)" class="pick-item-actions">
|
||||
<text class="version-hint">扫描托盘码 {{ item.palletNo }} 或托内任一箱码,确认整托装柜</text>
|
||||
<button class="pick-btn pick-btn-confirm" @tap="pickItem(item.id)">确认整托拣出</button>
|
||||
</view>
|
||||
<view v-else-if="itemState(item) === ITEM_STATUS.PENDING" class="pick-item-actions">
|
||||
<button class="pick-btn pick-btn-confirm" @tap="pickItem(item.id)">确认拣出</button>
|
||||
@@ -970,8 +970,8 @@
|
||||
const reason = this.itemState(item) === ITEM_STATUS.SKIPPED && item.skipReason
|
||||
? ` · ${item.skipReason}`
|
||||
: ''
|
||||
const pallet = isSealedPalletItem(item) && item.palletNo ? `${item.palletNo} · ` : ''
|
||||
return `${pallet}${item.desc}${reason}`
|
||||
const inbound = isSealedPalletItem(item) && item.inboundCode ? `${item.inboundCode} · ` : ''
|
||||
return `${inbound}${item.desc}${reason}`
|
||||
},
|
||||
async processScannedValue(scanValue, source = 'broadcast') {
|
||||
if (!this.requirePickingOperation()) return
|
||||
@@ -1452,14 +1452,24 @@
|
||||
this.partialQuantities = { ...this.partialQuantities, [item.id]: plannedCount }
|
||||
this.itemStates = { ...this.itemStates, [item.id]: ITEM_STATUS.PICKED }
|
||||
this.recordScanResult('success', '整托扫描成功', palletNo, `已定位托盘 ${item.palletNo} · 共 ${plannedCount} 箱`)
|
||||
this.showToast(`托盘 ${item.palletNo} 已确认装柜`, 'success')
|
||||
this.showToast(`托盘 ${item.palletNo} 已确认整托拣出`, 'success')
|
||||
this.persistSession()
|
||||
return true
|
||||
},
|
||||
async pickItem(id, source = 'manual') {
|
||||
if (!this.requirePickingOperation()) return
|
||||
const item = this.currentBox.items.find((entry) => entry.id === id)
|
||||
if (isSealedPalletItem(item)) { this.showToast(`已封托货物必须扫描托盘码 ${item.palletNo}`, 'warning'); return }
|
||||
if (isSealedPalletItem(item)) {
|
||||
const submitted = await this.submitImmediateItemAction(item, 'PICK_PALLET', { palletNo: item.palletNo })
|
||||
if (!submitted) return
|
||||
const plannedCount = Number(item.qty || 0)
|
||||
this.scannedBoxCodes = { ...this.scannedBoxCodes, [item.palletNo]: item.id }
|
||||
this.partialQuantities = { ...this.partialQuantities, [item.id]: plannedCount }
|
||||
this.itemStates = { ...this.itemStates, [item.id]: ITEM_STATUS.PICKED }
|
||||
this.showToast(`托盘 ${item.palletNo} 已确认整托拣出`, 'success')
|
||||
this.persistSession()
|
||||
return
|
||||
}
|
||||
const available = this.availablePickQuantity(item)
|
||||
if (available !== null && available < Number(item.qty || 0)) { this.showToast(`库存/库位可用量不足:可拣 ${available}`, 'error'); return }
|
||||
const remaining = Number(item?.qty || 0) - Number(item?.pickedPackageCount || 0)
|
||||
@@ -1641,7 +1651,7 @@
|
||||
this.remoteError = ''
|
||||
const pendingPallet = this.currentBox.items.find((item) => isSealedPalletItem(item) && this.itemState(item) !== ITEM_STATUS.PICKED)
|
||||
if (pendingPallet) {
|
||||
this.remoteError = `请扫描托盘码 ${pendingPallet.palletNo} 或托内任一箱码后再提交`
|
||||
this.remoteError = `请扫描托盘码 ${pendingPallet.palletNo}、托内任一箱码,或点击“确认整托拣出”后再提交`
|
||||
this.showToast(this.remoteError, 'warning')
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user