| pages/wareHouse/nuclearScale/nuclearscalerecord.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
pages/wareHouse/nuclearScale/nuclearscalerecord.vue
@@ -245,11 +245,22 @@ computed: { // 计算核磅重量总和 totalVerificationWeight() { const processedBatches = new Set(); // 用于记录已经处理过的batchNo return this.list.reduce((sum, item) => { // 如果这个batchNo已经处理过,直接返回当前总和(跳过) if (processedBatches.has(item.batchNo)) { return sum; } // 标记这个batchNo为已处理 processedBatches.add(item.batchNo); // 计算权重并累加 const weight = parseFloat(item.verificationWeight) || 0; return sum + weight; }, 0); }, } }, onLoad(options) { this.verificationNo = JSON.parse(