fix(outbound): fix row-key collision causing UI select-all bug and false duplicate warnings in stock selection
This commit is contained in:
@ -452,7 +452,11 @@ const loadStockList = async () => {
|
||||
pageSize: stockPageSize.value,
|
||||
keyword: searchKeyword.value.trim()
|
||||
})
|
||||
stockList.value = res.data?.list || []
|
||||
// 为每个item添加uniqueKey,确保row-key唯一
|
||||
stockList.value = (res.data?.list || []).map((item: any) => ({
|
||||
...item,
|
||||
uniqueKey: `${item.type}_${item.id}`
|
||||
}))
|
||||
stockTotal.value = res.data?.total || 0
|
||||
} catch (e) {
|
||||
ElMessage.error('加载库存列表失败')
|
||||
|
||||
Reference in New Issue
Block a user