fix:禅道218

This commit is contained in:
shijing 2025-12-05 14:18:02 +08:00
parent 1e4e7c0459
commit 086c7a2a6b
1 changed files with 21 additions and 10 deletions

View File

@ -13,6 +13,8 @@
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="产品" prop="物料名" fixed="left" width="120">
</el-table-column>
<el-table-column label="总数" prop="总数" fixed="left" width="80">
</el-table-column>
<el-table-column v-for="item in lists" :key="item" :label="item">
<template #default="scope">
<span v-if="scope.row[item]">{{ scope.row[item] }}</span>
@ -67,6 +69,15 @@ export default {
}
}
})
data2.forEach(item=>{
let total = 0;
that.lists.forEach(list=>{
if(item[list]){
total+= item[list];
}
})
item['总数']= total;
})
that.tableData = data2;
});
},