|
|
|
@ -30,6 +30,9 @@ |
|
|
|
spellcheck="false" |
|
|
|
ref="palletInput" |
|
|
|
/> |
|
|
|
<button class="action-btn secondary" style="flex: 0.25; margin: 0;" @click="handleFinishSorting" :disabled="finishSortingLoading"> |
|
|
|
{{ finishSortingLoading ? '处理中...' : '结束分拣' }} |
|
|
|
</button> |
|
|
|
<!-- <button--> |
|
|
|
<!-- class="action-btn secondary"--> |
|
|
|
<!-- style="flex: 0.25; margin: 0;"--> |
|
|
|
@ -432,7 +435,8 @@ import { |
|
|
|
getAvailableAgvStations, |
|
|
|
callPalletToStation, |
|
|
|
completePalletAssemblyForFenJian, |
|
|
|
getAvailablePositionsForLayer |
|
|
|
getAvailablePositionsForLayer, |
|
|
|
finishSorting |
|
|
|
} from '../../../api/automatedWarehouse/palletPacking' |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -502,6 +506,7 @@ export default { |
|
|
|
editPositionLoading: false, // 修改位置按钮 |
|
|
|
callPalletLoading: false, // Call栈板按钮 |
|
|
|
completeAssemblyLoading: false, // 完成组托按钮 |
|
|
|
finishSortingLoading: false, // 结束分拣按钮 - rqrq |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -1447,6 +1452,56 @@ export default { |
|
|
|
showDetailModal(){ |
|
|
|
this.detailModalVisible=true; |
|
|
|
}, |
|
|
|
|
|
|
|
// 结束分拣按钮点击事件 - rqrq |
|
|
|
handleFinishSorting() { |
|
|
|
if (!this.palletCode) { |
|
|
|
this.$message.error('请先扫描栈板'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查是否有栈板明细 |
|
|
|
// if (!this.detailList || this.detailList.length === 0) { |
|
|
|
// this.$message.error('栈板明细为空,无法结束分拣'); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
|
|
|
|
// 确认操作 - rqrq |
|
|
|
this.$confirm('确认结束分拣并将栈板送至缓存区(Z104)吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.doFinishSorting(); |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消 |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 执行结束分拣 - rqrq |
|
|
|
doFinishSorting() { |
|
|
|
// 设置loading状态,防止重复点击 - rqrq |
|
|
|
this.finishSortingLoading = true; |
|
|
|
|
|
|
|
finishSorting({ |
|
|
|
site: this.site, |
|
|
|
palletId: this.palletCode |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('结束分拣成功,已创建送货任务'); |
|
|
|
// 清空页面数据,初始化页面 - rqrq |
|
|
|
this.resetPage(); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '结束分拣失败'); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('结束分拣失败:', error); |
|
|
|
this.$message.error('结束分拣失败'); |
|
|
|
}).finally(() => { |
|
|
|
// 无论成功或失败,都要恢复按钮状态 - rqrq |
|
|
|
this.finishSortingLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
|