yuan
8 天以前 1555d7397fa044d95533b62d6ef75f5bcdc3da8f
src/views/procurementManagement/procurementLedger/detail.vue
@@ -61,14 +61,14 @@
        <el-table-column label="数量" prop="quantity" />
        <el-table-column label="库存预留数量" prop="stockReservedQuantity" />
        <el-table-column label="税率(%)" prop="taxRate" />
        <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" width="150" />
        <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormattedNumber" width="150" />
        <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" width="150" />
        <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" width="150" />
        <template #append>
          <div class="summary-row" v-if="productData.length > 0">
            <div class="summary-label">合计</div>
            <div class="summary-value" style="width: 150px">
              {{ formattedNumber(null, null, sumTaxInclusiveUnitPrice) }}
              {{ unitPriceFormattedNumber(null, null, sumTaxInclusiveUnitPrice) }}
            </div>
            <div class="summary-value" style="width: 150px">
              {{ formattedNumber(null, null, sumTaxInclusiveTotalPrice) }}
@@ -164,6 +164,14 @@
  return cellValue
}
const unitPriceFormattedNumber = (row, column, cellValue) => {
  if (cellValue != null && !isNaN(cellValue)) {
    return Number(cellValue).toFixed(6)
  }
  return cellValue
}
const sumTaxInclusiveUnitPrice = computed(() => {
  return productData.value.reduce((sum, item) => {
    return sum + (Number(item.taxInclusiveUnitPrice) || 0)