From 13389a4344c2b94065baaf6ab650475c3cb26139 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com>
Date: Wed, 9 Oct 2024 09:07:33 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E7=BB=A9=E6=8A=A5=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/dashboard.js | 10 +
src/utils/index.js | 28 ++
src/views/dashboard/achievement/index.vue | 340 ++++++++++++++++++++++
3 files changed, 378 insertions(+)
create mode 100644 src/views/dashboard/achievement/index.vue
diff --git a/src/api/system/dashboard.js b/src/api/system/dashboard.js
index 9065fb1..f21cb2e 100644
--- a/src/api/system/dashboard.js
+++ b/src/api/system/dashboard.js
@@ -45,3 +45,13 @@ export function bonusMonthAmount(query) {
})
}
+/**
+ * 获取业绩报表
+ */
+export function achievementByUser(params) {
+ return request({
+ url: '/system/dashboard/achievementByUser',
+ method: 'get',
+ params
+ })
+}
diff --git a/src/utils/index.js b/src/utils/index.js
index 4c5d465..8a6b09d 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -485,6 +485,34 @@ export function getLastMonth(n) {
return date;
}
+/**
+ * 获取月份起始日期
+ */
+export function getLastMonthStart(n) {
+ let date = getLastMonth(n);
+ return new Date(date.getFullYear(), date.getMonth(), 1);
+}
+/**
+ * 获取月份起始日期字符串
+ */
+export function getLastMonthStartStr(n) {
+ let date = getLastMonthStart(n);
+ return parseTime(date, "{y}-{m}-{d}");
+}
+
+/**
+ * 获取月份结束日期
+ */
+export function getLastMonthEnd(n) {
+ return new Date(getLastMonthStart(n).getFullYear(), getLastMonthStart(n).getMonth() + 1, 0);
+}
+
+// 获取月份结束日期字符串
+export function getLastMonthEndStr(n) {
+ let date = getLastMonthEnd(n);
+ return parseTime(date, "{y}-{m}-{d}");
+}
+
// 获取前n月的日期字符串
export function getLastMonthDateStr(n) {
let date = getLastMonth(n);
diff --git a/src/views/dashboard/achievement/index.vue b/src/views/dashboard/achievement/index.vue
new file mode 100644
index 0000000..be50879
--- /dev/null
+++ b/src/views/dashboard/achievement/index.vue
@@ -0,0 +1,340 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{d.row[column.key]}} 台
+
+
+ {{d.row[column.key]}}
+
+
+
+
+
+
+
+
+
+
+