format amount split

This commit is contained in:
Timi
2026-09-08 15:21:09 +08:00
parent cbc8197057
commit 74127fc20f
12 changed files with 78 additions and 40 deletions
@@ -14,7 +14,7 @@
import type { EChartsOption } from "echarts";
import GaoChartCard from "@/pages/product/component/GaoChartCard.vue";
import type { GaoSalesOrderConsumptionDailyStatView } from "@/types/GaoChart";
import { buildAxisChartOption, getDailyItem, getNumber } from "@/pages/product/component/chartUtils";
import { buildAxisChartOption, formatChartYuan, getDailyItem, getNumber } from "@/pages/product/component/chartUtils";
defineOptions({
name: "CustomerConsumptionDailyChart"
@@ -46,7 +46,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption {
{
type: "value",
name: "元",
axisLabel: { color: "#52607a" },
axisLabel: { color: "#52607a", formatter: (value: number) => formatChartYuan(value) },
splitLine: { show: false }
}
],
@@ -62,6 +62,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption {
type: "line",
yAxisIndex: 1,
smooth: true,
tooltip: { valueFormatter: value => `${formatChartYuan(Number(value))} 元` },
data: visibleDateTextList.map(dateText => getNumber(getDailyItem(props.list, dateText)?.amount) / 100)
},
{
@@ -69,6 +70,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption {
type: "line",
yAxisIndex: 1,
smooth: true,
tooltip: { valueFormatter: value => `${formatChartYuan(Number(value))} 元` },
data: visibleDateTextList.map(dateText => getNumber(getDailyItem(props.list, dateText)?.cumulativeAmount) / 100)
}
]
@@ -14,7 +14,7 @@
import type { EChartsOption } from "echarts";
import GaoChartCard from "@/pages/product/component/GaoChartCard.vue";
import type { GaoSalesOrderCalendarStatView } from "@/types/GaoChart";
import { buildAxisChartOption, getDailyItem, getNumber } from "@/pages/product/component/chartUtils";
import { buildAxisChartOption, formatChartYuan, getDailyItem, getNumber } from "@/pages/product/component/chartUtils";
defineOptions({
name: "CustomerOrderCalendarChart"
@@ -46,7 +46,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption {
{
type: "value",
name: "元",
axisLabel: { color: "#52607a" },
axisLabel: { color: "#52607a", formatter: (value: number) => formatChartYuan(value) },
splitLine: { show: false }
}
],
@@ -62,6 +62,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption {
type: "line",
yAxisIndex: 1,
smooth: true,
tooltip: { valueFormatter: value => `${formatChartYuan(Number(value))} 元` },
data: visibleDateTextList.map(dateText => getNumber(getDailyItem(props.list, dateText)?.saleAmount) / 100)
},
{
@@ -69,6 +70,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption {
type: "line",
yAxisIndex: 1,
smooth: true,
tooltip: { valueFormatter: value => `${formatChartYuan(Number(value))} 元` },
data: visibleDateTextList.map(dateText => getNumber(getDailyItem(props.list, dateText)?.netPaidAmount) / 100)
}
]