|
|
|
@ -191,7 +191,7 @@ |
|
|
|
|
|
|
|
<!-- 底部操作按钮 --> |
|
|
|
<div class="bottom-actions" v-if="scannedItems.length > 0 || targetLocationId"> |
|
|
|
<button class="action-btn secondary" @click="processFlag = 1"> |
|
|
|
<button class="action-btn secondary" @click="backToReceiptList"> |
|
|
|
回退 |
|
|
|
</button> |
|
|
|
<button class="action-btn primary" @click="confirmStorage"> |
|
|
|
@ -275,8 +275,7 @@ export default { |
|
|
|
if (this.processFlag === 1) { |
|
|
|
this.$router.back(); |
|
|
|
} else if (this.processFlag === 2) { |
|
|
|
this.processFlag = 1; |
|
|
|
this.resetData(); |
|
|
|
this.backToReceiptList(); |
|
|
|
} else { |
|
|
|
this.processFlag = 1; |
|
|
|
} |
|
|
|
@ -332,8 +331,16 @@ export default { |
|
|
|
this.scanCode = ''; |
|
|
|
}, |
|
|
|
|
|
|
|
// 回退到接收记录列表。页面实例不销毁,必须清掉本次已扫 HU,否则再进另一行会把旧 HU 一起提交 |
|
|
|
backToReceiptList() { |
|
|
|
this.processFlag = 1; |
|
|
|
this.resetData(); |
|
|
|
}, |
|
|
|
|
|
|
|
// 选择接收记录项目 |
|
|
|
selectReceiptItem(item) { |
|
|
|
// 再次进入同样复用当前页,先丢掉上一条接收记录扫过的 HU、库位和移除模式 |
|
|
|
this.clearScanSession(); |
|
|
|
this.selectedReceipt = { ...item }; |
|
|
|
this.processFlag = 2; |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -626,15 +633,20 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 重置数据 |
|
|
|
resetData() { |
|
|
|
this.selectedReceipt = {}; |
|
|
|
// 只清扫描会话,保留接收记录列表,供回退后再次进入另一行 |
|
|
|
clearScanSession() { |
|
|
|
this.scannedItems = []; |
|
|
|
this.targetLocationId = ''; |
|
|
|
this.isRemoveMode = false; |
|
|
|
this.scanCode = ''; |
|
|
|
}, |
|
|
|
|
|
|
|
// 重置数据 |
|
|
|
resetData() { |
|
|
|
this.selectedReceipt = {}; |
|
|
|
this.clearScanSession(); |
|
|
|
}, |
|
|
|
|
|
|
|
// 格式化日期 |
|
|
|
formatDate(date) { |
|
|
|
if (!date) return ''; |
|
|
|
|