fix(stocktake): remove duplicate stats declaration causing compiler error

This commit is contained in:
DXC
2026-03-26 17:47:40 +08:00
parent 2a27f2e0df
commit edb49468a0

View File

@ -493,18 +493,8 @@ const fetchAllStockItems = async () => {
}
}
// 过滤已在 fetchInventoryList 中处理,此处不再需要 computed
// const filteredListData = computed(() => {
// let items = [...listData.value]
//
// if (listStatusFilter.value === 'counted') {
// items = items.filter(item => item.quantity > 0)
// } else if (listStatusFilter.value === 'uncounted') {
// items = items.filter(item => !item.quantity || item.quantity === 0)
// }
//
// return items
// })
// 过滤后的列表数据(直接使用已过滤的 listData
const filteredListData = computed(() => listData.value)
// 统计信息:从全量应盘物资中计算
const stats = computed(() => {
@ -1003,15 +993,6 @@ const exportToExcel = async () => {
}
}
const stats = computed(() => {
const total = tableData.value.length
const scanned = tableData.value.filter(i => i.scanned).length
const varianceItems = tableData.value.filter(i =>
!i.scanned || (i.scanned && i.qty_actual !== parseFloat(i.qty_stock as any))
).length
return { total, scanned, varianceItems }
})
const varianceList = computed(() => {
return tableData.value
.filter(i => !i.scanned || (i.scanned && i.qty_actual !== parseFloat(i.qty_stock as any)))