From 5c2082adf4103e4fc4125230a7ca6413286fe690 Mon Sep 17 00:00:00 2001
From: yuanteng <1876787513@qq.com>
Date: Mon, 4 Aug 2025 16:27:52 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 6 +-
.../overviewPerformance.js | 124 +++++----
.../overviewPerformance.wxml | 93 ++++++-
.../overviewPerformance.wxss | 253 +++++++++++++++++-
pages/loginModule/register/register.js | 4 +-
pages/personCenter/mine/mine.js | 35 ++-
pages/personCenter/mine/mine.wxml | 12 +-
pages/welcome/homePage/homePage.wxml | 3 +
pages/welcome/homePage/homePage.wxss | 8 +-
request.js | 2 +-
10 files changed, 465 insertions(+), 75 deletions(-)
diff --git a/app.json b/app.json
index 787c7fd..1608c75 100644
--- a/app.json
+++ b/app.json
@@ -39,7 +39,11 @@
"pages/loginModule/employeeAccountApply/employeeAccountApply",
"pages/loginModule/employeeAccountNotice/employeeAccountNotice",
"pages/loginModule/employeeApplyQuery/employeeApplyQuery",
- "pages/dashboardModule/overviewPerformance/overviewPerformance"
+ "pages/dashboardModule/overviewPerformance/overviewPerformance",
+ "pages/dashboardModule/supervisorPerformance/supervisorPerformance",
+ "pages/dashboardModule/staffPerformance/staffPerformance",
+ "pages/dashboardModule/userOrderPerformance/userOrderPerformance",
+ "pages/dashboardModule/performanceRanking/performanceRanking"
],
"window": {
"navigationBarTextStyle": "black",
diff --git a/pages/dashboardModule/overviewPerformance/overviewPerformance.js b/pages/dashboardModule/overviewPerformance/overviewPerformance.js
index 965fa19..0ac6062 100644
--- a/pages/dashboardModule/overviewPerformance/overviewPerformance.js
+++ b/pages/dashboardModule/overviewPerformance/overviewPerformance.js
@@ -1,66 +1,76 @@
+import { baseUrl } from "../../../request";
+
// pages/dashboardModule/overviewPerformance/overviewPerformance.js
Page({
-
- /**
- * 页面的初始数据
- */
data: {
-
+ totalAmount: 0, // 订单总金额
+ netAmount: 0, // 净成交
+ promoCount: 0, // 客户数量
+ superCount: 0, // 主管数量
+ empCount: 0, // 员工数量
+ orderCount: 0, // 下单数量
+ toRelease: 0, // 待释放
+ toSettle: 0, // 可结算
+ settled: 0, // 已结算
+ refunded: 0, // 已退回
+ todayOrderCount: 0, // 今日下单数量
+ todayOrderAmount: 0, // 今日下单总金额
+ todayRefundCount: 0, // 今日退款数量
+ todayRefundAmount: 0, // 今日退款总金额
+ todayPromotionCount: 0, // 今日推广数量
+ monthOrderCount: 0, // 本月下单数量
+ monthOrderAmount: 0, // 本月下单总金额
+ monthRefundCount: 0, // 本月退款数量
+ monthRefundAmount: 0, // 本月退款总金额
+ monthPromotionCount: 0, // 本月推广数量
+ userRole: '', // 用户角色
},
- /**
- * 生命周期函数--监听页面加载
- */
onLoad(options) {
-
+ console.log('--->',options);
+ this.fetchPerformance();
+ this.setData({
+ userRole: options.role
+ })
+ let showRole = '';
+ switch (options.role) {
+ case 'manager':
+ showRole = '经理';
+ break;
+ case 'supervisor':
+ showRole = '主管';
+ break;
+ case 'staff':
+ showRole = '员工';
+ break;
+ }
+ this.setData({ showRole });
},
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
-
+ fetchPerformance() {
+ wx.request({
+ url: baseUrl + '/perform/mini/query/dashboard',
+ method: 'POST',
+ header: {
+ Authorization: wx.getStorageSync('token')
+ },
+ success: (res) => {
+ if (res.data.code === 1) {
+ // 直接把后端 data 对象铺平到页面 data
+ this.setData(res.data.data);
+ } else {
+ wx.showToast({
+ title: res.data.message || '获取数据失败',
+ icon: 'none'
+ });
+ }
+ },
+ fail: () => {
+ wx.showToast({
+ title: '请求失败',
+ icon: 'none'
+ });
+ }
+ });
}
-})
\ No newline at end of file
+});
diff --git a/pages/dashboardModule/overviewPerformance/overviewPerformance.wxml b/pages/dashboardModule/overviewPerformance/overviewPerformance.wxml
index 6907ce0..95951e8 100644
--- a/pages/dashboardModule/overviewPerformance/overviewPerformance.wxml
+++ b/pages/dashboardModule/overviewPerformance/overviewPerformance.wxml
@@ -1,2 +1,91 @@
-
-pages/dashboardModule/overviewPerformance/overviewPerformance.wxml
\ No newline at end of file
+
+ {{ showRole }}端绩效总览
+
+
+
+
+
+
+ 今日数据
+ 今日下单数量
+ {{todayOrderCount}}
+ 今日订单总金额
+ ¥{{todayOrderAmount}}
+ 今日退单数量
+ {{todayRefundCount}}
+ 今日退款总金额
+ ¥{{todayRefundAmount}}
+ 今日推广数量
+ {{todayPromotionCount}}
+
+
+
+
+ 本月数据
+ 本月下单数量
+ {{monthOrderCount}}
+ 本月订单总金额
+ ¥{{monthOrderAmount}}
+ 本月退单数量
+ {{monthRefundCount}}
+ 本月退款总金额
+ ¥{{monthRefundAmount}}
+ 本月推广数量
+ {{monthPromotionCount}}
+
+
+
+
+
+ 财务状态
+
+
+ 待释放
+ {{toRelease}}
+
+
+ 可结算
+ {{toSettle}}
+
+
+ 已结算
+ {{settled}}
+
+
+ 已退回
+ {{refunded}}
+
+
+
+
+
+
+
+
+
+ 主管数量
+ {{superCount}}
+
+
+ 员工数量
+ {{empCount}}
+
+
+ 客户数量
+ {{promoCount}}
+
+
+ 订单总金额
+ ¥{{totalAmount}}
+
+
+ 订单净成交
+ ¥{{netAmount}}
+
+
+ 下单数量
+ {{orderCount}}
+
+
+
+
diff --git a/pages/dashboardModule/overviewPerformance/overviewPerformance.wxss b/pages/dashboardModule/overviewPerformance/overviewPerformance.wxss
index b5fde00..8db933d 100644
--- a/pages/dashboardModule/overviewPerformance/overviewPerformance.wxss
+++ b/pages/dashboardModule/overviewPerformance/overviewPerformance.wxss
@@ -1 +1,252 @@
-/* pages/dashboardModule/overviewPerformance/overviewPerformance.wxss */
\ No newline at end of file
+.mt-41 {
+ margin-top: 76.88rpx;
+}
+.ml-19 {
+ margin-left: 35.63rpx;
+}
+.mt-19 {
+ margin-top: 35.63rpx;
+}
+.page {
+ padding-top: 71.25rpx;
+ background-color: #fefbf6;
+ box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
+ width: 100%;
+ overflow-y: auto;
+ overflow-x: hidden;
+ height: 100%;
+}
+.text {
+ color: #e67e22;
+ font-size: 45rpx;
+ font-family: SourceHanSansCN;
+ font-weight: 700;
+ line-height: 42.71rpx;
+}
+.group {
+ padding-top: 168.75rpx;
+}
+.group_2 {
+ margin-right: 33.75rpx;
+ padding: 138.75rpx 0 120rpx 41.25rpx;
+ filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
+}
+.equal-division {
+ padding-top: 48.75rpx;
+}
+.equal-division-item {
+ flex: 1 1 320.63rpx;
+}
+.section {
+ padding: 41.25rpx 33.75rpx 33.75rpx;
+ filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
+ background-color: #ffffff;
+ border-radius: 9.38rpx;
+ height: 684.38rpx;
+ border-left: solid 5.88rpx #e67e22;
+ /* border-right: solid 1.88rpx #e67e22; */
+ border-top: solid 5.88rpx #e67e22;
+ /* border-bottom: solid 1.88rpx #e67e22; */
+}
+.font_3 {
+ font-size: 30rpx;
+ font-family: SourceHanSansCN;
+ line-height: 28.01rpx;
+ color: #e67e22;
+}
+.text_8 {
+ line-height: 28.24rpx;
+}
+.font {
+ font-size: 26.25rpx;
+ font-family: SourceHanSansCN;
+ line-height: 22.91rpx;
+ color: #666666;
+}
+.text_10 {
+ margin-top: 33.75rpx;
+ line-height: 24.69rpx;
+}
+.text_14 {
+ margin-top: 41.25rpx;
+ line-height: 24.75rpx;
+}
+.text_18 {
+ margin-top: 41.25rpx;
+ line-height: 24.69rpx;
+}
+.text_22 {
+ margin-top: 41.25rpx;
+ line-height: 24.75rpx;
+}
+.font_4 {
+ font-size: 26.25rpx;
+ font-family: SourceHanSansCN;
+ line-height: 24.92rpx;
+ color: #666666;
+}
+.text_26 {
+ margin-top: 41.25rpx;
+}
+.section_2 {
+ padding: 41.25rpx 33.75rpx 33.75rpx;
+ filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
+ background-color: #ffffff;
+ border-radius: 9.38rpx;
+ height: 684.38rpx;
+ border-left: solid 5.88rpx #f1c40f;
+ /* border-right: solid 1.88rpx #f1c40f; */
+ border-top: solid 5.88rpx #f1c40f;
+ /* border-bottom: solid 1.88rpx #f1c40f; */
+}
+.text_9 {
+ color: #f1c40f;
+ line-height: 27.99rpx;
+}
+.text_11 {
+ margin-top: 33.75rpx;
+ line-height: 24.69rpx;
+}
+.text_15 {
+ margin-top: 41.25rpx;
+ line-height: 24.75rpx;
+}
+.text_19 {
+ margin-top: 41.25rpx;
+ line-height: 24.69rpx;
+}
+.text_23 {
+ margin-top: 41.25rpx;
+ line-height: 24.75rpx;
+}
+.text_27 {
+ margin-top: 41.25rpx;
+}
+.section_3 {
+ padding: 37.5rpx 20rpx 37.5rpx 33.75rpx;
+ filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
+ background-color: #ffffff;
+ border-radius: 9.38rpx;
+ border-left: solid 5.88rpx #e67e22;
+ /* border-right: solid 1.88rpx #e67e22; */
+ border-top: solid 5.88rpx #e67e22;
+ /* border-bottom: solid 1.88rpx #e67e22; */
+}
+.text_30 {
+ line-height: 24.3rpx;
+}
+.text_32 {
+ line-height: 24.3rpx;
+}
+.text_34 {
+ line-height: 24.3rpx;
+}
+.text_36 {
+ line-height: 24.3rpx;
+}
+.grid {
+ height: 306.56rpx;
+ display: grid;
+ grid-template-rows: repeat(2, minmax(0, 1fr));
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ row-gap: 32.94rpx;
+ column-gap: 50.19rpx;
+}
+.pos {
+ position: absolute;
+ left: 39.38rpx;
+ right: 33rpx;
+ top: 0;
+}
+.grid-item {
+ padding: 22.5rpx 0;
+ filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
+ background-color: #ffffff;
+ border-radius: 9.38rpx;
+ border-left: solid 5.88rpx #e67e22;
+ /* border-right: solid 1.88rpx #e67e22; */
+ border-top: solid 5.88rpx #e67e22;
+ /* border-bottom: solid 1.88rpx #e67e22; */
+}
+.text_2 {
+ line-height: 24.34rpx;
+}
+.font_2 {
+ font-size: 30rpx;
+ font-family: SourceHanSansCN;
+ line-height: 22.91rpx;
+ color: #e67e22;
+}
+.text_37 {
+ margin-right: 7.5rpx;
+}
+.text_35 {
+ margin-right: 3.75rpx;
+}
+.text_33 {
+ margin-right: 3.75rpx;
+}
+.text_31 {
+ margin-right: 3.75rpx;
+}
+.text_29 {
+ margin-top: 26.25rpx;
+}
+.text_25 {
+ margin-left: 3.75rpx;
+ margin-top: 26.25rpx;
+}
+.text_21 {
+ margin-top: 26.25rpx;
+ line-height: 22.54rpx;
+}
+.text_17 {
+ margin-left: 3.75rpx;
+ margin-top: 26.25rpx;
+}
+.text_13 {
+ margin-top: 26.25rpx;
+}
+.text_28 {
+ margin-top: 26.25rpx;
+}
+.text_24 {
+ margin-left: 3.75rpx;
+ margin-top: 26.25rpx;
+}
+.text_20 {
+ margin-top: 26.25rpx;
+ line-height: 22.54rpx;
+}
+.text_16 {
+ margin-left: 3.75rpx;
+ margin-top: 26.25rpx;
+}
+.text_12 {
+ margin-top: 26.25rpx;
+}
+.text_3 {
+ line-height: 24.28rpx;
+}
+.text_4 {
+ line-height: 24.54rpx;
+}
+.grid-item_2 {
+ padding: 22.5rpx 0;
+ filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
+ background-color: #ffffff;
+ border-radius: 9.38rpx;
+ border-left: solid 5.88rpx #f1c40f;
+ /* border-right: solid 1.88rpx #f1c40f; */
+ border-top: solid 5.88rpx #f1c40f;
+ /* border-bottom: solid 1.88rpx #f1c40f; */
+}
+.text_5 {
+ line-height: 24.49rpx;
+}
+.text_6 {
+ line-height: 24.56rpx;
+}
+.text_7 {
+ line-height: 24.26rpx;
+}
\ No newline at end of file
diff --git a/pages/loginModule/register/register.js b/pages/loginModule/register/register.js
index bc2d23a..7a79c8d 100644
--- a/pages/loginModule/register/register.js
+++ b/pages/loginModule/register/register.js
@@ -196,8 +196,8 @@ Page({
},
gotoLogin() {
- wx.navigateTo({
- url: '/pages/loginModule/pwdLogin/pwdLogin',
+ wx.navigateBack({
+ delta: 1
})
},
diff --git a/pages/personCenter/mine/mine.js b/pages/personCenter/mine/mine.js
index 83e4c34..3ff8b25 100644
--- a/pages/personCenter/mine/mine.js
+++ b/pages/personCenter/mine/mine.js
@@ -173,6 +173,39 @@ Page({
}
});
},
+
+ // 跳转仪表盘
+ gotoDashboard() {
+
+ const { userRole } = this.data
+ wx.navigateTo({
+ url: `/pages/dashboardModule/overviewPerformance/overviewPerformance?role=${userRole}`,
+ })
+ },
+
+ // 跳转查看绩效
+ checkPerformance() {
+ const { userRole } = this.data
+
+ if (userRole === 'manager' || userRole === 'supervisor') {
+ wx.navigateTo({
+ url: `/pages/dashboardModule/supervisorPerformance/supervisorPerformance?role=${userRole}`,
+ })
+ } else {
+ wx.navigateTo({
+ url: `/pages/dashboardModule/staffPerformance/staffPerformance?role=${userRole}`,
+ })
+ }
+ },
+
+ // 跳转排名
+ gotoRank(e) {
+ console.log(e);
+ const userRole = e.currentTarget.dataset.userrole;
+ wx.navigateTo({
+ url: `/pages/dashboardModule/performanceRanking/performanceRanking?role=${userRole}`,
+ })
+ },
/**
* 生命周期函数--监听页面初次渲染完成
@@ -192,5 +225,5 @@ Page({
phoneNumber: this.data.phoneNumber
})
},
-
+
})
\ No newline at end of file
diff --git a/pages/personCenter/mine/mine.wxml b/pages/personCenter/mine/mine.wxml
index 225a32c..f245768 100644
--- a/pages/personCenter/mine/mine.wxml
+++ b/pages/personCenter/mine/mine.wxml
@@ -246,23 +246,23 @@
二维码邀请
-
-
-
+
+
+
查看绩效
-
+
主管排名
-
+
-
+
我是员工
+
+ 我是经理
+
\ No newline at end of file
diff --git a/pages/welcome/homePage/homePage.wxss b/pages/welcome/homePage/homePage.wxss
index 1500e62..7b96ccb 100644
--- a/pages/welcome/homePage/homePage.wxss
+++ b/pages/welcome/homePage/homePage.wxss
@@ -47,10 +47,10 @@
background-color: #ffffff;
border-radius: 18.75rpx;
width: 500.63rpx;
- border-left: solid 1.88rpx #ff8d1a;
- border-right: solid 1.88rpx #ff8d1a;
- border-top: solid 1.88rpx #ff8d1a;
- border-bottom: solid 1.88rpx #ff8d1a;
+ border-left: solid 4rpx #ff8d1a;
+ border-right: solid 4rpx #ff8d1a;
+ border-top: solid 4rpx #ff8d1a;
+ border-bottom: solid 4rpx #ff8d1a;
}
.text_3 {
line-height: 31.8rpx;
diff --git a/request.js b/request.js
index 019e7e3..1035c7b 100644
--- a/request.js
+++ b/request.js
@@ -2,6 +2,6 @@ export const local='http://localhost:9091';
export const dev = 'http://160.202.242.36:9091';
export const test = 'http://160.202.242.36:9092';
export const localTest = 'http://localhost:9092';
-export const baseUrl = dev;
+export const baseUrl = test;
export const globalImgUrl = baseUrl + '/file/download/'
\ No newline at end of file