| | |
| | | <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" /> |
| | | <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" /> |
| | | <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" /> |
| | | <el-table-column label="开票数" prop="invoiceNum" /> |
| | | <el-table-column label="开票数" prop="invoiceNum" :formatter="formattedNumber" /> |
| | | <el-table-column label="开票金额(元)" prop="invoiceAmount" :formatter="formattedNumber" /> |
| | | <el-table-column label="未开票数" prop="noInvoiceNum" /> |
| | | <el-table-column label="未开票数" prop="noInvoiceNum" :formatter="formattedNumber" /> |
| | | <el-table-column label="未开票金额(元)" prop="noInvoiceAmount" :formatter="formattedNumber"/> |
| | | </el-table> |
| | | </template> |
| | |
| | | const { searchForm, form, rules } = toRefs(data) |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (cellValue == 0) { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | } |
| | | if (cellValue) { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | } else { |
| | |
| | | // 计算本次开票金额 |
| | | row.currentInvoiceAmount = (row.currentInvoiceNum * row.taxInclusiveUnitPrice).toFixed(2) |
| | | // 计算未开票数 |
| | | row.noInvoiceNum = row.originalNoInvoiceNum - row.currentInvoiceNum |
| | | row.noInvoiceNum = (row.originalNoInvoiceNum - row.currentInvoiceNum).toFixed(2) |
| | | // 计算未开票金额 |
| | | row.noInvoiceAmount = row.tempnoInvoiceAmount - row.currentInvoiceAmount |
| | | row.noInvoiceAmount = (row.tempnoInvoiceAmount - row.currentInvoiceAmount).toFixed(2) |
| | | } |
| | | // 本次开票金额失焦操作 |
| | | const invoiceAmountBlur = (row) => { |
| | |
| | | } |
| | | // 计算本次开票数 |
| | | row.currentInvoiceNum = (row.currentInvoiceAmount / row.taxInclusiveUnitPrice).toFixed(2) |
| | | console.log('row.currentInvoiceNum ',row.currentInvoiceNum ) |
| | | console.log(' row.originalNoInvoiceNum ', row.originalNoInvoiceNum ) |
| | | // 计算未开票数 |
| | | row.noInvoiceNum = row.originalNoInvoiceNum - row.currentInvoiceNum |
| | | row.noInvoiceNum = (row.originalNoInvoiceNum - row.currentInvoiceNum).toFixed(2) |
| | | // 计算未开票金额 |
| | | row.noInvoiceAmount = row.tempnoInvoiceAmount - row.currentInvoiceAmount |
| | | row.noInvoiceAmount = (row.tempnoInvoiceAmount - row.currentInvoiceAmount).toFixed(2) |
| | | } |
| | | |
| | | getList() |