diff --git a/ruoyi-ui/src/views/out/outStockoutManage.vue b/ruoyi-ui/src/views/out/outStockoutManage.vue index d1aad87..b3465d4 100644 --- a/ruoyi-ui/src/views/out/outStockoutManage.vue +++ b/ruoyi-ui/src/views/out/outStockoutManage.vue @@ -315,13 +315,17 @@ export default { /** 自动分配按钮操作 */ handleAutoAllot() { if (this.selectedRows.length === 0) { - this.$modal.msgError("请选择至少一条数据") + this.$modal.msgError("请选择一条数据") + return + } + if (this.selectedRows.length > 1) { + this.$modal.msgError("请选择一条数据") return } const stockoutIds = this.selectedRows.map(row => row.stockoutId) console.log("自动分配:", stockoutIds) let data = { - stockoutIds: stockoutIds + stockoutId: stockoutIds } autoAllot(data).then(response => { this.$modal.msgSuccess(response)