From fb13b0a502cf13f41d85e8b69dec8f0065edf1fd Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Mon, 5 Jan 2026 13:36:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/data/sales.vue | 26 ++++++++++++++------------
src/views/data/table.vue | 3 ++-
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/views/data/sales.vue b/src/views/data/sales.vue
index d840b63..d894063 100644
--- a/src/views/data/sales.vue
+++ b/src/views/data/sales.vue
@@ -56,7 +56,7 @@
-
¥{{ payCount.totalAmount || 0 }}
+
¥{{ multiplyAndFormat(payCount.totalAmount || 0) }}
总金额
@@ -67,7 +67,7 @@
-
¥{{ payCount.refundAmount || 0 }}
+
¥{{ multiplyAndFormat(payCount.refundAmount || 0) }}
退款金额
@@ -100,7 +100,7 @@
-
{{ payCount.totalAmount - payCount.refundAmount || 0 }}
+
{{ multiplyAndFormat((payCount.totalAmount - payCount.refundAmount) || 0) }}
实际销售额总和
@@ -111,7 +111,7 @@
-
{{ payCount.saleCount - payCount.refundCount || 0 }}
+
{{ multiplyAndFormat((payCount.saleCount - payCount.refundCount) || 0) }}
实际销量总和
@@ -152,10 +152,10 @@
¥{{ scope.row.refund }}
- {{ scope.row.saleCount - scope.row.refundCount }}
+ {{ multiplyAndFormat(scope.row.saleCount - scope.row.refundCount) }}
- ¥{{ scope.row.saleAmount - scope.row.refundAmount }}
+ ¥{{ multiplyAndFormat(scope.row.saleAmount - scope.row.refundAmount) }}
@@ -165,17 +165,17 @@
- ¥{{ scope.row.saleAmount }}
+ ¥{{ multiplyAndFormat(scope.row.saleAmount) }}
- ¥{{ scope.row.refundAmount }}
+ ¥{{ multiplyAndFormat(scope.row.refundAmount) }}
- {{ scope.row.saleCount - scope.row.refundCount }}
+ {{ multiplyAndFormat(scope.row.saleCount - scope.row.refundCount) }}
- ¥{{ scope.row.saleAmount - scope.row.refundAmount }}
+ ¥{{ multiplyAndFormat(scope.row.saleAmount - scope.row.refundAmount) }}
@@ -193,12 +193,13 @@ import saleSummaryApi from "@/api/order/sale-summary";
import categoryApi from "@/api/product/productclassification";
import ShopApi from "@/api/account/shop";
import dayjs from "dayjs";
-import { downloadFile } from "@/utils/index";
+import { downloadFile, multiplyAndFormat } from "@/utils/index";
import { formatDateRange } from './utils/index.js'
export default {
data() {
return {
+ multiplyAndFormat,
timeValue: "today",
resetQuery: null,
orderType: "2",
@@ -314,7 +315,8 @@ export default {
endDate: this.query.createdAt[1],
categoryId: this.query.prodCategoryId,
productName: this.query.productName,
- shopId: this.shopId
+ shopId: this.shopId,
+ rangeType: this.timeValue,
});
downloadFile(file, "数据", "xlsx");
} catch (error) {
diff --git a/src/views/data/table.vue b/src/views/data/table.vue
index 4af4868..634406c 100644
--- a/src/views/data/table.vue
+++ b/src/views/data/table.vue
@@ -187,7 +187,8 @@ export default {
const file = await tableSummaryApi.export({
beginDate: this.query.createdAt[0],
endDate: this.query.createdAt[1],
- shopId: this.shopId
+ shopId: this.shopId,
+ rangeType: this.timeValue,
});
downloadFile(file, "数据", "xlsx");
this.downloadLoading = false;