fix(outbound): fix row-key collision causing UI select-all bug and false duplicate warnings in stock selection
This commit is contained in:
BIN
deploy.tar.gz
BIN
deploy.tar.gz
Binary file not shown.
@ -452,7 +452,11 @@ const loadStockList = async () => {
|
|||||||
pageSize: stockPageSize.value,
|
pageSize: stockPageSize.value,
|
||||||
keyword: searchKeyword.value.trim()
|
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
|
stockTotal.value = res.data?.total || 0
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ElMessage.error('加载库存列表失败')
|
ElMessage.error('加载库存列表失败')
|
||||||
|
|||||||
Reference in New Issue
Block a user