From 05875392536c3d6c846d17d727c2bf325920887c Mon Sep 17 00:00:00 2001 From: yuanteng <1876787513@qq.com> Date: Mon, 4 Aug 2025 16:31:21 +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 --- .../staffPerformance/staffPerformance.js | 121 ++++++++ .../staffPerformance/staffPerformance.json | 3 + .../staffPerformance/staffPerformance.wxml | 131 ++++++++ .../staffPerformance/staffPerformance.wxss | 289 ++++++++++++++++++ .../supervisorPerformance.js | 97 ++++++ .../supervisorPerformance.json | 3 + .../supervisorPerformance.wxml | 131 ++++++++ .../supervisorPerformance.wxss | 289 ++++++++++++++++++ .../userOrderPerformance.js | 108 +++++++ .../userOrderPerformance.json | 3 + .../userOrderPerformance.wxml | 94 ++++++ .../userOrderPerformance.wxss | 174 +++++++++++ 12 files changed, 1443 insertions(+) create mode 100644 pages/dashboardModule/staffPerformance/staffPerformance.js create mode 100644 pages/dashboardModule/staffPerformance/staffPerformance.json create mode 100644 pages/dashboardModule/staffPerformance/staffPerformance.wxml create mode 100644 pages/dashboardModule/staffPerformance/staffPerformance.wxss create mode 100644 pages/dashboardModule/supervisorPerformance/supervisorPerformance.js create mode 100644 pages/dashboardModule/supervisorPerformance/supervisorPerformance.json create mode 100644 pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxml create mode 100644 pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxss create mode 100644 pages/dashboardModule/userOrderPerformance/userOrderPerformance.js create mode 100644 pages/dashboardModule/userOrderPerformance/userOrderPerformance.json create mode 100644 pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxml create mode 100644 pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxss diff --git a/pages/dashboardModule/staffPerformance/staffPerformance.js b/pages/dashboardModule/staffPerformance/staffPerformance.js new file mode 100644 index 0000000..d534b16 --- /dev/null +++ b/pages/dashboardModule/staffPerformance/staffPerformance.js @@ -0,0 +1,121 @@ +import { baseUrl } from "../../../request"; + +// pages/dashboardModule/supervisorPerformance/supervisorPerformance.js +Page({ + data: { + nickName: '', // 主管名称 + phoneNumber: '', // 手机号 + showList: false, // 是否显示绩效列表 + performanceList: [], // 绩效列表数据,含 ratePercent 字段 + supervisorUserId: 0, // 上级主管id + }, + + onNameInput(e) { + this.setData({ nickName: e.detail.value }); + }, + onPhoneInput(e) { + this.setData({ phoneNumber: e.detail.value }); + }, + + onSearch() { + const nickName = this.data.nickName.trim(); + const phoneNumber = this.data.phoneNumber.trim(); + const supervisorUserId = this.data; + + if (!nickName) { + wx.showToast({ title: '请输入主管名称', icon: 'none' }); + return; + } + if (!/^1[3-9]\d{9}$/.test(phoneNumber)) { + wx.showToast({ title: '请输入正确的手机号', icon: 'none' }); + return; + } + + wx.request({ + url: baseUrl + '/perform/query/staff', + method: 'POST', + header: { + Authorization: wx.getStorageSync('token') + }, + data: { nickName, phoneNumber, supervisorUserId}, + success: (res) => { + console.log('--->后端返回记录',res.data); + if (res.data.code === 1) { + // 预处理:给每条记录加一个 ratePercent 字段 + const listWithRate = res.data.data.map(item => { + const ratePercent = (item.rakeRewardsRate * 100).toFixed(2); + return Object.assign({}, item, { ratePercent }); + }); + // 分两次 setData,不链 + this.setData({ performanceList: listWithRate }); + this.setData({ showList: true }); + } else { + wx.showToast({ title: res.data.message || '查询失败', icon: 'none' }); + } + }, + fail: () => { + wx.showToast({ title: '网络错误', icon: 'none' }); + } + }); + }, + + // 全查 + onSearchSupId() { + + const { supervisorUserId } = this.data; + + wx.request({ + url: baseUrl + '/perform/query/staff', + method: 'POST', + header: { + Authorization: wx.getStorageSync('token') + }, + data: { supervisorUserId }, + success: (res) => { + console.log('--->后端返回记录',res.data); + if (res.data.code === 1) { + // 预处理:给每条记录加一个 ratePercent 字段 + const listWithRate = res.data.data.map(item => { + const ratePercent = (item.rakeRewardsRate * 100).toFixed(2); + return Object.assign({}, item, { ratePercent }); + }); + // 分两次 setData,不链 + this.setData({ performanceList: listWithRate }); + this.setData({ showList: true }); + } else { + wx.showToast({ title: res.data.message || '查询失败', icon: 'none' }); + } + }, + fail: () => { + wx.showToast({ title: '网络错误', icon: 'none' }); + } + }); + }, + + onCopyPhone(e) { + const phone = e.currentTarget.dataset.phone; + wx.setClipboardData({ + data: phone, + success() { + wx.showToast({ title: '手机号已复制', icon: 'success' }); + } + }); + }, + + onLoad(options) { + console.log('--->',options); + this.setData({ + supervisorUserId: options.supId, + }) + this.onSearchSupId(); + }, + + // 跳转用户订单 + gotoUser(e) { + const { id } = e.currentTarget.dataset; + + wx.navigateTo({ + url: `/pages/dashboardModule/userOrderPerformance/userOrderPerformance?userId=${id}`, + }) + }, +}); diff --git a/pages/dashboardModule/staffPerformance/staffPerformance.json b/pages/dashboardModule/staffPerformance/staffPerformance.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/dashboardModule/staffPerformance/staffPerformance.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/dashboardModule/staffPerformance/staffPerformance.wxml b/pages/dashboardModule/staffPerformance/staffPerformance.wxml new file mode 100644 index 0000000..dc6ec86 --- /dev/null +++ b/pages/dashboardModule/staffPerformance/staffPerformance.wxml @@ -0,0 +1,131 @@ + + + + 员工业绩报表 + + + + + + + 员工名称 + + + + + + + + 手机号 + + + + + + + + 搜索 + + + + + + + + + + + + + 编号:{{item.id}} + 员工:{{item.nickName}} + + + 客户订单明细>> + + + + + + 手机号:{{item.phoneNumber}} + 复制 + + + + + + 客户数:{{item.empCount}} + + + 比例:{{item.ratePercent}}% + + + + + + + 下单量 + {{item.orderCount}} + + + 总订单 + ¥{{item.totalAmount}} + + + 净成交 + ¥{{item.netAmount}} + + + 待释放 + ¥{{item.toRelease}} + + + 可结算 + {{item.toSettle}} + + + 已结算 + ¥{{item.settled}} + + + 推广数 + {{item.promoCount}} + + + 退款 + ¥{{item.refunded}} + + + 已回退 + ¥0 + + + + + + + diff --git a/pages/dashboardModule/staffPerformance/staffPerformance.wxss b/pages/dashboardModule/staffPerformance/staffPerformance.wxss new file mode 100644 index 0000000..890e5d6 --- /dev/null +++ b/pages/dashboardModule/staffPerformance/staffPerformance.wxss @@ -0,0 +1,289 @@ +.mt-19 { + margin-top: 35.63rpx; +} +.mt-7 { + margin-top: 13.13rpx; +} +.mt-25 { + margin-top: 46.88rpx; +} +.mt-13 { + margin-top: 24.38rpx; +} +.mt-17 { + margin-top: 31.88rpx; +} +.page { + padding: 71.06rpx 42.19rpx 117.19rpx 43.99rpx; + 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.75rpx; +} +.section { + padding: 45.75rpx 39.26rpx 47.94rpx 42.99rpx; + background-color: #ffffff; + border-radius: 18.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.text-wrapper { + padding: 17.63rpx 0 14.63rpx; + background-color: #ffffff; + border-radius: 9.38rpx; + width: 403.13rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_3 { + margin-left: 15.19rpx; +} +.font { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 27.6rpx; + color: #66666b; +} +.text_2 { + margin-left: 2.63rpx; + line-height: 27.75rpx; +} +.text_4 { + line-height: 27.75rpx; +} +.text_1 { + margin-left: 2.44rpx; +} +.text-wrapper_1 { + padding: 17.66rpx 0 14.64rpx; + background-color: #ffffff; + border-radius: 9.38rpx; + width: 403.13rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_5 { + line-height: 27.69rpx; +} +.text-wrapper_2 { + margin-right: 12.43rpx; + padding: 26.29rpx 0 21.02rpx; + background-color: #ffa400; + border-radius: 9.38rpx; +} +.text_6 { + color: #ffffff; + line-height: 27.69rpx; +} +.list-item { + padding-bottom: 38.57rpx; + background-color: #ffffff; + border-radius: 16.48rpx; + border: solid 1.88rpx #ffeaa7; +} +.list-item:first-child { + margin-top: 0; +} +.group { + padding: 33.62rpx 32.01rpx 31.22rpx 35.33rpx; +} +.font_2 { + font-size: 33.75rpx; + font-family: SourceHanSansCN; + line-height: 31.82rpx; + font-weight: 700; + color: #e88b38; +} +.text_8 { + line-height: 27.86rpx; +} +.text-wrapper_4 { + padding: 18.51rpx 0 15.28rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + height: 61.88rpx; + border: solid 1.88rpx #ffeaa7; +} +.font_3 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.3rpx; + color: #e88b38; +} +.text_7 { + margin-left: 19.41rpx; + margin-right: 10.59rpx; + line-height: 24.34rpx; +} +.section_3 { + margin-left: 33.62rpx; + padding: 17.76rpx 16.14rpx 14.64rpx 17.61rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + border: solid 1.88rpx #ffeaa7; +} +.font_4 { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 27.6rpx; + color: #333333; +} +.text_9 { + line-height: 24.15rpx; + margin-left: 20rpx; +} +.group_2 { + padding: 24.38rpx 33.75rpx 26.25rpx; + border-bottom: solid 1.88rpx #e88b38; +} +.text-wrapper_5 { + padding: 17.72rpx 0 14.53rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + height: 63.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_10 { + margin-left: 17.08rpx; + margin-right: 7.29rpx; + line-height: 27.75rpx; +} +.text-wrapper_6 { + padding: 17.78rpx 0 14.63rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + height: 63.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_11 { + margin-left: 13.93rpx; +} +.group_3 { + margin: 32.81rpx 29.19rpx 0 32.68rpx; + height: 487.5rpx; + display: grid; + grid-template-rows: repeat(3, minmax(0, 1fr)); + grid-template-columns: repeat(3, minmax(0, 1fr)); + row-gap: 29.19rpx; + column-gap: 31.07rpx; +} +.grid-item { + padding: 32.49rpx 18.19rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.font_5 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.3rpx; + color: #66666b; +} +.text_12 { + line-height: 24.02rpx; +} +.font_6 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 20.06rpx; + color: #e88b38; +} +.grid-item_2 { + padding: 32.42rpx 17.87rpx 31.18rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_13 { + line-height: 24.09rpx; +} +.text_15 { + margin-left: 4.39rpx; +} +.grid-item_3 { + padding: 32.16rpx 18rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_14 { + line-height: 24.56rpx; +} +.text_16 { + margin-left: 3.32rpx; +} +.grid-item_4 { + padding: 32.34rpx 17.51rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_17 { + line-height: 24.26rpx; +} +.text_18 { + margin-left: 3.81rpx; +} +.grid-item_5 { + padding: 32.25rpx 18.21rpx 31.18rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.grid-item_6 { + padding: 32.25rpx 19.18rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_19 { + margin-left: 2.14rpx; +} +.grid-item_7 { + padding: 32.36rpx 17.59rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_20 { + line-height: 24.43rpx; +} +.grid-item_8 { + padding: 32.38rpx 17.81rpx 31.18rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_21 { + line-height: 24.17rpx; +} +.text_23 { + margin-left: 4.44rpx; +} +.grid-item_9 { + padding: 33.43rpx 19.18rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_22 { + line-height: 23.08rpx; +} +.text_24 { + margin-left: 2.14rpx; +} \ No newline at end of file diff --git a/pages/dashboardModule/supervisorPerformance/supervisorPerformance.js b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.js new file mode 100644 index 0000000..5d37cd1 --- /dev/null +++ b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.js @@ -0,0 +1,97 @@ +import { baseUrl } from "../../../request"; + +// pages/dashboardModule/supervisorPerformance/supervisorPerformance.js +Page({ + data: { + nickName: '', // 主管名称 + phoneNumber: '', // 手机号 + showList: false, // 是否显示绩效列表 + performanceList: [], // 绩效列表数据,含 ratePercent 字段 + userRole: '', // 用户角色 + }, + + onNameInput(e) { + this.setData({ nickName: e.detail.value }); + }, + onPhoneInput(e) { + this.setData({ phoneNumber: e.detail.value }); + }, + + onSearch() { + const nickName = this.data.nickName.trim(); + const phoneNumber = this.data.phoneNumber.trim(); + + if (!nickName) { + wx.showToast({ title: '请输入主管名称', icon: 'none' }); + return; + } + if (!/^1[3-9]\d{9}$/.test(phoneNumber)) { + wx.showToast({ title: '请输入正确的手机号', icon: 'none' }); + return; + } + + wx.request({ + url: baseUrl + '/perform/query/supervisor', + method: 'POST', + header: { + Authorization: wx.getStorageSync('token') + }, + data: { nickName, phoneNumber }, + success: (res) => { + console.log('--->后端返回记录',res.data); + if (res.data.code === 1) { + // 预处理:给每条记录加一个 ratePercent 字段 + const listWithRate = res.data.data.map(item => { + const ratePercent = (item.rakeRewardsRate * 100).toFixed(2); + return Object.assign({}, item, { ratePercent }); + }); + // 分两次 setData,不链 + this.setData({ performanceList: listWithRate }); + this.setData({ showList: true }); + } else { + wx.showToast({ title: res.data.message || '查询失败', icon: 'none' }); + } + }, + fail: () => { + wx.showToast({ title: '网络错误', icon: 'none' }); + } + }); + }, + + onCopyPhone(e) { + const phone = e.currentTarget.dataset.phone; + wx.setClipboardData({ + data: phone, + success() { + wx.showToast({ title: '手机号已复制', icon: 'success' }); + } + }); + }, + + onLoad(options) { + console.log('--->',options); + this.setData({ + userRole: options.role + }) + let showRole = ''; + switch (options.role) { + case 'manager': + showRole = '主管'; + break; + case 'supervisor': + showRole = '员工'; + break; + } + this.setData({ showRole }); + }, + + changeStaff(e) { + + const { id } = e.currentTarget.dataset; + + wx.navigateTo({ + url: `/pages/dashboardModule/staffPerformance/staffPerformance?supId=${id}`, + }) + }, + +}); diff --git a/pages/dashboardModule/supervisorPerformance/supervisorPerformance.json b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxml b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxml new file mode 100644 index 0000000..45a9356 --- /dev/null +++ b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxml @@ -0,0 +1,131 @@ + + + + {{ showRole }}业绩报表 + + + + + + + {{ showRole }}名称 + + + + + + + + 手机号 + + + + + + + + 搜索 + + + + + + + + + + + + + 编号:{{item.id}} + 主管:{{item.nickName}} + + + 员工绩效排名>> + + + + + + 手机号:{{item.phoneNumber}} + 复制 + + + + + + 员工数:{{item.empCount}} + + + 比例:{{item.ratePercent}}% + + + + + + + 下单量 + {{item.orderCount}} + + + 总订单 + ¥{{item.totalAmount}} + + + 净成交 + ¥{{item.netAmount}} + + + 待释放 + ¥{{item.toRelease}} + + + 可结算 + {{item.toSettle}} + + + 已结算 + ¥{{item.settled}} + + + 推广数 + {{item.promoCount}} + + + 退款 + ¥{{item.refunded}} + + + 已回退 + ¥0 + + + + + + + diff --git a/pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxss b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxss new file mode 100644 index 0000000..890e5d6 --- /dev/null +++ b/pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxss @@ -0,0 +1,289 @@ +.mt-19 { + margin-top: 35.63rpx; +} +.mt-7 { + margin-top: 13.13rpx; +} +.mt-25 { + margin-top: 46.88rpx; +} +.mt-13 { + margin-top: 24.38rpx; +} +.mt-17 { + margin-top: 31.88rpx; +} +.page { + padding: 71.06rpx 42.19rpx 117.19rpx 43.99rpx; + 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.75rpx; +} +.section { + padding: 45.75rpx 39.26rpx 47.94rpx 42.99rpx; + background-color: #ffffff; + border-radius: 18.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.text-wrapper { + padding: 17.63rpx 0 14.63rpx; + background-color: #ffffff; + border-radius: 9.38rpx; + width: 403.13rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_3 { + margin-left: 15.19rpx; +} +.font { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 27.6rpx; + color: #66666b; +} +.text_2 { + margin-left: 2.63rpx; + line-height: 27.75rpx; +} +.text_4 { + line-height: 27.75rpx; +} +.text_1 { + margin-left: 2.44rpx; +} +.text-wrapper_1 { + padding: 17.66rpx 0 14.64rpx; + background-color: #ffffff; + border-radius: 9.38rpx; + width: 403.13rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_5 { + line-height: 27.69rpx; +} +.text-wrapper_2 { + margin-right: 12.43rpx; + padding: 26.29rpx 0 21.02rpx; + background-color: #ffa400; + border-radius: 9.38rpx; +} +.text_6 { + color: #ffffff; + line-height: 27.69rpx; +} +.list-item { + padding-bottom: 38.57rpx; + background-color: #ffffff; + border-radius: 16.48rpx; + border: solid 1.88rpx #ffeaa7; +} +.list-item:first-child { + margin-top: 0; +} +.group { + padding: 33.62rpx 32.01rpx 31.22rpx 35.33rpx; +} +.font_2 { + font-size: 33.75rpx; + font-family: SourceHanSansCN; + line-height: 31.82rpx; + font-weight: 700; + color: #e88b38; +} +.text_8 { + line-height: 27.86rpx; +} +.text-wrapper_4 { + padding: 18.51rpx 0 15.28rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + height: 61.88rpx; + border: solid 1.88rpx #ffeaa7; +} +.font_3 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.3rpx; + color: #e88b38; +} +.text_7 { + margin-left: 19.41rpx; + margin-right: 10.59rpx; + line-height: 24.34rpx; +} +.section_3 { + margin-left: 33.62rpx; + padding: 17.76rpx 16.14rpx 14.64rpx 17.61rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + border: solid 1.88rpx #ffeaa7; +} +.font_4 { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 27.6rpx; + color: #333333; +} +.text_9 { + line-height: 24.15rpx; + margin-left: 20rpx; +} +.group_2 { + padding: 24.38rpx 33.75rpx 26.25rpx; + border-bottom: solid 1.88rpx #e88b38; +} +.text-wrapper_5 { + padding: 17.72rpx 0 14.53rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + height: 63.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_10 { + margin-left: 17.08rpx; + margin-right: 7.29rpx; + line-height: 27.75rpx; +} +.text-wrapper_6 { + padding: 17.78rpx 0 14.63rpx; + background-color: #fefbf6; + border-radius: 9.38rpx; + height: 63.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_11 { + margin-left: 13.93rpx; +} +.group_3 { + margin: 32.81rpx 29.19rpx 0 32.68rpx; + height: 487.5rpx; + display: grid; + grid-template-rows: repeat(3, minmax(0, 1fr)); + grid-template-columns: repeat(3, minmax(0, 1fr)); + row-gap: 29.19rpx; + column-gap: 31.07rpx; +} +.grid-item { + padding: 32.49rpx 18.19rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.font_5 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 24.3rpx; + color: #66666b; +} +.text_12 { + line-height: 24.02rpx; +} +.font_6 { + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 20.06rpx; + color: #e88b38; +} +.grid-item_2 { + padding: 32.42rpx 17.87rpx 31.18rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_13 { + line-height: 24.09rpx; +} +.text_15 { + margin-left: 4.39rpx; +} +.grid-item_3 { + padding: 32.16rpx 18rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_14 { + line-height: 24.56rpx; +} +.text_16 { + margin-left: 3.32rpx; +} +.grid-item_4 { + padding: 32.34rpx 17.51rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_17 { + line-height: 24.26rpx; +} +.text_18 { + margin-left: 3.81rpx; +} +.grid-item_5 { + padding: 32.25rpx 18.21rpx 31.18rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.grid-item_6 { + padding: 32.25rpx 19.18rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_19 { + margin-left: 2.14rpx; +} +.grid-item_7 { + padding: 32.36rpx 17.59rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_20 { + line-height: 24.43rpx; +} +.grid-item_8 { + padding: 32.38rpx 17.81rpx 31.18rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_21 { + line-height: 24.17rpx; +} +.text_23 { + margin-left: 4.44rpx; +} +.grid-item_9 { + padding: 33.43rpx 19.18rpx 31.44rpx; + filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040); + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #f1c40f; +} +.text_22 { + line-height: 23.08rpx; +} +.text_24 { + margin-left: 2.14rpx; +} \ No newline at end of file diff --git a/pages/dashboardModule/userOrderPerformance/userOrderPerformance.js b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.js new file mode 100644 index 0000000..ab9bd03 --- /dev/null +++ b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.js @@ -0,0 +1,108 @@ +import { baseUrl } from "../../../request"; + +// pages/dashboardModule/userOrderPerformance/userOrderPerformance.js +Page({ + data: { + orderNumber: '', // 双向绑定的输入框内容 + staffUserId: 0, // 后期改为动态注入 + OrderItems: [] // 接口返回的订单列表 + }, + + onLoad(options) { + console.log('options-->',options); + this.setData({ + staffUserId: options.userId + }) + this.searchOrderByStaffId() + }, + + // 输入框内容变化 + onOrderNumberInput(e) { + this.setData({ + orderNumber: e.detail.value.trim() + }); + }, + + // 点击搜索按钮 + searchOrder() { + const { orderNumber, staffUserId } = this.data; + + // 简单校验:非空 + if (!orderNumber) { + return wx.showToast({ + title: '请输入订单号', + icon: 'none' + }); + } + + // 发起 POST 请求 + wx.request({ + url: baseUrl + '/perform/query/user', + method: 'POST', + header: { + Authorization: wx.getStorageSync('token') + }, + data: { + orderNumber, + staffUserId + }, + success: (res) => { + if (res.data.code === 1) { + // 更新列表 + this.setData({ + OrderItems: res.data.data + }); + } else { + wx.showToast({ + title: res.data.message || '未找到订单', + icon: 'none' + }); + this.setData({ OrderItems: [] }); + } + }, + fail: () => { + wx.showToast({ + title: '请求失败,请稍后重试', + icon: 'none' + }); + } + }); + }, + + // 根据上级订单搜索 + searchOrderByStaffId() { + const { staffUserId } = this.data; + + // 发起 POST 请求 + wx.request({ + url: baseUrl + '/perform/query/user', + method: 'POST', + header: { + Authorization: wx.getStorageSync('token') + }, + data: { + staffUserId + }, + success: (res) => { + if (res.data.code === 1) { + // 更新列表 + this.setData({ + OrderItems: res.data.data + }); + } else { + wx.showToast({ + title: res.data.message || '未找到订单', + icon: 'none' + }); + this.setData({ OrderItems: [] }); + } + }, + fail: () => { + wx.showToast({ + title: '请求失败,请稍后重试', + icon: 'none' + }); + } + }); + } +}); diff --git a/pages/dashboardModule/userOrderPerformance/userOrderPerformance.json b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxml b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxml new file mode 100644 index 0000000..ae4acc3 --- /dev/null +++ b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxml @@ -0,0 +1,94 @@ + + + 客户订单明细 + + + + + 订单号 + + + + + + + 搜索 + + + + + + + + + 订单号: + {{item.orderNumber}} + + + + 用户: + {{item.nickName}} + + + + 手机号: + {{item.phoneNumber}} + + + + 金额: + ¥{{item.totalAmount}} + + + + 状态: + {{item.orderStatus}} + + + + 抽成: + + 主管:{{item.firstRate * 100}}%,员工:{{item.secondRate * 100}}% + + + + + 奖励: + + 主管:¥{{item.firstReward}},员工:¥{{item.secondReward}} + + + + + 提成状态: + {{item.commissionStatus}} + + + + + + + + + 暂无数据 + + + + diff --git a/pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxss b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxss new file mode 100644 index 0000000..25b2341 --- /dev/null +++ b/pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxss @@ -0,0 +1,174 @@ +.mt-19 { + margin-top: 35.63rpx; +} +.mt-35 { + margin-top: 65.63rpx; +} +.page { + padding: 70.84rpx 42.19rpx 152.81rpx 44.06rpx; + 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: 43.16rpx; +} +.section { + padding: 0 35.76rpx 47.94rpx 41.12rpx; + background-color: #ffffff; + border-radius: 18.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.group { + padding: 47.87rpx 0 51.56rpx; +} +.text-wrapper { + margin-right: 3.77rpx; + margin-top: 14.55rpx; + padding: 17.66rpx 0 14.68rpx; + background-color: #ffffff; + border-radius: 9.38rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_3 { + margin-left: 15.19rpx; + width: 500rpx; +} +.font { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 28.54rpx; + color: #66666b; +} +.text_2 { + margin-left: 2.44rpx; + line-height: 27.45rpx; +} +.text_1 { + line-height: 27.66rpx; +} +.text_4 { + margin-left: 4.31rpx; + margin-top: 36.64rpx; + line-height: 27.6rpx; +} +.group_2 { + margin-top: 16.39rpx; +} +.text-wrapper_2 { + padding: 19.13rpx 0 11.68rpx; + background-color: #ffffff; + border-radius: 9.38rpx; + width: 258.75rpx; + height: 63.75rpx; + border: solid 1.88rpx #ffeaa7; +} +.text_5 { + margin-left: 17.01rpx; + line-height: 29.19rpx; +} +.text_6 { + margin-left: 20.42rpx; + margin-bottom: 26.04rpx; + color: #000000; + font-size: 26.25rpx; + font-family: SourceHanSansCN; + line-height: 1.63rpx; +} +.view { + margin-left: 9.58rpx; +} +.text-wrapper_3 { + margin-left: 2.81rpx; + margin-right: 15.94rpx; + padding: 26.29rpx 0 21.02rpx; + background-color: #ffa400; + border-radius: 9.38rpx; +} +.font_2 { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 28.54rpx; + color: #ffa500; +} +.text_7 { + color: #ffffff; + line-height: 27.69rpx; +} +.list-item { + padding: 44.94rpx 7.14rpx 41.46rpx 29.68rpx; + background-color: #ffffff; + border-radius: 11.89rpx; + border: solid 1.88rpx #ffeaa7; +} +.list-item:first-child { + margin-top: 0; +} +.text_8 { + line-height: 27.66rpx; +} +.font_3 { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 22.76rpx; + color: #444444; +} +.text_9 { + line-height: 28.24rpx; +} +.font_4 { + font-size: 30rpx; + font-family: SourceHanSansCN; + line-height: 28.54rpx; + color: #444444; +} +.text_10 { + margin-right: 19.69rpx; + line-height: 27.84rpx; +} +.text_11 { + line-height: 27.81rpx; +} +.text_12 { + margin-right: 15.06rpx; +} +.text_13 { + line-height: 28.29rpx; +} +.text_24 { + margin-right: 6.41rpx; +} +.text_15 { + line-height: 28.01rpx; +} +.text_16 { + margin-right: 18.77rpx; + line-height: 28.09rpx; +} +.text_17 { + line-height: 28.16rpx; +} +.text_18 { + margin-right: 11.44rpx; +} +.text_19 { + line-height: 28.2rpx; +} +.text_20 { + margin-right: 7.76rpx; +} +.text_21 { + line-height: 28.31rpx; +} +.text_23 { + margin-right: 19.31rpx; + margin-bottom: 2.04rpx; + line-height: 27.79rpx; +} \ No newline at end of file