净利润
-
{{ 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 @@
退单量