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 @@ - + - + @@ -165,17 +165,17 @@ - + - + - + - + @@ -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;