| | |
| | | } else { |
| | | // 默认保留两位小数 |
| | | sums[index] = parseFloat(sum).toFixed( |
| | | specialFormat[prop]?.decimalPlaces ?? 5 |
| | | specialFormat[prop]?.decimalPlaces ?? 2 |
| | | ); |
| | | } |
| | | } else { |
| | |
| | | // 不含税总价计算 |
| | | const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => { |
| | | const taxRateDecimal = taxRate / 100; |
| | | return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(5); |
| | | return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2); |
| | | }; |
| | | // 含税总价计算 |
| | | const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => { |
| | | return (taxInclusiveUnitPrice * quantity).toFixed(5); |
| | | return (taxInclusiveUnitPrice * quantity).toFixed(2); |
| | | }; |
| | | // 导出函数供其他文件使用 |
| | | export { |
| | |
| | | label: "含税单价(元)", |
| | | prop: "taxInclusiveUnitPrice", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "含税总价(元)", |
| | | prop: "taxInclusiveTotalPrice", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "不含税总价(元)", |
| | | prop: "taxExclusiveTotalPrice", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "本次来票金额(元)", |
| | | prop: "ticketsAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "未来票数", |
| | |
| | | label: "未来票金额(元)", |
| | | prop: "futureTicketsAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(2) : "-"; |
| | | }, |
| | | }, |
| | | ], |
| | | {}, |
| | |
| | | label: "含税单价(元)", |
| | | prop: "taxInclusiveUnitPrice", |
| | | width: 150, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "含税总价(元)", |
| | | prop: "taxInclusiveTotalPrice", |
| | | width: 150, |
| | | formatData: (val) => { |
| | | return parseFloat(val).toFixed(5) ?? 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "不含税总价(元)", |
| | | prop: "taxExclusiveTotalPrice", |
| | | width: 150, |
| | | formatData: (val) => { |
| | | return parseFloat(val).toFixed(5) ?? 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "本次来票数", |
| | |
| | | label: "合同金额(元)", |
| | | prop: "contractAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "已来票金额(元)", |
| | | prop: "receiptPaymentAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "待来票金额(元)", |
| | | prop: "unReceiptPaymentAmount", |
| | | width:200, |
| | | formatData: (val) => { |
| | | return val ? parseFloat(val).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | // { |
| | | // fixed: "right", |
| | |
| | | { |
| | | label: "发票金额(元)", |
| | | prop: "invoiceAmount", |
| | | formatData: (params) => { |
| | | return params ? parseFloat(params).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "已付款金额(元)", |
| | | prop: "paymentAmountTotal", |
| | | formatData: (params) => { |
| | | return params ? parseFloat(params).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "待付款金额(元)", |
| | | prop: "unPaymentAmountTotal", |
| | | formatData: (params) => { |
| | | return params ? parseFloat(params).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "录入人", |
| | |
| | | { |
| | | label: "付款金额", |
| | | prop: "currentPaymentAmount", |
| | | formatData: (params) => { |
| | | return params ? parseFloat(params).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "付款方式", |
| | |
| | | > |
| | | <template #payableAmountSlot="{ row }"> |
| | | <el-text type="danger"> |
| | | {{ parseFloat(row.payableAmount).toFixed(5) }} |
| | | {{ parseFloat(row.payableAmount).toFixed(2) }} |
| | | </el-text> |
| | | </template> |
| | | </PIMTable> |
| | |
| | | label: "发票金额(元)", |
| | | prop: "invoiceAmount", |
| | | width: 200, |
| | | formatData: (params) => { |
| | | return params ? parseFloat(params).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "付款金额(元)", |
| | | prop: "currentPaymentAmount", |
| | | width: 200, |
| | | formatData: (params) => { |
| | | return params ? parseFloat(params).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "应付金额(元)", |
| | |
| | | summarizeTable[summarizeTable.length - 1] = |
| | | originalTableDataSon.value[ |
| | | originalTableDataSon.value.length - 1 |
| | | ].payableAmount.toFixed(5); |
| | | ].payableAmount.toFixed(2); |
| | | } else { |
| | | summarizeTable[summarizeTable.length - 1] = 0.0; |
| | | } |
| | |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (column.property !== "supplierName") { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | } else { |
| | | return cellValue; |
| | | } |
| | |
| | | label: "合同金额(元)", |
| | | prop: "taxInclusiveTotalPrice", |
| | | width: 200, |
| | | formatData: (cell) => { |
| | | return cell ? parseFloat(cell).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "来票日期", |
| | |
| | | label: "开票金额", |
| | | prop: "ticketsAmount", |
| | | width: 200, |
| | | formatData: (cell) => { |
| | | return cell ? parseFloat(cell).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "不含税金额", |
| | | prop: "unTicketsPrice", |
| | | width: 200, |
| | | formatData: (cell) => { |
| | | return cell ? parseFloat(cell).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "增值税", |
| | |
| | | }; |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | |
| | | const matchFileType = ref(["pdf"]); |
| | | const uploadModal = ref(false); |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | const formatDate = (row, column, cellValue) => { |
| | | return dayjs(cellValue).format("YYYY-MM-DD HH:mm:ss"); |
| | |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (cellValue == 0) { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | } |
| | | if (cellValue) { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | } else { |
| | | return cellValue; |
| | | } |
| | | }; |
| | | |
| | | const formattedInputNumber = (value) => { |
| | | return value ? parseFloat(value).toFixed(5) : 0; |
| | | return value ? parseFloat(value).toFixed(2) : 0; |
| | | }; |
| | | |
| | | // 查询列表 |
| | |
| | | const { receipt_payment_type } = proxy.useDict("receipt_payment_type"); |
| | | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | |
| | | const getStatusTagType = (statusName = '') => { |
| | |
| | | label: "回款金额(元)", |
| | | prop: "receiptPaymentAmount", |
| | | width:200, |
| | | formatData: (params) => { |
| | | return params ? parseFloat(params).toFixed(5) : 0; |
| | | }, |
| | | }, |
| | | { |
| | | label: "回款方式", |
| | |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | // 主表合计方法 |
| | | const summarizeMainTable = (param) => { |
| | |
| | | (item) => item.id == customerId.value |
| | | ); |
| | | summarizeTable[summarizeTable.length - 1] = |
| | | tableData.value[index].unReceiptPaymentAmount.toFixed(5); |
| | | tableData.value[index].unReceiptPaymentAmount.toFixed(2); |
| | | } else { |
| | | summarizeTable[summarizeTable.length - 1] = 0.0; |
| | | } |
| | |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(5); |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | // 获取tree子数据 |
| | | const getModels = (value) => { |