| | |
| | | <el-table-column label="录入日期" prop="createTime" width="120" /> |
| | | <el-table-column |
| | | label="含税单价(元)" |
| | | width="150" |
| | | width="200" |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column |
| | | label="含税总价(元)" |
| | | width="150" |
| | | width="200" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column |
| | | label="不含税总价(元)" |
| | | width="150" |
| | | width="200" |
| | | prop="taxExclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | |
| | | :min="0" |
| | | :step="0.1" |
| | | :formatter="formattedNumber" |
| | | width="170" |
| | | width="200" |
| | | > |
| | | <template #default="scope"> |
| | | <el-input-number |
| | |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2) ?? 0; |
| | | return parseFloat(cellValue).toFixed(5) ?? 0; |
| | | }; |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | |
| | | row.ticketsAmount = 0; |
| | | } |
| | | // 计算本次来票数 |
| | | row.ticketsNum = (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(2); |
| | | row.ticketsNum = (row.ticketsAmount / row.taxInclusiveUnitPrice).toFixed(5); |
| | | // 计算未来票数 |
| | | row.futureTickets = row.tempFutureTickets - row.ticketsNum; |
| | | // 计算未来票金额 |
| | |
| | | invoiceAmountTotal += item.ticketsAmount; |
| | | } |
| | | }); |
| | | form.value.invoiceAmount = invoiceAmountTotal.toFixed(2); |
| | | form.value.invoiceAmount = invoiceAmountTotal.toFixed(5); |
| | | } |
| | | |
| | | onMounted(() => { |