| | |
| | | align="right" |
| | | > |
| | | <template #default="scope"> |
| | | {{ Number(scope.row.totalAmount ?? 0).toFixed(6) }} |
| | | {{ trimZeros(scope.row.totalAmount, 6) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="120" align="center"> |
| | |
| | | <td>{{ product.productCategory || "" }}</td> |
| | | <td>{{ product.specificationModel || "" }}</td> |
| | | <td>{{ product.unit || "" }}</td> |
| | | <td>{{ product.taxInclusiveUnitPrice || "0" }}</td> |
| | | <td>{{ product.quantity || "0" }}</td> |
| | | <td>{{ product.taxInclusiveTotalPrice || "0" }}</td> |
| | | <td>{{ trimZeros(product.taxInclusiveUnitPrice, 6) }}</td> |
| | | <td>{{ trimZeros(product.quantity, 6) }}</td> |
| | | <td> |
| | | {{ trimZeros(product.taxInclusiveTotalPrice, 6) }} |
| | | </td> |
| | | </tr> |
| | | <tr v-if="!item.products || item.products.length === 0"> |
| | | <td colspan="6" style="text-align: center; color: #999"> |
| | |
| | | import FileUpload from "@/components/AttachmentUpload/file/index.vue"; |
| | | import ImageUpload from "@/components/AttachmentUpload/image/index.vue"; |
| | | import { getCurrentDate } from "@/utils/index.js"; |
| | | import { trimZeros } from "@/utils/formatNumber.js"; |
| | | import { listCustomer } from "@/api/basicData/customer.js"; |
| | | |
| | | const FileList = defineAsyncComponent(() => |
| | |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | if (cellValue === undefined || cellValue === null || cellValue === "") { |
| | | return "0.000000"; |
| | | } |
| | | return parseFloat(cellValue).toFixed(6); |
| | | return trimZeros(cellValue, 6); |
| | | }; |
| | | const findLedgerRecordByRow = (row) => { |
| | | if (!row) return null; |
| | |
| | | param, |
| | | ["contractAmount", "taxInclusiveTotalPrice", "taxExclusiveTotalPrice"], |
| | | { |
| | | contractAmount: { decimalPlaces: 6 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | contractAmount: { decimalPlaces: 6, trimZeros: true }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6, trimZeros: true }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6, trimZeros: true }, |
| | | } |
| | | ); |
| | | }; |
| | |
| | | "taxExclusiveTotalPrice", |
| | | ], |
| | | { |
| | | taxInclusiveUnitPrice: { decimalPlaces: 6 }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6 }, |
| | | taxInclusiveUnitPrice: { decimalPlaces: 6, trimZeros: true }, |
| | | taxInclusiveTotalPrice: { decimalPlaces: 6, trimZeros: true }, |
| | | taxExclusiveTotalPrice: { decimalPlaces: 6, trimZeros: true }, |
| | | } |
| | | ); |
| | | }; |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.quantity) || 0); |
| | | }, 0); |
| | | return total.toFixed(6); |
| | | return trimZeros(total, 6); |
| | | }; |
| | | |
| | | // 计算产品总金额 |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0); |
| | | }, 0); |
| | | return total.toFixed(6); |
| | | return trimZeros(total, 6); |
| | | }; |
| | | |
| | | // 用于打印的计算函数 |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.quantity) || 0); |
| | | }, 0); |
| | | return total.toFixed(6); |
| | | return trimZeros(total, 6); |
| | | }; |
| | | |
| | | const getTotalAmountForPrint = (products) => { |
| | |
| | | const total = products.reduce((sum, product) => { |
| | | return sum + (parseFloat(product.taxInclusiveTotalPrice) || 0); |
| | | }, 0); |
| | | return total.toFixed(6); |
| | | return trimZeros(total, 6); |
| | | }; |
| | | |
| | | const mathNum = () => { |