| | |
| | | import { QuestionFilled, TrendCharts, Sell } from "@element-plus/icons-vue"; |
| | | import Echarts from "@/components/Echarts/echarts.vue"; |
| | | import { accountStatementDetailsByMonth } from "@/api/financialManagement/financialStatements"; |
| | | import { toFixedNumber } from "@/utils/formatNumber.js"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | }, |
| | | ]); |
| | | const barYAxis = [{ type: "value", name: "金额 (元)" }]; |
| | | const barTooltip = { trigger: "axis", axisPointer: { type: "shadow" } }; |
| | | const barTooltip = { |
| | | trigger: "axis", |
| | | axisPointer: { type: "shadow" }, |
| | | valueFormatter: value => formatMoney(value), |
| | | }; |
| | | const barSeries = computed(() => [ |
| | | { |
| | | name: "应收账款", |
| | |
| | | }, |
| | | ]); |
| | | const trendYAxis = [{ type: "value", name: "金额 (元)" }]; |
| | | const trendTooltip = { trigger: "axis" }; |
| | | const trendTooltip = { |
| | | trigger: "axis", |
| | | valueFormatter: value => formatMoney(value), |
| | | }; |
| | | const trendSeries = computed(() => [ |
| | | { |
| | | name: "总营收", |
| | |
| | | ]); |
| | | |
| | | // --- 公用逻辑 --- |
| | | // 金额统一按 2 位小数展示(不受接口返回精度影响) |
| | | const formatMoney = val => { |
| | | return val; |
| | | return toFixedNumber(val, 2); |
| | | }; |
| | | |
| | | const handleDateChange = val => { |