| | |
| | | <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) }} |
| | |
| | | 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) |