yyb
2026-02-02 d909ca171564419745daf3bf730f119802873833
pages/wareHouse/nuclearScale/nuclearscalerecord.vue
@@ -244,12 +244,23 @@
  },
  computed: {
    // 计算核磅重量总和
    totalVerificationWeight() {
      return this.list.reduce((sum, item) => {
        const weight = parseFloat(item.verificationWeight) || 0;
        return sum + weight;
      }, 0);
    },
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(