From 76df7701b2052edeb3fd521a326e174f536b643c Mon Sep 17 00:00:00 2001 From: ah-max150 Date: Wed, 2 Sep 2026 22:43:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=8F=E8=90=A5=E6=A6=82=E8=A7=88?= =?UTF-8?q?=E5=9B=9B=E5=BC=A0=E6=B1=87=E6=80=BB=E8=A1=A8=E9=80=8F=E5=87=BA?= =?UTF-8?q?=E6=88=90=E4=BA=A4=E9=87=8F=E4=B8=8E=E5=87=80=E9=94=80=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rules/commit-message-after-feature.mdc | 12 +++++ .../overview/model/vo/CompanyOverviewVO.java | 18 +++++++ .../impl/CategoryExportExcelServiceImpl.java | 45 +++++++++++------ .../impl/CompanyOverviewServiceImpl.java | 30 +++++++++++ .../service/impl/ExportServiceImpl.java | 50 +++++++++++++------ .../model/vo/ShopOverviewStatisticsVO.java | 12 +++++ .../impl/BiShopOverviewServiceImpl.java | 2 + .../category/service/CategoryService.java | 5 ++ .../service/impl/CategoryServiceImpl.java | 31 ++++++++++++ .../product/model/dto/ProductFilterDTO.java | 2 +- .../service/impl/ProductServiceImpl.java | 10 +++- .../src/api/bi/overview/types/types.vo.ts | 8 +++ .../src/api/ec/product/types/types.dto.ts | 2 + .../src/utils/overview-table-hints.ts | 2 + .../components/CategorySummaryTable.vue | 12 ++++- .../components/PlatformSummaryCard.vue | 14 +++++- .../finance/components/ShopSummaryTable.vue | 16 +++++- .../src/views/ec/product/list/index.vue | 26 ++++++++++ 18 files changed, 260 insertions(+), 37 deletions(-) create mode 100644 .cursor/rules/commit-message-after-feature.mdc diff --git a/.cursor/rules/commit-message-after-feature.mdc b/.cursor/rules/commit-message-after-feature.mdc new file mode 100644 index 00000000..1eadbde6 --- /dev/null +++ b/.cursor/rules/commit-message-after-feature.mdc @@ -0,0 +1,12 @@ +--- +description: 每完成一个完整功能后给出一行 commit message +alwaysApply: true +--- + +# 功能完成后的提交消息 + +每完成一个**完整、可独立提交**的功能(或一组相关改动收尾)后,主动给出**一行**中文 conventional commit message,供用户直接复制提交。 + +- 格式:`feat:` / `fix:` / `refactor:` / `sql:` 等前缀 + 简洁说明(侧重 why) +- 不要主动执行 `git commit`,除非用户明确要求提交 +- 若同一会话连续完成多个独立功能,每个功能收尾时各给一行,不要攒到最后一起写 diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/model/vo/CompanyOverviewVO.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/model/vo/CompanyOverviewVO.java index f20c6c9b..d0d2df1e 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/model/vo/CompanyOverviewVO.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/model/vo/CompanyOverviewVO.java @@ -232,6 +232,12 @@ public class CompanyOverviewVO { /** 成交单量 */ private Integer dealOrderCount; + /** 成交量(件数) */ + private Integer dealQuantitySum; + + /** 净销量(件数)= 成交量 − 退款件数 */ + private Integer salesQuantitySum; + /** 净销售客单价 = 净销售额 / 净销售单量 */ private BigDecimal salesAverageOrderValue; @@ -284,6 +290,12 @@ public class CompanyOverviewVO { /** 成交单量 */ private Integer dealOrderCount; + /** 成交量(件数) */ + private Integer dealQuantitySum; + + /** 净销量(件数)= 成交量 − 退款件数 */ + private Integer salesQuantitySum; + /** 净销售客单价 = 净销售额 / 净销售单量 */ private BigDecimal salesAverageOrderValue; @@ -344,6 +356,12 @@ public class CompanyOverviewVO { /** 成交单量 */ private Integer dealOrderCount; + /** 成交量(件数) */ + private Integer dealQuantitySum; + + /** 净销量(件数)= 成交量 − 退款件数 */ + private Integer salesQuantitySum; + /** 净销售客单价 = 净销售额 / 净销售单量 */ private BigDecimal salesAverageOrderValue; diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CategoryExportExcelServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CategoryExportExcelServiceImpl.java index 0769ba5d..413c170d 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CategoryExportExcelServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CategoryExportExcelServiceImpl.java @@ -235,6 +235,8 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic s.setDealAmount(c.getDealAmount()); s.setSalesOrderCount(c.getSalesOrderCount()); s.setDealOrderCount(c.getDealOrderCount()); + s.setDealQuantitySum(c.getDealQuantitySum()); + s.setSalesQuantitySum(c.getSalesQuantitySum()); s.setSalesAverageOrderValue(c.getSalesAverageOrderValue()); s.setDealAverageOrderValue(c.getDealAverageOrderValue()); s.setProductCost(c.getProductCost()); @@ -259,6 +261,8 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic BigDecimal totalDealAmount = BigDecimal.ZERO; int totalSalesOrders = 0; int totalDealOrders = 0; + int totalDealQuantity = 0; + int totalSalesQuantity = 0; BigDecimal totalProductCost = BigDecimal.ZERO; BigDecimal totalShippingCost = BigDecimal.ZERO; BigDecimal totalOtherCost = BigDecimal.ZERO; @@ -271,6 +275,8 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic totalDealAmount = totalDealAmount.add(c.getDealAmount() != null ? c.getDealAmount() : BigDecimal.ZERO); totalSalesOrders += c.getSalesOrderCount() != null ? c.getSalesOrderCount() : 0; totalDealOrders += c.getDealOrderCount() != null ? c.getDealOrderCount() : 0; + totalDealQuantity += c.getDealQuantitySum() != null ? c.getDealQuantitySum() : 0; + totalSalesQuantity += c.getSalesQuantitySum() != null ? c.getSalesQuantitySum() : 0; totalProductCost = totalProductCost.add(c.getProductCost() != null ? c.getProductCost() : BigDecimal.ZERO); totalShippingCost = totalShippingCost.add(c.getShippingCost() != null ? c.getShippingCost() : BigDecimal.ZERO); totalOtherCost = totalOtherCost.add(c.getOtherCost() != null ? c.getOtherCost() : BigDecimal.ZERO); @@ -304,6 +310,8 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic total.setDealAmount(totalDealAmount); total.setSalesOrderCount(totalSalesOrders); total.setDealOrderCount(totalDealOrders); + total.setDealQuantitySum(totalDealQuantity); + total.setSalesQuantitySum(totalSalesQuantity); total.setSalesAverageOrderValue(salesAvgOrderValue); total.setDealAverageOrderValue(dealAvgOrderValue); total.setProductCost(totalProductCost); @@ -341,7 +349,8 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic String taxHeader = taxRate.multiply(new BigDecimal("100")).setScale(0, RoundingMode.HALF_UP).toPlainString() + "%税额"; String[] headers = { - dimensionColumnHeader, "成交金额", "净销售额", "成交单量", "净销售单量", "成交客单价", "净销售客单价", + dimensionColumnHeader, "成交金额", "净销售额", "成交单量", "净销售单量", "成交量", "净销量", + "成交客单价", "净销售客单价", "商品成本", "运费", "其他成本", "订单成本", "退款金额", taxHeader, "推广费", "刷单费", "税前盈亏", "费比 %", "ROI", "税后盈亏" }; @@ -384,24 +393,30 @@ public class CategoryExportExcelServiceImpl implements CategoryExportExcelServic Cell salesOc = row.createCell(4); salesOc.setCellStyle(style); salesOc.setCellValue(d.getSalesOrderCount() != null ? d.getSalesOrderCount() : 0); - setCell(row, 5, bd2Money(d.getDealAverageOrderValue()), style); - setCell(row, 6, bd2Money(d.getSalesAverageOrderValue()), style); - setCell(row, 7, bd2Money(d.getProductCost()), style); - setCell(row, 8, bd2Money(d.getShippingCost()), style); - setCell(row, 9, bd2Money(d.getOtherCost()), style); - setCell(row, 10, bd2Money(d.getOrderCost()), style); + Cell dealQty = row.createCell(5); + dealQty.setCellStyle(style); + dealQty.setCellValue(d.getDealQuantitySum() != null ? d.getDealQuantitySum() : 0); + Cell salesQty = row.createCell(6); + salesQty.setCellStyle(style); + salesQty.setCellValue(d.getSalesQuantitySum() != null ? d.getSalesQuantitySum() : 0); + setCell(row, 7, bd2Money(d.getDealAverageOrderValue()), style); + setCell(row, 8, bd2Money(d.getSalesAverageOrderValue()), style); + setCell(row, 9, bd2Money(d.getProductCost()), style); + setCell(row, 10, bd2Money(d.getShippingCost()), style); + setCell(row, 11, bd2Money(d.getOtherCost()), style); + setCell(row, 12, bd2Money(d.getOrderCost()), style); BigDecimal salesTax = salesTaxOnNetForCategoryExport(d.getSalesAmount(), taxRate); BigDecimal profitAfterTax = (d.getTotalProfitBeforeTax() != null ? d.getTotalProfitBeforeTax() : BigDecimal.ZERO) .subtract(salesTax) .setScale(2, RoundingMode.HALF_UP); - setCell(row, 11, bd2Money(d.getRefundAmount()), style); - setCell(row, 12, bd2Money(salesTax), style); - setCell(row, 13, bd2Money(d.getTotalPromotionFee()), style); - setCell(row, 14, bd2Money(d.getBrushFee()), style); - setCell(row, 15, bd2Money(d.getTotalProfitBeforeTax()), style); - setCell(row, 16, bd2FeeRatioPercent(d.getFeeRatio()), style); - setCell(row, 17, bd2Roi(d.getRoi()), style); - setCell(row, 18, bd2Money(profitAfterTax), style); + setCell(row, 13, bd2Money(d.getRefundAmount()), style); + setCell(row, 14, bd2Money(salesTax), style); + setCell(row, 15, bd2Money(d.getTotalPromotionFee()), style); + setCell(row, 16, bd2Money(d.getBrushFee()), style); + setCell(row, 17, bd2Money(d.getTotalProfitBeforeTax()), style); + setCell(row, 18, bd2FeeRatioPercent(d.getFeeRatio()), style); + setCell(row, 19, bd2Roi(d.getRoi()), style); + setCell(row, 20, bd2Money(profitAfterTax), style); } private static double bd2Money(BigDecimal v) { diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CompanyOverviewServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CompanyOverviewServiceImpl.java index 0cd3df9a..d1dcffbe 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CompanyOverviewServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/CompanyOverviewServiceImpl.java @@ -69,6 +69,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { BigDecimal totalSales = BigDecimal.ZERO; int totalSalesOrders = 0; int totalDealOrders = 0; + int totalDealQuantity = 0; + int totalSalesQuantity = 0; BigDecimal totalTargetAmount = BigDecimal.ZERO; int totalTargetOrders = 0; BigDecimal totalProductCost = BigDecimal.ZERO; @@ -86,6 +88,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { totalGrossProfit = totalGrossProfit.add(s.getGrossProfit() != null ? s.getGrossProfit() : BigDecimal.ZERO); totalSalesOrders += s.getSalesOrderCount() != null ? s.getSalesOrderCount() : 0; totalDealOrders += s.getDealOrderCount() != null ? s.getDealOrderCount() : 0; + totalDealQuantity += s.getDealQuantitySum() != null ? s.getDealQuantitySum() : 0; + totalSalesQuantity += s.getSalesQuantitySum() != null ? s.getSalesQuantitySum() : 0; totalTargetAmount = totalTargetAmount.add(s.getTargetAmount() != null ? s.getTargetAmount() : BigDecimal.ZERO); totalTargetOrders += s.getTargetOrderCount() != null ? s.getTargetOrderCount() : 0; totalProductCost = totalProductCost.add(s.getProductCost() != null ? s.getProductCost() : BigDecimal.ZERO); @@ -129,6 +133,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { total.setGrossProfit(totalGrossProfit.setScale(2, RoundingMode.HALF_UP)); total.setSalesOrderCount(totalSalesOrders); total.setDealOrderCount(totalDealOrders); + total.setDealQuantitySum(totalDealQuantity); + total.setSalesQuantitySum(totalSalesQuantity); total.setSalesAverageOrderValue(salesAvgOrderValue); total.setDealAverageOrderValue(dealAvgOrderValue); total.setTargetAmount(totalTargetAmount); @@ -155,6 +161,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { BigDecimal totalSales = BigDecimal.ZERO; int totalSalesOrders = 0; int totalDealOrders = 0; + int totalDealQuantity = 0; + int totalSalesQuantity = 0; BigDecimal totalProductCost = BigDecimal.ZERO; BigDecimal totalShippingCost = BigDecimal.ZERO; BigDecimal totalOtherCost = BigDecimal.ZERO; @@ -170,6 +178,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { totalGrossProfit = totalGrossProfit.add(c.getGrossProfit() != null ? c.getGrossProfit() : BigDecimal.ZERO); totalSalesOrders += c.getSalesOrderCount() != null ? c.getSalesOrderCount() : 0; totalDealOrders += c.getDealOrderCount() != null ? c.getDealOrderCount() : 0; + totalDealQuantity += c.getDealQuantitySum() != null ? c.getDealQuantitySum() : 0; + totalSalesQuantity += c.getSalesQuantitySum() != null ? c.getSalesQuantitySum() : 0; totalProductCost = totalProductCost.add(c.getProductCost() != null ? c.getProductCost() : BigDecimal.ZERO); totalShippingCost = totalShippingCost.add(c.getShippingCost() != null ? c.getShippingCost() : BigDecimal.ZERO); totalOtherCost = totalOtherCost.add(c.getOtherCost() != null ? c.getOtherCost() : BigDecimal.ZERO); @@ -204,6 +214,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { total.setGrossProfit(totalGrossProfit.setScale(2, RoundingMode.HALF_UP)); total.setSalesOrderCount(totalSalesOrders); total.setDealOrderCount(totalDealOrders); + total.setDealQuantitySum(totalDealQuantity); + total.setSalesQuantitySum(totalSalesQuantity); total.setSalesAverageOrderValue(salesAvgOrderValue); total.setDealAverageOrderValue(dealAvgOrderValue); total.setProductCost(totalProductCost); @@ -226,6 +238,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { BigDecimal totalSalesAmount = BigDecimal.ZERO; int totalSalesOrders = 0; int totalDealOrders = 0; + int totalDealQuantity = 0; + int totalSalesQuantity = 0; BigDecimal totalTargetAmount = BigDecimal.ZERO; int totalTargetOrderCount = 0; BigDecimal totalProductCost = BigDecimal.ZERO; @@ -243,6 +257,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { totalGrossProfit = totalGrossProfit.add(p.getGrossProfit() != null ? p.getGrossProfit() : BigDecimal.ZERO); totalSalesOrders += p.getSalesOrderCount() != null ? p.getSalesOrderCount() : 0; totalDealOrders += p.getDealOrderCount() != null ? p.getDealOrderCount() : 0; + totalDealQuantity += p.getDealQuantitySum() != null ? p.getDealQuantitySum() : 0; + totalSalesQuantity += p.getSalesQuantitySum() != null ? p.getSalesQuantitySum() : 0; totalTargetAmount = totalTargetAmount.add(p.getTargetAmount() != null ? p.getTargetAmount() : BigDecimal.ZERO); totalTargetOrderCount += p.getTargetOrderCount() != null ? p.getTargetOrderCount() : 0; totalProductCost = totalProductCost.add(p.getProductCost() != null ? p.getProductCost() : BigDecimal.ZERO); @@ -286,6 +302,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { total.setGrossProfit(totalGrossProfit.setScale(2, RoundingMode.HALF_UP)); total.setSalesOrderCount(totalSalesOrders); total.setDealOrderCount(totalDealOrders); + total.setDealQuantitySum(totalDealQuantity); + total.setSalesQuantitySum(totalSalesQuantity); total.setSalesAverageOrderValue(salesAvgOrderValue); total.setDealAverageOrderValue(dealAvgOrderValue); total.setTargetAmount(totalTargetAmount); @@ -547,6 +565,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { s.setDealAmount(m.dealAmount); s.setSalesOrderCount(m.salesOrderCount); s.setDealOrderCount(m.dealOrderCount); + s.setDealQuantitySum(m.dealQuantitySum); + s.setSalesQuantitySum(m.salesQuantitySum); s.setSalesAverageOrderValue(aov(m.sales, m.salesOrderCount)); s.setDealAverageOrderValue(aov(m.dealAmount, m.dealOrderCount)); s.setProductCost(m.productCost); @@ -576,6 +596,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { s.setDealAmount(m.dealAmount); s.setSalesOrderCount(m.salesOrderCount); s.setDealOrderCount(m.dealOrderCount); + s.setDealQuantitySum(m.dealQuantitySum); + s.setSalesQuantitySum(m.salesQuantitySum); s.setSalesAverageOrderValue(aov(m.sales, m.salesOrderCount)); s.setDealAverageOrderValue(aov(m.dealAmount, m.dealOrderCount)); s.setProductCost(m.productCost); @@ -601,6 +623,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { s.setDealAmount(m.dealAmount); s.setSalesOrderCount(m.salesOrderCount); s.setDealOrderCount(m.dealOrderCount); + s.setDealQuantitySum(m.dealQuantitySum); + s.setSalesQuantitySum(m.salesQuantitySum); s.setSalesAverageOrderValue(aov(m.sales, m.salesOrderCount)); s.setDealAverageOrderValue(aov(m.dealAmount, m.dealOrderCount)); s.setProductCost(m.productCost); @@ -759,6 +783,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { BigDecimal dealAmount = BigDecimal.ZERO; int salesOrderCount; int dealOrderCount; + int dealQuantitySum; + int salesQuantitySum; BigDecimal refund = BigDecimal.ZERO; BigDecimal productCost = BigDecimal.ZERO; BigDecimal freightCost = BigDecimal.ZERO; @@ -780,6 +806,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { a.dealAmount = nz(row.getDealAmount()); a.salesOrderCount = row.getOrderCount() != null ? row.getOrderCount().intValue() : 0; a.dealOrderCount = row.getDealOrderCount() != null ? row.getDealOrderCount().intValue() : 0; + a.dealQuantitySum = row.getDealQuantitySum() != null ? row.getDealQuantitySum().intValue() : 0; + a.salesQuantitySum = row.getSalesQuantitySum() != null ? row.getSalesQuantitySum().intValue() : 0; a.refund = nz(row.getRefundAmount()); a.productCost = nz(row.getProductCost()); a.freightCost = nz(row.getFreightCost()); @@ -793,6 +821,8 @@ public class CompanyOverviewServiceImpl implements CompanyOverviewService { a.dealAmount = dealAmount.add(o.dealAmount); a.salesOrderCount = salesOrderCount + o.salesOrderCount; a.dealOrderCount = dealOrderCount + o.dealOrderCount; + a.dealQuantitySum = dealQuantitySum + o.dealQuantitySum; + a.salesQuantitySum = salesQuantitySum + o.salesQuantitySum; a.refund = refund.add(o.refund); a.productCost = productCost.add(o.productCost); a.freightCost = freightCost.add(o.freightCost); diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/ExportServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/ExportServiceImpl.java index 82e9dc1b..e8df0efb 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/ExportServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/overview/service/impl/ExportServiceImpl.java @@ -131,7 +131,7 @@ public class ExportServiceImpl implements ExportService { String taxLabel = (taxRate.multiply(new BigDecimal("100")).setScale(0, RoundingMode.HALF_UP)).toPlainString() + "%税额"; String[] headers = { firstColumnHeader, "目标单量", "单量达成率(%)", "目标额", "销售达成率(%)", - "成交金额", "净销售额", "成交单量", "净销售单量", "成交客单价", "净销售客单价", + "成交金额", "净销售额", "成交单量", "净销售单量", "成交量", "净销量", "成交客单价", "净销售客单价", "商品成本", "运费", "其他成本", "订单成本", "退款金额", taxLabel, "推广费", "刷单费", "毛利", "税前净利", "费比", "ROI", "税后净利" }; @@ -173,27 +173,29 @@ public class ExportServiceImpl implements ExportService { setCell(row, 6, objToDouble(data.get("salesAmount")), style); setCell(row, 7, objToDouble(data.get("dealOrderCount")), style); setCell(row, 8, objToDouble(data.get("salesOrderCount")), style); - setCell(row, 9, objToDouble(data.get("dealAvgOrderValue")), style); - setCell(row, 10, objToDouble(data.get("salesAvgOrderValue")), style); - setCell(row, 11, objToDouble(data.get("productCost")), style); - setCell(row, 12, objToDouble(data.get("shippingCost")), style); - setCell(row, 13, objToDouble(data.get("otherCost")), style); - setCell(row, 14, objToDouble(data.get("orderCost")), style); + setCell(row, 9, objToDouble(data.get("dealQuantitySum")), style); + setCell(row, 10, objToDouble(data.get("salesQuantitySum")), style); + setCell(row, 11, objToDouble(data.get("dealAvgOrderValue")), style); + setCell(row, 12, objToDouble(data.get("salesAvgOrderValue")), style); + setCell(row, 13, objToDouble(data.get("productCost")), style); + setCell(row, 14, objToDouble(data.get("shippingCost")), style); + setCell(row, 15, objToDouble(data.get("otherCost")), style); + setCell(row, 16, objToDouble(data.get("orderCost")), style); BigDecimal salesTax = salesTaxOnNetForExport( mapToBigDecimal(data.get("salesAmount")), taxRate); BigDecimal profitAfterTax = mapToBigDecimal(data.get("totalProfitBeforeTax")) .subtract(salesTax) .setScale(2, RoundingMode.HALF_UP); - setCell(row, 15, objToDouble(data.get("refundAmount")), style); - setCell(row, 16, salesTax.doubleValue(), style); - setCell(row, 17, objToDouble(data.get("totalPromotionFee")), style); - setCell(row, 18, objToDouble(data.get("brushFee")), style); - setCell(row, 19, objToDouble(data.get("grossProfit")), style); - setCell(row, 20, objToDouble(data.get("totalProfitBeforeTax")), style); - setCell(row, 21, objToDouble(data.get("feeRatio")), style); - setCell(row, 22, objToDouble(data.get("roi")), style); - setCell(row, 23, profitAfterTax.doubleValue(), style); + setCell(row, 17, objToDouble(data.get("refundAmount")), style); + setCell(row, 18, salesTax.doubleValue(), style); + setCell(row, 19, objToDouble(data.get("totalPromotionFee")), style); + setCell(row, 20, objToDouble(data.get("brushFee")), style); + setCell(row, 21, objToDouble(data.get("grossProfit")), style); + setCell(row, 22, objToDouble(data.get("totalProfitBeforeTax")), style); + setCell(row, 23, objToDouble(data.get("feeRatio")), style); + setCell(row, 24, objToDouble(data.get("roi")), style); + setCell(row, 25, profitAfterTax.doubleValue(), style); } private static BigDecimal mapToBigDecimal(Object val) { @@ -223,6 +225,8 @@ public class ExportServiceImpl implements ExportService { data.put("salesAmount", s.getSalesAmount()); data.put("dealOrderCount", s.getDealOrderCount()); data.put("salesOrderCount", s.getSalesOrderCount()); + data.put("dealQuantitySum", s.getDealQuantitySum()); + data.put("salesQuantitySum", s.getSalesQuantitySum()); data.put("dealAvgOrderValue", s.getDealAverageOrderValue()); data.put("salesAvgOrderValue", s.getSalesAverageOrderValue()); data.put("productCost", s.getProductCost()); @@ -257,6 +261,8 @@ public class ExportServiceImpl implements ExportService { BigDecimal totalDealAmount = BigDecimal.ZERO; int totalSalesOrders = 0; int totalDealOrders = 0; + int totalDealQuantity = 0; + int totalSalesQuantity = 0; BigDecimal totalTargetAmount = BigDecimal.ZERO; int totalTargetOrders = 0; BigDecimal totalProductCost = BigDecimal.ZERO; @@ -271,6 +277,8 @@ public class ExportServiceImpl implements ExportService { totalDealAmount = totalDealAmount.add(s.getDealAmount() != null ? s.getDealAmount() : BigDecimal.ZERO); totalSalesOrders += s.getSalesOrderCount() != null ? s.getSalesOrderCount() : 0; totalDealOrders += s.getDealOrderCount() != null ? s.getDealOrderCount() : 0; + totalDealQuantity += s.getDealQuantitySum() != null ? s.getDealQuantitySum() : 0; + totalSalesQuantity += s.getSalesQuantitySum() != null ? s.getSalesQuantitySum() : 0; totalTargetAmount = totalTargetAmount.add(s.getTargetAmount() != null ? s.getTargetAmount() : BigDecimal.ZERO); totalTargetOrders += s.getTargetOrderCount() != null ? s.getTargetOrderCount() : 0; totalProductCost = totalProductCost.add(s.getProductCost() != null ? s.getProductCost() : BigDecimal.ZERO); @@ -313,6 +321,8 @@ public class ExportServiceImpl implements ExportService { total.setDealAmount(totalDealAmount); total.setSalesOrderCount(totalSalesOrders); total.setDealOrderCount(totalDealOrders); + total.setDealQuantitySum(totalDealQuantity); + total.setSalesQuantitySum(totalSalesQuantity); total.setSalesAverageOrderValue(salesAvgOrderValue); total.setDealAverageOrderValue(dealAvgOrderValue); total.setTargetAmount(totalTargetAmount); @@ -345,6 +355,8 @@ public class ExportServiceImpl implements ExportService { data.put("salesAmount", s.getSalesAmount()); data.put("dealOrderCount", s.getDealOrderCount()); data.put("salesOrderCount", s.getSalesOrderCount()); + data.put("dealQuantitySum", s.getDealQuantitySum()); + data.put("salesQuantitySum", s.getSalesQuantitySum()); data.put("dealAvgOrderValue", s.getDealAverageOrderValue()); data.put("salesAvgOrderValue", s.getSalesAverageOrderValue()); data.put("productCost", s.getProductCost()); @@ -369,6 +381,8 @@ public class ExportServiceImpl implements ExportService { BigDecimal totalDealAmount = BigDecimal.ZERO; int totalSalesOrders = 0; int totalDealOrders = 0; + int totalDealQuantity = 0; + int totalSalesQuantity = 0; BigDecimal totalTargetAmount = BigDecimal.ZERO; int totalTargetOrders = 0; BigDecimal totalProductCost = BigDecimal.ZERO; @@ -383,6 +397,8 @@ public class ExportServiceImpl implements ExportService { totalDealAmount = totalDealAmount.add(s.getDealAmount() != null ? s.getDealAmount() : BigDecimal.ZERO); totalSalesOrders += s.getSalesOrderCount() != null ? s.getSalesOrderCount() : 0; totalDealOrders += s.getDealOrderCount() != null ? s.getDealOrderCount() : 0; + totalDealQuantity += s.getDealQuantitySum() != null ? s.getDealQuantitySum() : 0; + totalSalesQuantity += s.getSalesQuantitySum() != null ? s.getSalesQuantitySum() : 0; totalTargetAmount = totalTargetAmount.add(s.getTargetAmount() != null ? s.getTargetAmount() : BigDecimal.ZERO); totalTargetOrders += s.getTargetOrderCount() != null ? s.getTargetOrderCount() : 0; totalProductCost = totalProductCost.add(s.getProductCost() != null ? s.getProductCost() : BigDecimal.ZERO); @@ -425,6 +441,8 @@ public class ExportServiceImpl implements ExportService { total.setDealAmount(totalDealAmount); total.setSalesOrderCount(totalSalesOrders); total.setDealOrderCount(totalDealOrders); + total.setDealQuantitySum(totalDealQuantity); + total.setSalesQuantitySum(totalSalesQuantity); total.setSalesAverageOrderValue(salesAvgOrderValue); total.setDealAverageOrderValue(dealAvgOrderValue); total.setTargetAmount(totalTargetAmount); diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/model/vo/ShopOverviewStatisticsVO.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/model/vo/ShopOverviewStatisticsVO.java index ecbd663d..ac8924a7 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/model/vo/ShopOverviewStatisticsVO.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/model/vo/ShopOverviewStatisticsVO.java @@ -178,6 +178,12 @@ public class ShopOverviewStatisticsVO { /** 成交单量 */ private Integer dealOrderCount; + /** 成交量(件数) */ + private Integer dealQuantitySum; + + /** 净销量(件数)= 成交量 − 退款件数 */ + private Integer salesQuantitySum; + /** 净销售客单价 */ private BigDecimal salesAverageOrderValue; @@ -228,6 +234,12 @@ public class ShopOverviewStatisticsVO { /** 成交单量 */ private Integer dealOrderCount; + /** 成交量(件数) */ + private Integer dealQuantitySum; + + /** 净销量(件数)= 成交量 − 退款件数 */ + private Integer salesQuantitySum; + /** 净销售客单价 */ private BigDecimal salesAverageOrderValue; diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/service/impl/BiShopOverviewServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/service/impl/BiShopOverviewServiceImpl.java index 32569164..bda98ee6 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/service/impl/BiShopOverviewServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/bi/shopoverview/service/impl/BiShopOverviewServiceImpl.java @@ -330,6 +330,8 @@ public class BiShopOverviewServiceImpl implements BiShopOverviewService { s.setDealAmount(c.getDealAmount()); s.setSalesOrderCount(c.getSalesOrderCount()); s.setDealOrderCount(c.getDealOrderCount()); + s.setDealQuantitySum(c.getDealQuantitySum()); + s.setSalesQuantitySum(c.getSalesQuantitySum()); s.setSalesAverageOrderValue(c.getSalesAverageOrderValue()); s.setDealAverageOrderValue(c.getDealAverageOrderValue()); s.setProductCost(c.getProductCost()); diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/CategoryService.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/CategoryService.java index e59ef34b..ddf21df2 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/CategoryService.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/CategoryService.java @@ -64,4 +64,9 @@ public interface CategoryService extends IService { /** 按公司 + 名称精确查找(公司内名称唯一)。 */ CategoryPO getByCompanyIdAndName(Long companyId, String name); + + /** + * 自身及全部下级类目 ID(含 categoryId);类目不存在或不属于公司时返回空列表。 + */ + List listSelfAndDescendantIds(Long companyId, Long categoryId); } diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/impl/CategoryServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/impl/CategoryServiceImpl.java index cc940e56..70b558ff 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/impl/CategoryServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/category/service/impl/CategoryServiceImpl.java @@ -231,6 +231,37 @@ public class CategoryServiceImpl extends ServiceImpl .last("LIMIT 1")); } + @Override + public List listSelfAndDescendantIds(Long companyId, Long categoryId) { + if (companyId == null || categoryId == null) { + return List.of(); + } + CategoryPO root = this.getById(categoryId); + if (root == null || !companyId.equals(root.getCompanyId())) { + return List.of(); + } + List all = this.list(new LambdaQueryWrapper() + .eq(CategoryPO::getCompanyId, companyId) + .select(CategoryPO::getId, CategoryPO::getParentId)); + Map> childrenByParent = all.stream() + .filter(c -> c.getParentId() != null) + .collect(Collectors.groupingBy( + CategoryPO::getParentId, + Collectors.mapping(CategoryPO::getId, Collectors.toList()))); + List result = new ArrayList<>(); + collectSelfAndDescendants(categoryId, childrenByParent, result); + return result; + } + + /** 深度优先收集自身及下级 ID */ + private void collectSelfAndDescendants( + Long id, Map> childrenByParent, List out) { + out.add(id); + for (Long childId : childrenByParent.getOrDefault(id, List.of())) { + collectSelfAndDescendants(childId, childrenByParent, out); + } + } + /** * 检查 targetId 是否是 ancestorId 的后代 */ diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/model/dto/ProductFilterDTO.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/model/dto/ProductFilterDTO.java index 2e479c13..6dff6714 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/model/dto/ProductFilterDTO.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/model/dto/ProductFilterDTO.java @@ -13,7 +13,7 @@ public class ProductFilterDTO { private String name; /** - * 类目ID(精准查询) + * 类目 ID(含自身及全部下级) */ private Long categoryId; diff --git a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/service/impl/ProductServiceImpl.java b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/service/impl/ProductServiceImpl.java index 27938827..30e0df32 100644 --- a/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/service/impl/ProductServiceImpl.java +++ b/ecom-dmb-backend/src/main/java/top/xyquan/ecomdmbbackend/modules/ec/product/service/impl/ProductServiceImpl.java @@ -616,9 +616,15 @@ public class ProductServiceImpl extends ServiceImpl im wrapper.eq(ProductPO::getProductCode, filter.getProductCode()); } - // 类目ID(精准查询) + // 类目:选中节点及其全部下级 if (filter.getCategoryId() != null) { - wrapper.eq(ProductPO::getCategoryId, filter.getCategoryId()); + List categoryIds = categoryService.listSelfAndDescendantIds( + companyId, filter.getCategoryId()); + if (categoryIds.isEmpty()) { + return PageResultVO.create( + List.of(), 0L, pageQueryDTO.getPage(), pageQueryDTO.getPageSize()); + } + wrapper.in(ProductPO::getCategoryId, categoryIds); } // 处理规格相关的过滤条件 diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/bi/overview/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/bi/overview/types/types.vo.ts index ca7a8696..e3501ab5 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/api/bi/overview/types/types.vo.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/api/bi/overview/types/types.vo.ts @@ -100,6 +100,10 @@ export namespace CompanyOverviewVO { salesOrderCount?: number; /** 成交单量 */ dealOrderCount?: number; + /** 成交量(件数) */ + dealQuantitySum?: number; + /** 净销量(件数) */ + salesQuantitySum?: number; /** 净销售客单价 */ salesAverageOrderValue?: number; /** 成交客单价 */ @@ -129,6 +133,8 @@ export namespace CompanyOverviewVO { dealAmount?: number; salesOrderCount?: number; dealOrderCount?: number; + dealQuantitySum?: number; + salesQuantitySum?: number; salesAverageOrderValue?: number; dealAverageOrderValue?: number; productCost?: number; @@ -158,6 +164,8 @@ export namespace CompanyOverviewVO { dealAmount?: number; salesOrderCount?: number; dealOrderCount?: number; + dealQuantitySum?: number; + salesQuantitySum?: number; salesAverageOrderValue?: number; dealAverageOrderValue?: number; productCost?: number; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/ec/product/types/types.dto.ts b/ecom-dmb-frontend/apps/web-antd/src/api/ec/product/types/types.dto.ts index 81b54752..0bb28f9f 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/api/ec/product/types/types.dto.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/api/ec/product/types/types.dto.ts @@ -99,6 +99,8 @@ export namespace ProductDTO { skuCode?: string; /** SKU 名称(模糊查询) */ skuName?: string; + /** 类目 ID(含自身及全部下级) */ + categoryId?: number; /** 关键字(模糊查询商品名称、商品编码、SKU 名称、SKU 编码) */ keywords?: string; } diff --git a/ecom-dmb-frontend/apps/web-antd/src/utils/overview-table-hints.ts b/ecom-dmb-frontend/apps/web-antd/src/utils/overview-table-hints.ts index b1dd385c..466f2252 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/utils/overview-table-hints.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/utils/overview-table-hints.ts @@ -14,6 +14,8 @@ export const overviewTableHints = { salesAmountShort: '成交金额 − 退款额(不含已取消、未知订单)。', salesOrderCount: '净销售单量 = 成交单量 − 退款单量。', dealOrderCount: '计入成交状态的订单笔数(不含已取消、未知)。', + dealQuantitySum: '计入成交状态的商品件数合计(不含已取消、未知)。', + salesQuantitySum: '净销量 = 成交量 − 退款件数。', salesAverageOrderValue: '净销售额 / 净销售单量。', dealAverageOrderValue: '成交金额 / 成交单量。', /** @deprecated 使用 salesOrderCount */ diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/CategorySummaryTable.vue b/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/CategorySummaryTable.vue index 9602cd20..7133755d 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/CategorySummaryTable.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/CategorySummaryTable.vue @@ -148,7 +148,7 @@ const cellRoi = (v: number | null | undefined) => {{ props.firstColumnLabel }} 经营规模维度 @@ -181,6 +181,12 @@ const cellRoi = (v: number | null | undefined) => 净销售单量 + + 成交量 + + + 净销量 + 成交客单价 @@ -281,6 +287,8 @@ const cellRoi = (v: number | null | undefined) => {{ formatIntCell(cat.dealOrderCount) }} {{ formatIntCell(cat.salesOrderCount) }} + {{ formatIntCell(cat.dealQuantitySum) }} + {{ formatIntCell(cat.salesQuantitySum) }} @@ -332,6 +340,8 @@ const cellRoi = (v: number | null | undefined) => {{ formatIntCell(categorySummary?.total?.dealOrderCount) }} {{ formatIntCell(categorySummary?.total?.salesOrderCount) }} + {{ formatIntCell(categorySummary?.total?.dealQuantitySum) }} + {{ formatIntCell(categorySummary?.total?.salesQuantitySum) }} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/PlatformSummaryCard.vue b/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/PlatformSummaryCard.vue index cdf53786..8c989cff 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/PlatformSummaryCard.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/PlatformSummaryCard.vue @@ -73,6 +73,8 @@ const platformData = computed(() => { dealAmount: p.dealAmount ?? 0, salesOrderCount: p.salesOrderCount ?? 0, dealOrderCount: p.dealOrderCount ?? 0, + dealQuantitySum: p.dealQuantitySum ?? 0, + salesQuantitySum: p.salesQuantitySum ?? 0, salesAverageOrderValue: p.salesAverageOrderValue ?? 0, dealAverageOrderValue: p.dealAverageOrderValue ?? 0, productCost: p.productCost ?? 0, @@ -206,7 +208,7 @@ const sortedData = computed(() => { 经营规模维度 @@ -261,6 +263,12 @@ const sortedData = computed(() => { 净销售单量 + + 成交量 + + + 净销量 + 成交客单价 @@ -359,6 +367,8 @@ const sortedData = computed(() => { {{ formatIntCell(p.dealOrderCount) }} {{ formatIntCell(p.salesOrderCount) }} + {{ formatIntCell(p.dealQuantitySum) }} + {{ formatIntCell(p.salesQuantitySum) }} @@ -405,6 +415,8 @@ const sortedData = computed(() => { {{ formatIntCell(totalData.dealOrderCount) }} {{ formatIntCell(totalData.salesOrderCount) }} + {{ formatIntCell(totalData.dealQuantitySum) }} + {{ formatIntCell(totalData.salesQuantitySum) }} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/ShopSummaryTable.vue b/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/ShopSummaryTable.vue index 2b97024b..f9980c8b 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/ShopSummaryTable.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/bi/workbench/tabs/finance/components/ShopSummaryTable.vue @@ -152,7 +152,7 @@ const cellRoi = (v: number | null | undefined) => 目标达成维度 经营规模维度 @@ -205,6 +205,12 @@ const cellRoi = (v: number | null | undefined) => 净销售单量 + + 成交量 + + + 净销量 + 成交客单价 @@ -329,6 +335,12 @@ const cellRoi = (v: number | null | undefined) => {{ formatIntCell(shop.salesOrderCount) }} + + {{ formatIntCell(shop.dealQuantitySum) }} + + + {{ formatIntCell(shop.salesQuantitySum) }} + @@ -418,6 +430,8 @@ const cellRoi = (v: number | null | undefined) => {{ formatIntCell(shopSummary?.total?.dealOrderCount) }} {{ formatIntCell(shopSummary?.total?.salesOrderCount) }} + {{ formatIntCell(shopSummary?.total?.dealQuantitySum) }} + {{ formatIntCell(shopSummary?.total?.salesQuantitySum) }} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ec/product/list/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ec/product/list/index.vue index aba6d434..b765dca7 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ec/product/list/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ec/product/list/index.vue @@ -24,6 +24,7 @@ import { import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getProductPageApi } from '#/api/ec/product'; +import { getCategoryTreeApi } from '#/api/ec/product/category'; import { PermissionGate } from '#/components/permission'; import { usePermission } from '#/composables/use-permission'; @@ -69,6 +70,7 @@ const searchForm = ref({ productCode: '', skuCode: '', skuName: '', + categoryId: undefined as number | undefined, }); /** 提取 SKU 编码列表 */ @@ -199,6 +201,9 @@ const gridOptions: VxeGridProps = { skuName: String(searchParams.skuName ?? searchForm.value.skuName ?? '').trim() || undefined, + categoryId: + (searchParams.categoryId as number | undefined) ?? + searchForm.value.categoryId, }; const params: PageQueryDTO = { page: page.currentPage, @@ -281,6 +286,27 @@ const formOptions = computed(() => ({ fieldName: 'skuCode', label: 'SKU 编码', }, + { + component: 'ApiTreeSelect', + componentProps: { + placeholder: '请选择类目(含下级)', + allowClear: true, + showSearch: true, + treeDefaultExpandAll: true, + treeNodeFilterProp: 'label', + api: getCategoryTreeApi, + labelField: 'name', + valueField: 'id', + childrenField: 'children', + class: 'w-full', + onChange: (val: number | undefined) => { + searchForm.value.categoryId = val; + gridReloadRef.value?.(); + }, + }, + fieldName: 'categoryId', + label: '商品类目', + }, ], showDefaultActions: true, collapsed: true,