| | |
| | | } |
| | | }); |
| | | }; |
| | | const formattedNumber = tableAmountFormatter; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | const val = Number(cellValue); |
| | | if (Number.isNaN(val) || val === null || val === undefined || val === '') return '0.00'; |
| | | return val.toFixed(2); |
| | | }; |
| | | // 主表合计方法 |
| | | const summarizeMainTable = param => { |
| | | return proxy.summarizeTable( |
| | |
| | | buildAmountSummaryFormat( |
| | | ["contractAmounts", "shippedAmount", "unshippedAmount"], |
| | | { |
| | | ticketsNum: { noDecimal: true }, |
| | | futureTickets: { noDecimal: true }, |
| | | contractAmounts: { decimalPlaces: 2 }, |
| | | shippedAmount: { decimalPlaces: 2 }, |
| | | unshippedAmount: { decimalPlaces: 2 }, |
| | | } |
| | | ) |
| | | ); |
| | |
| | | buildAmountSummaryFormat( |
| | | ["contractAmount", "shippedAmount", "unshippedAmount"], |
| | | { |
| | | ticketsNum: { noDecimal: true }, |
| | | futureTickets: { noDecimal: true }, |
| | | contractAmount: { decimalPlaces: 2 }, |
| | | shippedAmount: { decimalPlaces: 2 }, |
| | | unshippedAmount: { decimalPlaces: 2 }, |
| | | } |
| | | ) |
| | | ); |