diff --git a/src/assets/images/data_home_item5.png b/src/assets/images/data_home_item5.png new file mode 100644 index 0000000..dc35367 Binary files /dev/null and b/src/assets/images/data_home_item5.png differ diff --git a/src/assets/images/data_home_item6.png b/src/assets/images/data_home_item6.png new file mode 100644 index 0000000..3d26555 Binary files /dev/null and b/src/assets/images/data_home_item6.png differ diff --git a/src/views/data/index.vue b/src/views/data/index.vue index ffdaebf..dee11b1 100644 --- a/src/views/data/index.vue +++ b/src/views/data/index.vue @@ -57,15 +57,15 @@
- - 今天 - 昨天 - 最近7天 - 最近30天 - 本周 - 本月 - 自定义 - +
+
+ + {{ item.label }} + + | +
+
- 会员支付 + 余额支付
{{ trade.memberPayAmount || 0 }}
@@ -241,16 +241,26 @@
-
客单价
+
+ 客单价 + + + + + +
-
{{ formatDecimal(trade.avgPayAmount || 0) }}
+
{{ formatDecimal(trade.avgPayAmount || 0) }}
翻台率 - + @@ -258,51 +268,110 @@
-
{{ trade.turnoverRate || 0 }}%
+
{{ trade.turnoverRate || 0 }}%
-
优惠金额
+
+ 优惠金额 + + + + + + +
-
{{ formatDecimal(trade.discountAmount || 0) }}
+
{{ formatDecimal(trade.discountAmount || 0) }}
优惠笔数
-
{{ trade.discountCount || 0 }}
+
{{ trade.discountCount || 0 }}
-
+
毛利润
-
{{ trade.profitAmount || 0 }}
+
{{ trade.profitAmount || 0 }}
毛利率
-
{{ trade.profitRate || 0 }}%
+
{{ trade.profitRate || 0 }}%
-
+
净利润
-
{{ trade.netProfitAmount || 0 }}
+
{{ trade.netProfitAmount || 0 }}
净利率
-
{{ trade.netProfitRate || 0 }}%
+
{{ trade.netProfitRate || 0 }}%
@@ -397,10 +466,43 @@ import dayjs from "dayjs"; import * as echarts from "echarts"; import { debounce, formatDecimal } from "@/utils/tools"; import { formatDateRange } from './utils/index.js' +import { multiplyAndFormat } from '@/utils/index.js' export default { name: "home", data() { return { + multiplyAndFormat, + dataListActive: 0, + dateList: [ + { + label: "今天", + value: "today", + }, + { + label: "昨天", + value: "yesterday", + }, + { + label: "最近7天", + value: "last_7_days", + }, + { + label: "最近30天", + value: "last_30_days", + }, + { + label: "本周", + value: "this_week", + }, + { + label: "本月", + value: "this_month", + }, + { + label: "自定义", + value: "custom", + }, + ], payCount: [ { icon: "https://cashier-oss.oss-cn-beijing.aliyuncs.com/static/wx.png", @@ -557,7 +659,9 @@ export default { this.dateProduct() }, // 切换时间 - timeChange(e) { + timeChange(e, index = 0) { + this.dataListActive = index; + this.timeValue = e; this.query.createdAt = formatDateRange(e) if (e != "custom") { this.summarytrade(); @@ -1376,6 +1480,14 @@ export default { background-image: url("../../assets/images/data_home_item4.png"); } + &.item5 { + background-image: url("../../assets/images/data_home_item5.png"); + } + + &.item6 { + background-image: url("../../assets/images/data_home_item6.png"); + } + .row_wrap { display: flex; width: 100%; @@ -1398,6 +1510,7 @@ export default { align-items: center; color: #333; font-size: 14px; + gap: 8px; .icon { font-size: 12px; @@ -1419,6 +1532,7 @@ export default { .t { font-size: 24px; margin-left: 10px; + font-weight: bold; } } } @@ -1586,7 +1700,8 @@ export default { .num { font-size: 32px; - color: #3F9EFF; + color: var(--el-color-primary); + font-weight: bold; } .tips { @@ -1595,4 +1710,36 @@ export default { } } } + +.date_list { + display: flex; + margin-right: 10px; + + .item { + font-size: 14px; + color: #999999; + display: flex; + align-items: center; + + &.active { + .date-tab-item { + color: var(--el-color-primary); + } + } + + .date-tab-item { + cursor: pointer; + + &:hover { + color: var(--el-color-primary-light-3); + } + } + + .separator { + margin: 0 6px; + position: relative; + top: -1px; + } + } +} diff --git a/src/views/data/sales.vue b/src/views/data/sales.vue index b36c63d..d88f082 100644 --- a/src/views/data/sales.vue +++ b/src/views/data/sales.vue @@ -94,6 +94,28 @@
退单量
+
+
+ + + +
+
+
{{ payCount.totalAmount - payCount.refundAmount || 0 }}
+
实际销售额总和
+
+
+
+
+ + + +
+
+
{{ payCount.saleCount - payCount.refundCount || 0 }}
+
实际销量总和
+
+
@@ -122,7 +144,6 @@ -