diff --git a/src/pages/product/component/OrderDailyChart.vue b/src/pages/product/component/OrderDailyChart.vue index 737bfb8..19d79d2 100644 --- a/src/pages/product/component/OrderDailyChart.vue +++ b/src/pages/product/component/OrderDailyChart.vue @@ -14,6 +14,7 @@ import type { EChartsOption } from "echarts"; import DateRangeChartCard from "@/components/DateRangeChartCard.vue"; import type { GaoSalesOrderDailyStatView } from "@/types/GaoChart"; import { buildAxisChartOption, formatChartYuan, formatQuantity, getDailyItem, getNumber } from "@/pages/product/component/chartUtils"; +import { buildRestDayMarkArea, useRestDayCalendar } from "@/pages/store/component/useRestDayCalendar"; defineOptions({ name: "OrderDailyChart" @@ -25,6 +26,9 @@ const props = defineProps<{ loading: boolean; }>(); +const dateTextList = computed(() => props.dateTextList); +const { restDaySet } = useRestDayCalendar(dateTextList); + function buildOption(visibleDateTextList: string[]): EChartsOption { const labelList = visibleDateTextList.map(item => item.slice(5)); return { @@ -58,6 +62,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption { name: "订单数", type: "bar", yAxisIndex: 0, + markArea: buildRestDayMarkArea(visibleDateTextList, restDaySet.value, window.innerWidth - 32), tooltip: { valueFormatter: value => formatQuantity(Number(value)) }, data: visibleDateTextList.map(dateText => getNumber(getDailyItem(props.list, dateText)?.orderCount)) }, diff --git a/src/pages/product/component/ProductFulfillmentTrendChart.vue b/src/pages/product/component/ProductFulfillmentTrendChart.vue index a7f7bdd..545ac0c 100644 --- a/src/pages/product/component/ProductFulfillmentTrendChart.vue +++ b/src/pages/product/component/ProductFulfillmentTrendChart.vue @@ -14,6 +14,7 @@ import type { EChartsOption } from "echarts"; import DateRangeChartCard from "@/components/DateRangeChartCard.vue"; import type { GaoProductFulfillmentDailyStatView } from "@/types/GaoChart"; import { buildAxisChartOption, getDailyItem, getNumber } from "@/pages/product/component/chartUtils"; +import { buildRestDayMarkArea, useRestDayCalendar } from "@/pages/store/component/useRestDayCalendar"; defineOptions({ name: "ProductFulfillmentTrendChart" @@ -25,6 +26,9 @@ const props = defineProps<{ loading: boolean; }>(); +const dateTextList = computed(() => props.dateTextList); +const { restDaySet } = useRestDayCalendar(dateTextList); + function buildOption(visibleDateTextList: string[]): EChartsOption { const labelList = visibleDateTextList.map(item => item.slice(5)); return { @@ -40,6 +44,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption { name: "直接履约", type: "bar", stack: "fulfillment", + markArea: buildRestDayMarkArea(visibleDateTextList, restDaySet.value, window.innerWidth - 32), data: visibleDateTextList.map(dateText => getNumber(getDailyItem(props.list, dateText)?.directBaseQuantity)) }, { diff --git a/src/pages/product/component/ProductSalesTrendChart.vue b/src/pages/product/component/ProductSalesTrendChart.vue index 32948a5..8e32b2b 100644 --- a/src/pages/product/component/ProductSalesTrendChart.vue +++ b/src/pages/product/component/ProductSalesTrendChart.vue @@ -14,6 +14,7 @@ import type { EChartsOption } from "echarts"; import DateRangeChartCard from "@/components/DateRangeChartCard.vue"; import type { GaoProductSalesDailyStatView } from "@/types/GaoChart"; import { buildAxisChartOption, getDailyItem, getNumber } from "@/pages/product/component/chartUtils"; +import { buildRestDayMarkArea, useRestDayCalendar } from "@/pages/store/component/useRestDayCalendar"; defineOptions({ name: "ProductSalesTrendChart" @@ -25,6 +26,9 @@ const props = defineProps<{ loading: boolean; }>(); +const dateTextList = computed(() => props.dateTextList); +const { restDaySet } = useRestDayCalendar(dateTextList); + function buildOption(visibleDateTextList: string[]): EChartsOption { const labelList = visibleDateTextList.map(item => item.slice(5)); return { @@ -58,6 +62,7 @@ function buildOption(visibleDateTextList: string[]): EChartsOption { type: "bar", stack: "quantity", yAxisIndex: 0, + markArea: buildRestDayMarkArea(visibleDateTextList, restDaySet.value, window.innerWidth - 32), data: visibleDateTextList.map(dateText => getNumber(getDailyItem(props.list, dateText)?.directBaseQuantity)) }, { diff --git a/src/pages/product/component/ProductStockHealthTable.vue b/src/pages/product/component/ProductStockHealthTable.vue index cdab9e2..a0fe089 100644 --- a/src/pages/product/component/ProductStockHealthTable.vue +++ b/src/pages/product/component/ProductStockHealthTable.vue @@ -20,7 +20,7 @@