From f57b3ebb295c5c1f8a7e8a266629d1d7a8203aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9F=91=E8=9E=82?= Date: Wed, 15 Apr 2026 22:17:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A8=8E=E7=8E=87=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E7=A7=BB=E5=88=B0=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=A4=96=E9=83=A8=EF=BC=8C=E8=A1=A8=E5=A4=B4=E7=A8=8E?= =?UTF-8?q?=E7=8E=87=E5=8A=A8=E6=80=81=E8=B7=9F=E9=9A=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/dto/CompanyOverviewQueryDTO.java | 2 + .../model/dto/ShopOverviewQueryDTO.java | 2 + .../dashboard/company-overview/index.vue | 169 +++++++++--------- .../views/ecommerce/shop/overview/index.vue | 161 +++++++++-------- 4 files changed, 168 insertions(+), 166 deletions(-) diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/CompanyOverviewQueryDTO.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/CompanyOverviewQueryDTO.java index 5cceb3ed..baad6912 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/CompanyOverviewQueryDTO.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/CompanyOverviewQueryDTO.java @@ -3,6 +3,7 @@ package top.xyquan.ecomdmbbackend.modules.ecom.overview.model.dto; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.Size; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.Data; import java.math.BigDecimal; @@ -13,6 +14,7 @@ import java.util.List; * 全店铺概览查询DTO */ @Data +@JsonIgnoreProperties(ignoreUnknown = true) @Schema(description = "全店铺概览查询DTO") public class CompanyOverviewQueryDTO { diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/ShopOverviewQueryDTO.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/ShopOverviewQueryDTO.java index cc81fede..b6c6bd0e 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/ShopOverviewQueryDTO.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ecom/overview/model/dto/ShopOverviewQueryDTO.java @@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.Data; import java.math.BigDecimal; @@ -14,6 +15,7 @@ import java.util.List; * 单店铺概览查询DTO */ @Data +@JsonIgnoreProperties(ignoreUnknown = true) @Schema(description = "单店铺概览查询DTO") public class ShopOverviewQueryDTO { diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/company-overview/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/company-overview/index.vue index 911c0bd9..570cd1cf 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/company-overview/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/dashboard/company-overview/index.vue @@ -50,12 +50,13 @@ const dateRange = ref<[dayjs.Dayjs, dayjs.Dayjs]>([ dayjs(), ]); -// 税率(持久化) -const TAX_RATE_KEY = 'company-overview-tax-rate'; +// 税率(公司/店铺概览共用持久化) +const TAX_RATE_KEY = 'overview-tax-rate'; const taxRate = ref(0.04); taxRate.value = Number(localStorage.getItem(TAX_RATE_KEY)) || 0.04; watch(taxRate, (val) => { localStorage.setItem(TAX_RATE_KEY, String(val)); + loadOverviewData(); }); // 当前选中的时间范围类型 @@ -591,72 +592,10 @@ const handleExportSelectedShops = async () => { @@ -797,7 +796,7 @@ const handleExportSelectedShops = async () => { v-if="overviewData?.totalTaxAmount !== undefined" class="mt-6 flex justify-between border-t border-slate-100 pt-4 text-[11px] font-bold text-slate-400" > - 已扣除预扣税额 (4%) + 已扣除预扣税额 ({{ (taxRate * 100).toFixed(0) }}%) {{ formatAmount(overviewData.totalTaxAmount) }} @@ -998,7 +997,7 @@ const handleExportSelectedShops = async () => { 税前盈亏 - 4%税额 + {{ (taxRate * 100).toFixed(0) }}%税额 ROI diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue index fa564857..5c08da75 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/shop/overview/index.vue @@ -62,11 +62,12 @@ const lastRequestKey = ref(''); const isSyncingRouteQuery = ref(false); // 税率(持久化) -const TAX_RATE_KEY = 'shop-overview-tax-rate'; +const TAX_RATE_KEY = 'overview-tax-rate'; const taxRate = ref(0.04); taxRate.value = Number(localStorage.getItem(TAX_RATE_KEY)) || 0.04; watch(taxRate, (val) => { localStorage.setItem(TAX_RATE_KEY, String(val)); + loadOverviewData(); }); // 切换时间范围 @@ -718,70 +719,10 @@ onActivated(async () => { @@ -947,7 +946,7 @@ onActivated(async () => { v-if="overviewData?.totalTaxAmount !== undefined" class="mt-6 flex justify-between border-t border-slate-100 pt-4 text-[11px] font-bold text-slate-400" > - 已扣除 4% 税额 + 已扣除 {{ (taxRate * 100).toFixed(0) }}% 税额 -{{ formatAmount(overviewData.totalTaxAmount) }} @@ -1012,7 +1011,7 @@ onActivated(async () => {
- 销售额 4% 税额 + 销售额 {{ (taxRate * 100).toFixed(0) }}% 税额 {{ overviewData?.totalTaxAmount @@ -1122,7 +1121,7 @@ onActivated(async () => { 单品 ROI 税前盈亏 - 4%税额 + {{ (taxRate * 100).toFixed(0) }}%税额