|
|
|
@ -56,8 +56,8 @@ |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 取消组盘按钮(只有发送了组盘任务才显示)- rqrq --> |
|
|
|
<div class="button-row"> |
|
|
|
<!-- 取消组盘按钮(已组盘且不在wcs_location/输送线禁操作状态时显示)- rqrq --> |
|
|
|
<div v-if="showCancelButton" class="button-row"> |
|
|
|
<button |
|
|
|
class="action-btn primary" |
|
|
|
@click="handleCancelWcsPallet" |
|
|
|
@ -66,7 +66,7 @@ |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 移出全部物料按钮(只有未发送组盘任务且未被调用且有明细才显示)- rqrq --> |
|
|
|
<!-- 移出全部物料按钮(未组盘+未调用+有明细且不在wcs_location/输送线时显示)- rqrq --> |
|
|
|
<div v-if="showRemoveAllButton" class="button-row"> |
|
|
|
<button |
|
|
|
class="action-btn warning" |
|
|
|
@ -141,9 +141,13 @@ export default { |
|
|
|
palletCode: '', |
|
|
|
palletScanned: false, |
|
|
|
palletInfo: { |
|
|
|
locationCode: '', |
|
|
|
wcsLocation: '', |
|
|
|
area: '', |
|
|
|
callingFlag: '', |
|
|
|
canOperate: '', |
|
|
|
isEmpty: '' |
|
|
|
isEmpty: '', |
|
|
|
hasSentWcsTask: '' |
|
|
|
}, |
|
|
|
|
|
|
|
// 按钮显示控制 - rqrq |
|
|
|
@ -201,8 +205,10 @@ export default { |
|
|
|
// isEmpty字段存储showRemoveAllButton(是否显示移出全部物料按钮)- rqrq |
|
|
|
this.showRemoveAllButton = data.row.isEmpty === 'Y'; |
|
|
|
|
|
|
|
// 计算hasSentWcsTask(是否发送组盘任务)用于显示 - rqrq |
|
|
|
this.hasSentWcsTask = this.showCancelButton; |
|
|
|
// hasSentWcsTask优先使用后端原始标记,避免按钮被隐藏时误显示“未组盘” - rqrq |
|
|
|
this.hasSentWcsTask = data.row.hasSentWcsTask |
|
|
|
? data.row.hasSentWcsTask === 'Y' |
|
|
|
: this.showCancelButton; |
|
|
|
|
|
|
|
// 加载栈板明细 - rqrq |
|
|
|
this.loadPalletDetails(); |
|
|
|
@ -260,8 +266,29 @@ export default { |
|
|
|
this.detailModalVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
|
// 取消组盘/一键移出的前端防呆提示:与后端同口径拦截wcs_location与输送线状态 - rqrq |
|
|
|
resolveManualOperationBlockedMessage() { |
|
|
|
const wcsLocation = (this.palletInfo.wcsLocation || '').trim(); |
|
|
|
if (wcsLocation) { |
|
|
|
return `当前栈板wcs_location有值(${wcsLocation}),不允许取消组盘或一键移出。`; |
|
|
|
} |
|
|
|
const locationCode = (this.palletInfo.locationCode || '').trim(); |
|
|
|
const isConveyor = locationCode.toUpperCase() === 'VIRTUAL_AS' || locationCode === '立库输送线'; |
|
|
|
if (isConveyor) { |
|
|
|
return '当前栈板位于输送线,不允许取消组盘或一键移出。'; |
|
|
|
} |
|
|
|
return ''; |
|
|
|
}, |
|
|
|
|
|
|
|
// 取消组盘 - rqrq |
|
|
|
handleCancelWcsPallet() { |
|
|
|
const blockedMessage = this.resolveManualOperationBlockedMessage(); |
|
|
|
if (blockedMessage) { |
|
|
|
this.$alert(blockedMessage, '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$confirm('确定要取消组盘吗?取消后需要重新组盘才能推送到WCS。', '确认操作', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -298,6 +325,13 @@ export default { |
|
|
|
|
|
|
|
// 移出全部物料 - rqrq |
|
|
|
handleRemoveAllMaterials() { |
|
|
|
const blockedMessage = this.resolveManualOperationBlockedMessage(); |
|
|
|
if (blockedMessage) { |
|
|
|
this.$alert(blockedMessage, '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$confirm('确定要移出栈板上的全部物料吗?此操作不可恢复!', '确认操作', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -337,9 +371,13 @@ export default { |
|
|
|
this.palletCode = ''; |
|
|
|
this.palletScanned = false; |
|
|
|
this.palletInfo = { |
|
|
|
locationCode: '', |
|
|
|
wcsLocation: '', |
|
|
|
area: '', |
|
|
|
callingFlag: '', |
|
|
|
canOperate: '', |
|
|
|
isEmpty: '' |
|
|
|
isEmpty: '', |
|
|
|
hasSentWcsTask: '' |
|
|
|
}; |
|
|
|
this.hasSentWcsTask = false; |
|
|
|
this.showCancelButton = false; |
|
|
|
|