美化了样式

This commit is contained in:
2025-08-15 00:36:04 +08:00
parent 5fc1378051
commit 1b4d3e310b
63 changed files with 2735 additions and 2411 deletions

View File

@ -1,4 +1,5 @@
import { baseUrl } from "../../../request";
const { notLogin } = require('../../../utils/util')
// pages/dashboardModule/overviewPerformance/overviewPerformance.js
Page({
@ -68,10 +69,7 @@ Page({
// 直接把后端 data 对象铺平到页面 data
this.setData(res.data.data);
} else {
wx.showToast({
title: res.data.message || '获取数据失败',
icon: 'none'
});
notLogin(res.data.message)
}
},
fail: () => {

View File

@ -1,4 +1,5 @@
import { baseUrl } from "../../../request";
const { notLogin } = require('../../../utils/util')
Page({
data: {
@ -120,10 +121,7 @@ Page({
items: res.data.data
});
} else {
wx.showToast({
title: '没有数据',
icon: 'none'
});
notLogin(res.data.message)
}
},
fail: () => {

View File

@ -1,97 +1,127 @@
<view class="flex-col page">
<!-- pages/dashboardModule/ranking/ranking.wxml按你的实际路径命名 -->
<view class="page">
<!-- 页面标题 -->
<text class="self-center text">{{ showRole }}绩效排名</text>
<!-- 表单区域 -->
<view class="flex-col self-stretch mt-27">
<view class="flex-col section">
<!-- 主管名称 -->
<text class="self-start font text_2">{{ showRole }}名称</text>
<view class="flex-col justify-start items-start self-start text-wrapper">
<input class="text_3 font text_4" placeholder="请输入{{ showRole }}名称" bindinput="onNameInput"/>
</view>
<!-- 手机号 -->
<text class="self-start font text_5">手机号</text>
<view class="flex-col justify-start items-start self-start text-wrapper_1">
<input class="text_3 font text_6" placeholder="请输入手机号" bindinput="onPhoneInput"
maxLength="11" type="number"/>
</view>
<!-- 排序条件选择 -->
<text class="self-start font text_7">排序条件</text>
<view class="flex-row equal-division">
<view class="flex-row justify-between section_2 section_1">
<picker wx:if="{{ role === 'manager' }}" mode="selector" range="{{sortFieldsByManager}}" bindchange="onSortFieldChange">
<view class="flex-row justify-between section_2">
<text class="font text_1">{{selectedSortField}}</text>
<image class="image" src="./images/bottom.png"/>
</view>
</picker>
<picker mode="selector" wx:if="{{ role === 'supervisor' || role === 'staff'}}" range="{{sortFieldsBySupervisor}}" bindchange="onSortFieldChange">
<view class="flex-row justify-between section_2">
<text class="font text_1">{{selectedSortField}}</text>
<image class="image" src="./images/bottom.png"/>
</view>
</picker>
<view class="page-title">
<text class="title">{{ showRole }}绩效排名</text>
</view>
<scroll-view scroll-y class="content no-scrollbar">
<!-- 表单卡片 -->
<view class="card form-card">
<!-- 名称 -->
<view class="field">
<text class="field-label">{{ showRole }}名称</text>
<view class="input-box">
<input
class="input"
placeholder="请输入{{ showRole }}名称"
bindinput="onNameInput"
/>
</view>
<!-- 排序顺序 -->
<view class="flex-row justify-between section_2 section_3 ml-16">
<picker mode="selector" range="{{sortOrders}}" bindchange="onSortOrderChange">
<view class="flex-row justify-between section_2">
<text class="font text_16">{{selectedSortOrder}}</text>
<image class="image" src="./images/bottom.png"/>
</view>
</picker>
</view>
<!-- 手机号 -->
<view class="field">
<text class="field-label">手机号</text>
<view class="input-box">
<input
class="input"
placeholder="请输入手机号"
bindinput="onPhoneInput"
maxlength="11"
type="number"
/>
</view>
</view>
<!-- 排序条件 -->
<view class="field">
<text class="field-label">排序条件</text>
<view class="picker-row">
<!-- 排序字段 -->
<view class="picker-box">
<picker wx:if="{{ role === 'manager' }}"
mode="selector"
range="{{ sortFieldsByManager }}"
bindchange="onSortFieldChange">
<view class="picker-inner">
<text class="picker-text">{{ selectedSortField }}</text>
<image class="arrow" src="./images/bottom.png" />
</view>
</picker>
<picker wx:if="{{ role === 'supervisor' || role === 'staff' }}"
mode="selector"
range="{{ sortFieldsBySupervisor }}"
bindchange="onSortFieldChange">
<view class="picker-inner">
<text class="picker-text">{{ selectedSortField }}</text>
<image class="arrow" src="./images/bottom.png" />
</view>
</picker>
</view>
<!-- 排序顺序 -->
<view class="picker-box">
<picker mode="selector"
range="{{ sortOrders }}"
bindchange="onSortOrderChange">
<view class="picker-inner">
<text class="picker-text">{{ selectedSortOrder }}</text>
<image class="arrow" src="./images/bottom.png" />
</view>
</picker>
</view>
</view>
</view>
<!-- 搜索按钮 -->
<view class="flex-col justify-start items-center self-stretch text-wrapper_2" bindtap="onSearch">
<text class="font text_8" >搜索</text>
</view>
<view class="btn btn-primary" bindtap="onSearch">搜索</view>
</view>
</view>
<!-- 查询结果展示 -->
<view class="flex-col mt-26">
<view class="flex-col list-item mt-19" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 排名 -->
<view class="flex-row">
<view class="flex-col justify-start items-center text-wrapper_4">
<text class="font_2 text_9">{{index + 1}}</text>
<!-- 结果列表 -->
<view class="result-wrap">
<view class="card item-card"
wx:for="{{ items }}"
wx:for-item="item"
wx:for-index="index"
wx:key="index">
<!-- 头部:排名 + 基本信息 -->
<view class="item-head">
<view class="rank-badge {{ index < 3 ? 'rank-top' : '' }}">
<text class="rank-text">{{ index + 1 }}</text>
</view>
<view class="person-line">
<text class="name">{{ item.nickName }}</text>
<text class="phone">{{ item.phoneNumber }}</text>
</view>
</view>
<!-- 主管信息 -->
<view class="flex-row items-center self-start group ml-20">
<text class="font_3">{{item.nickName}}</text>
<text class="font_4 ml-7">{{item.phoneNumber}}</text>
<!-- 指标 chips -->
<view class="chips">
<view wx:if="{{ k === '1' }}" class="chip">员工:{{ item.empCount }}</view>
<view class="chip">推广:{{ item.promoCount }}</view>
<view class="chip">下单:{{ item.orderCount }}</view>
</view>
<!-- 金额类键值行 -->
<view class="kv">
<text class="kv-key">总额</text>
<text class="kv-val money">¥{{ item.totalAmount }}</text>
</view>
<view class="kv">
<text class="kv-key">净成交</text>
<text class="kv-val money">¥{{ item.netAmount }}</text>
</view>
</view>
<!-- 绩效数据 -->
<view class="flex-row mt-14">
<view class="flex-col justify-start items-center text-wrapper_5" wx:if="{{k === '1'}}">
<text class="font_5 text_11">员工:{{item.empCount}}</text>
</view>
<view class="flex-col justify-start items-center text-wrapper_6">
<text class="font_5 text_12">推广:{{item.promoCount}}</text>
</view>
<view class="flex-col justify-start items-center text-wrapper_7 ml-8">
<text class="font_5">下单:{{item.orderCount}}</text>
</view>
</view>
<!-- 订单金额 -->
<view class="flex-row mt-14">
<view class="flex-col justify-start text-wrapper_8">
<text class="font_5 text_13">总额:¥{{item.totalAmount}}</text>
</view>
<view class="flex-col justify-start text-wrapper_9 ml-16">
<text class="font_5 text_14">净成交:¥{{item.netAmount}}</text>
</view>
<!-- 空状态 -->
<view wx:if="{{ !items || !items.length }}" class="empty">
<image class="empty-img" src="/assets/empty-list.png" mode="aspectFit" />
<text class="empty-text">暂无数据</text>
</view>
</view>
</view>
</scroll-view>
</view>

View File

@ -1,220 +1,188 @@
.mt-27 {
margin-top: 50.63rpx;
}
.mt-19 {
margin-top: 35.63rpx;
}
.ml-7 {
margin-left: 13.13rpx;
}
/* ===== 页面框架 ===== */
.page {
padding: 71.06rpx 42.19rpx 199.69rpx 44.06rpx;
background-color: #fefbf6;
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
background: #fefbf6;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.page-title {
padding: 24rpx 24rpx 0;
}
.title {
font-size: 40rpx;
font-weight: 700;
color: #e67e22; /* 主色:暖橙 */
}
.content {
flex: 1;
padding: 24rpx;
box-sizing: border-box;
}
/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar {
width: 0;
height: 0;
display: none;
}
/* ===== 卡片通用 ===== */
.card {
background: #ffffff;
border-radius: 18rpx;
padding: 24rpx;
border: 2rpx solid #ffeaa7; /* 与你项目的浅橙描边一致 */
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.05);
}
.card + .card { margin-top: 20rpx; }
/* ===== 表单区 ===== */
.form-card .field + .field { margin-top: 20rpx; }
.field-label {
font-size: 28rpx;
color: #555555;
margin-bottom: 12rpx;
display: block;
}
/* 输入框 */
.input-box {
height: 84rpx;
border-radius: 12rpx;
border: 2rpx solid #ffeaa7;
background: #ffffff;
padding: 0 20rpx;
display: flex;
align-items: center;
}
.input {
flex: 1;
font-size: 28rpx;
color: #1f1f1f;
}
/* 选择器行 */
.picker-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16rpx;
}
.picker-box {
height: 84rpx;
border-radius: 12rpx;
border: 2rpx solid #ffeaa7;
background: #ffffff;
display: flex;
align-items: center;
}
.picker-inner {
padding: 0 20rpx;
width: 100%;
position: fixed;
bottom: 0;
overflow: auto;
height: calc(100vh - 1rpx);
height: 84rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.text {
color: #e67e22;
font-size: 45rpx;
font-family: SourceHanSansCN;
font-weight: 700;
line-height: 42.84rpx;
}
.section {
padding: 45.75rpx 42.99rpx 34.82rpx;
background-color: #ffffff;
border-radius: 23.47rpx;
border: solid 1.88rpx #ffeaa7;
}
.text-wrapper {
margin-top: 14.49rpx;
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 {
.picker-text { font-size: 28rpx; color: #1f1f1f; }
.arrow { width: 28rpx; height: 28rpx; }
/* 搜索按钮 */
.btn {
height: 88rpx;
border-radius: 999rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 28.14rpx;
color: #66666b;
font-weight: 600;
margin-top: 24rpx;
}
.text_2 {
margin-left: 2.63rpx;
line-height: 27.75rpx;
}
.text_4 {
line-height: 27.75rpx;
}
.text_5 {
margin-left: 2.44rpx;
margin-top: 41.32rpx;
line-height: 27.6rpx;
}
.text-wrapper_1 {
margin-top: 14.51rpx;
padding: 17.66rpx 0 14.64rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
width: 403.13rpx;
border: solid 1.88rpx #ffeaa7;
}
.text_6 {
line-height: 27.69rpx;
}
.text_7 {
margin-left: 2.19rpx;
margin-top: 41.18rpx;
line-height: 27.84rpx;
}
.equal-division {
align-self: stretch;
margin-right: 4.01rpx;
margin-top: 16.29rpx;
}
.section_2 {
flex: 1 1 270rpx;
}
.section_1 {
padding: 17.68rpx 14.19rpx 14.34rpx 14.89rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
height: 63.75rpx;
border: solid 1.88rpx #ffeaa7;
}
.text_1 {
line-height: 27.94rpx;
}
.image {
width: 26.25rpx;
height: 26.25rpx;
}
.section_3 {
padding: 17.61rpx 16.27rpx 14.55rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
height: 63.75rpx;
border: solid 1.88rpx #ffeaa7;
}
.text_16 {
line-height: 27.84rpx;
}
.text-wrapper_2 {
margin: 32.81rpx 4.97rpx 0 4.69rpx;
padding: 26.29rpx 0 21.02rpx;
background-color: #ffa400;
border-radius: 9.38rpx;
}
.text_8 {
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
color: #ffffff;
line-height: 27.69rpx;
box-shadow: 0 6rpx 14rpx rgba(230,126,34,0.30);
}
.list-item {
padding: 29.89rpx 29.87rpx 31.99rpx 33.62rpx;
background-color: #ffffff;
border-radius: 18.75rpx;
border: solid 1.88rpx #ffeaa7;
/* ===== 列表与条目 ===== */
.result-wrap { margin-top: 20rpx; }
.item-card { padding-top: 20rpx; }
/* 顶部信息 */
.item-head {
display: flex;
align-items: center;
gap: 16rpx;
margin-bottom: 8rpx;
}
.list-item:first-child {
margin-top: 0;
.rank-badge {
width: 64rpx;
height: 64rpx;
border-radius: 999rpx;
background: #f0f0f0;
border: 2rpx solid #e6e6e6;
display: flex;
align-items: center;
justify-content: center;
}
.text-wrapper_4 {
padding: 17.93rpx 0 12.34rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
width: 52.5rpx;
height: 56.25rpx;
border: solid 1.88rpx #ffa400;
.rank-top {
background: #fff6e6;
border-color: #ffd6b3;
}
.font_2 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 24.02rpx;
.rank-text {
font-size: 28rpx;
font-weight: 700;
color: #ffa400;
color: #333333;
}
.text_9 {
line-height: 22.24rpx;
.person-line {
display: flex;
align-items: baseline;
gap: 12rpx;
flex-wrap: wrap;
}
.group {
margin-top: 22.18rpx;
.name { font-size: 30rpx; font-weight: 600; color: #1f1f1f; }
.phone { font-size: 26rpx; color: #666666; }
/* 指标 Chips */
.chips {
display: flex;
gap: 12rpx;
flex-wrap: wrap;
margin: 8rpx 0 4rpx;
}
.font_3 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 28.14rpx;
color: #000000;
.chip {
padding: 10rpx 16rpx;
background: #f7f9fc;
color: #3d4f6e;
border: 1rpx solid #e6edf7;
border-radius: 12rpx;
font-size: 24rpx;
}
.font_4 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 19.93rpx;
color: #66666b;
/* 金额类键值行 */
.kv {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12rpx 0;
border-top: 1rpx dashed #f0f0f0;
}
.text-wrapper_5 {
padding: 16.71rpx 0 12.71rpx;
background-color: #ffffff;
border-radius: 28.13rpx;
width: 146.25rpx;
height: 56.25rpx;
border: solid 1.88rpx #ffa400;
margin-right: 15rpx;
.kv:first-of-type { border-top: 0; }
.kv-key { font-size: 26rpx; color: #666666; }
.kv-val { font-size: 28rpx; color: #1f1f1f; }
.money { color: #e67e22; font-weight: 700; }
/* ===== 空状态 ===== */
.empty {
padding: 120rpx 0 40rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #999999;
}
.font_5 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.02rpx;
color: #000000;
}
.text_11 {
line-height: 23.08rpx;
}
.text-wrapper_6 {
padding: 15.51rpx 0 12.56rpx;
background-color: #ffffff;
border-radius: 28.13rpx;
width: 146.25rpx;
height: 56.25rpx;
border: solid 1.88rpx #ffa400;
}
.text_12 {
line-height: 24.43rpx;
}
.text-wrapper_7 {
padding: 15.62rpx 0 12.86rpx;
background-color: #ffffff;
border-radius: 28.13rpx;
width: 146.25rpx;
height: 56.25rpx;
border: solid 1.88rpx #ffa400;
}
.text-wrapper_8 {
padding: 14.87rpx 0 13.41rpx;
background-color: #ffffff;
border-radius: 28.13rpx;
height: 56.25rpx;
border: solid 1.88rpx #ffa400;
}
.text_13 {
margin: 0 16.86rpx;
line-height: 24.23rpx;
}
.text-wrapper_9 {
padding: 14.61rpx 0 13.33rpx;
background-color: #ffffff;
border-radius: 28.13rpx;
height: 56.25rpx;
border: solid 1.88rpx #ffa400;
}
.text_14 {
margin: 0 18.86rpx;
line-height: 24.56rpx;
}
.empty-img { width: 300rpx; height: 300rpx; margin-bottom: 16rpx; }
.empty-text { font-size: 26rpx; }

View File

@ -1,4 +1,5 @@
import { baseUrl } from "../../../request";
const { notLogin } = require('../../../utils/util')
// pages/dashboardModule/supervisorPerformance/supervisorPerformance.js
Page({
@ -45,7 +46,7 @@ Page({
this.setData({ performanceList: listWithRate });
this.setData({ showList: true });
} else {
wx.showToast({ title: res.data.message || '查询失败', icon: 'none' });
notLogin(res.data.message)
}
},
fail: () => {

View File

@ -1,132 +1,128 @@
<!-- pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxml -->
<view class="flex-col page">
<view class="page">
<!-- 标题 -->
<text class="self-center text">员工业绩报表</text>
<view class="page-title">
<text class="title">员工业绩报表</text>
</view>
<!-- 搜索表单 -->
<view class="flex-col self-stretch mt-19">
<view class="flex-col section">
<!-- 主管名称 -->
<view class="flex-col items-start">
<text class="font text_2">员工名称</text>
<view class="flex-col justify-start items-start text-wrapper mt-7">
<scroll-view scroll-y class="content no-scrollbar">
<!-- 搜索表单 -->
<view class="card form-card">
<!-- 员工名称 -->
<view class="field">
<text class="field-label">员工名称</text>
<view class="input-box">
<input
class="text_3 font text_4"
class="input"
placeholder="请输入员工名称"
placeholder-class="ph"
bindinput="onNameInput"
value="{{nickName}}"
value="{{ nickName }}"
/>
</view>
</view>
<!-- 手机号 -->
<view class="flex-col items-start mt-24">
<text class="font text_1">手机号</text>
<view class="flex-col justify-start items-start text-wrapper_1 mt-8">
<view class="field">
<text class="field-label">手机号</text>
<view class="input-box">
<input
class="text_3 font text_5"
class="input"
placeholder="请输入手机号"
placeholder-class="ph"
bindinput="onPhoneInput"
value="{{phoneNumber}}"
value="{{ phoneNumber }}"
type="number"
maxLength="11"
maxlength="11"
/>
</view>
</view>
<!-- 搜索按钮 -->
<view
class="flex-col justify-start items-center text-wrapper_2 mt-24"
bindtap="onSearch"
>
<text class="font text_6">搜索</text>
</view>
<!-- 搜索 -->
<view class="btn btn-primary" bindtap="onSearch">搜索</view>
</view>
</view>
<!-- 业绩列表,未搜索前不显示 -->
<block wx:if="{{showList}}">
<view class="flex-col justify-start mt-28">
<view class="flex-col">
<view
class="flex-col list-item mt-25"
wx:for="{{performanceList}}"
wx:for-item="item"
wx:for-index="index"
wx:key="item.id"
>
<!-- 基本信息 -->
<view class="flex-row justify-between self-stretch group">
<view class="flex-col items-start self-center">
<text class="font_2">编号:{{index + 1}}</text>
<text class="font text_8 mt-13">员工:{{item.nickName}}</text>
</view>
<view class="flex-col justify-start self-start text-wrapper_4" bind:tap="gotoUser" data-id="{{ item.userId }}">
<text class="font_3 text_7">客户订单明细>></text>
</view>
<!-- 业绩列表 -->
<block wx:if="{{ showList }}">
<!-- 空状态(可选) -->
<view wx:if="{{ !performanceList || performanceList.length === 0 }}" class="empty">
<image class="empty-img" src="/assets/empty-list.png" mode="aspectFit" />
<text class="empty-text">暂无数据</text>
</view>
<!-- 列表卡片 -->
<view wx:for="{{ performanceList }}"
wx:key="item.id"
wx:for-item="item"
wx:for-index="index"
class="card perf-card">
<!-- 顶部:编号 + 员工 + 跳转 -->
<view class="topline">
<view class="id-and-name">
<text class="no">编号:{{ index + 1 }}</text>
<text class="name">员工:{{ item.nickName }}</text>
</view>
<!-- 手机号 & 复制 -->
<view class="flex-row self-start section_3">
<text class="font_4">手机号:{{item.phoneNumber}}</text>
<text
class="font_3 text_9"
bindtap="onCopyPhone"
data-phone="{{item.phoneNumber}}"
>复制</text>
<view class="link-btn" bind:tap="gotoUser" data-id="{{ item.userId }}">
<text class="link-text">客户订单明细 >></text>
</view>
</view>
<!-- 员工数 & 抽成比例 -->
<view class="flex-row self-stretch group_2">
<view class="flex-col justify-start text-wrapper_5">
<text class="font_4 text_10">客户数:{{item.empCount}}</text>
</view>
<view class="flex-col justify-start text-wrapper_6 ml-10">
<text class="font_4 text_11">比例:{{item.ratePercent}}%</text>
</view>
<!-- 手机号 + 复制 -->
<view class="row">
<text class="row-key">手机号</text>
<view class="row-val">
<text class="mono">{{ item.phoneNumber }}</text>
<text class="copy" bindtap="onCopyPhone" data-phone="{{ item.phoneNumber }}">复制</text>
</view>
</view>
<!-- 业绩网格 -->
<view class="self-stretch group_3">
<view class="flex-col items-start grid-item">
<text class="font_5 text_12">下单量</text>
<text class="font_6 mt-18">{{item.orderCount}}</text>
</view>
<view class="flex-col items-start grid-item_2">
<text class="font_5 text_13">总订单</text>
<text class="font_6 text_15 mt-18">¥{{item.totalAmount}}</text>
</view>
<view class="flex-col items-start grid-item_3">
<text class="font_5 text_14">净成交</text>
<text class="font_6 text_16 mt-17">¥{{item.netAmount}}</text>
</view>
<view class="flex-col items-start grid-item_4">
<text class="font_5 text_17">待释放</text>
<text class="font_6 text_18 mt-18">¥{{item.toRelease}}</text>
</view>
<view class="flex-col items-start grid-item_5">
<text class="font_5">可结算</text>
<text class="font_6 mt-18">{{item.toSettle}}</text>
</view>
<view class="flex-col items-start grid-item_6">
<text class="font_5">已结算</text>
<text class="font_6 text_19 mt-18">¥{{item.settled}}</text>
</view>
<view class="flex-col items-start grid-item_7">
<text class="font_5 text_20">推广数</text>
<text class="font_6 mt-17">{{item.promoCount}}</text>
</view>
<view class="flex-col items-start grid-item_8">
<text class="font_5 text_21">退款</text>
<text class="font_6 text_23 mt-18">¥{{item.refunded}}</text>
</view>
<view class="flex-col items-start grid-item_9">
<text class="font_5 text_22">已回退</text>
<text class="font_6 text_24 mt-18">¥0</text>
</view>
<!-- 客户数 + 抽成比例(徽章) -->
<view class="chips">
<view class="chip">客户数:{{ item.empCount }}</view>
<view class="chip">比例:{{ item.ratePercent }}%</view>
</view>
<!-- 业绩九宫格 -->
<view class="grid">
<view class="grid-item">
<text class="gi-label">下单量</text>
<text class="gi-value">{{ item.orderCount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">总订单</text>
<text class="gi-value money">¥{{ item.totalAmount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">净成交</text>
<text class="gi-value money">¥{{ item.netAmount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">待释放</text>
<text class="gi-value money">¥{{ item.toRelease }}</text>
</view>
<view class="grid-item">
<text class="gi-label">可结算</text>
<text class="gi-value">{{ item.toSettle }}</text>
</view>
<view class="grid-item">
<text class="gi-label">已结算</text>
<text class="gi-value money">¥{{ item.settled }}</text>
</view>
<view class="grid-item">
<text class="gi-label">推广数</text>
<text class="gi-value">{{ item.promoCount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">退款</text>
<text class="gi-value money">¥{{ item.refunded }}</text>
</view>
<view class="grid-item">
<text class="gi-label">已回退</text>
<text class="gi-value money">¥0</text>
</view>
</view>
</view>
</view>
</block>
</block>
</scroll-view>
</view>

View File

@ -1,290 +1,176 @@
.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%;
position: fixed;
bottom: 0;
overflow: auto;
height: calc(100vh - 1rpx);
background: #fefbf6; /* 暖米黄背景 */
min-height: 100vh;
display: flex;
flex-direction: column;
}
.text {
color: #e67e22;
font-size: 45rpx;
font-family: SourceHanSansCN;
.page-title { padding: 24rpx 24rpx 0; }
.title {
color: #e67e22; /* 暖橙主色 */
font-size: 40rpx;
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;
.content {
flex: 1;
padding: 24rpx;
box-sizing: border-box;
}
.text-wrapper {
padding: 17.63rpx 0 14.63rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
width: 403.13rpx;
border: solid 1.88rpx #ffeaa7;
/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* 卡片 */
.card {
background: #ffffff;
border-radius: 18rpx;
padding: 24rpx;
border: 2rpx solid #ffeaa7; /* 浅橙描边 */
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.05);
}
.text_3 {
margin-left: 15.19rpx;
.card + .card { margin-top: 20rpx; }
/* 表单 */
.form-card .field + .field { margin-top: 20rpx; }
.field-label {
font-size: 28rpx;
color: #555555;
margin-bottom: 12rpx;
display: block;
}
.font {
.input-box {
background: #ffffff;
border: 2rpx solid #ffeaa7;
border-radius: 12rpx;
padding: 0 20rpx;
height: 84rpx;
display: flex;
align-items: center;
}
.input {
flex: 1;
font-size: 28rpx;
color: #1f1f1f;
}
.ph { color: #b8b8b8; }
/* 按钮 */
.btn {
height: 88rpx;
border-radius: 999rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.6rpx;
color: #66666b;
font-weight: 600;
margin-top: 24rpx;
}
.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 {
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
color: #ffffff;
line-height: 27.69rpx;
box-shadow: 0 6rpx 14rpx rgba(230,126,34,0.30);
}
.list-item {
padding-bottom: 38.57rpx;
background-color: #ffffff;
border-radius: 16.48rpx;
border: solid 1.88rpx #ffeaa7;
/* 空状态 */
.empty {
padding: 120rpx 0 40rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #999999;
}
.list-item:first-child {
margin-top: 0;
.empty-img { width: 300rpx; height: 300rpx; margin-bottom: 16rpx; }
.empty-text { font-size: 26rpx; }
/* 列表头部行 */
.topline {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16rpx;
margin-bottom: 8rpx;
}
.group {
padding: 33.62rpx 32.01rpx 31.22rpx 35.33rpx;
.id-and-name {
display: flex;
align-items: baseline;
gap: 16rpx;
flex-wrap: wrap;
}
.font_2 {
font-size: 33.75rpx;
font-family: SourceHanSansCN;
line-height: 31.82rpx;
font-weight: 700;
color: #e88b38;
.no { font-size: 24rpx; color: #666666; }
.name { font-size: 28rpx; color: #1f1f1f; font-weight: 600; }
.link-btn {
height: 56rpx;
padding: 0 18rpx;
border-radius: 999rpx;
background: #fff6e6;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1rpx solid #ffd6b3;
}
.text_8 {
line-height: 27.86rpx;
.link-text { font-size: 24rpx; color: #e67e22; font-weight: 600; }
/* 键值行 */
.row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12rpx 0;
border-top: 1rpx dashed #f0f0f0;
}
.text-wrapper_4 {
padding: 18.51rpx 0 15.28rpx;
background-color: #fefbf6;
border-radius: 9.38rpx;
height: 61.88rpx;
border: solid 1.88rpx #ffeaa7;
.row-key { font-size: 26rpx; color: #666666; }
.row-val { display: flex; align-items: center; gap: 16rpx; }
.mono { font-size: 28rpx; color: #1f1f1f; font-family: monospace; letter-spacing: 1rpx; }
.copy {
font-size: 24rpx;
color: #e67e22;
padding: 8rpx 14rpx;
border-radius: 12rpx;
background: #fff4f2;
border: 1rpx solid #ffd6cc;
}
.font_3 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.3rpx;
color: #e88b38;
/* 徽章 Chips */
.chips { display: flex; gap: 12rpx; flex-wrap: wrap; margin: 12rpx 0 4rpx; }
.chip {
padding: 10rpx 16rpx;
background: #f7f9fc;
color: #3d4f6e;
border: 1rpx solid #e6edf7;
border-radius: 12rpx;
font-size: 24rpx;
}
.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 {
margin-top: 8rpx;
margin-left: -10rpx;
margin-right: -10rpx;
display: flex;
flex-wrap: wrap;
}
.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;
width: 33.3333%;
padding: 14rpx 10rpx;
box-sizing: border-box;
}
.font_5 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.3rpx;
color: #66666b;
.gi-label { font-size: 24rpx; color: #666666; }
.gi-value {
display: block;
margin-top: 10rpx;
font-size: 30rpx;
font-weight: 700;
color: #1f1f1f;
}
.text_12 {
line-height: 24.02rpx;
.gi-value.money { color: #e67e22; }
/* 小屏两列适配 */
@media (max-width: 360px) {
.grid-item { width: 50%; }
}
.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;
}

View File

@ -1,4 +1,5 @@
import { baseUrl } from "../../../request";
const { notLogin } = require('../../../utils/util')
// pages/dashboardModule/supervisorPerformance/supervisorPerformance.js
Page({
@ -44,7 +45,7 @@ Page({
this.setData({ performanceList: listWithRate });
this.setData({ showList: true });
} else {
wx.showToast({ title: res.data.message || '查询失败', icon: 'none' });
notLogin(res.data.message)
}
},
fail: () => {

View File

@ -1,132 +1,128 @@
<!-- pages/dashboardModule/supervisorPerformance/supervisorPerformance.wxml -->
<view class="flex-col page">
<view class="page">
<!-- 标题 -->
<text class="self-center text">{{ showRole }}业绩报表</text>
<view class="page-title">
<text class="title">{{ showRole }}业绩报表</text>
</view>
<!-- 搜索表单 -->
<view class="flex-col self-stretch mt-19">
<view class="flex-col section">
<scroll-view scroll-y class="content no-scrollbar">
<!-- 搜索表单 -->
<view class="card form-card">
<!-- 主管名称 -->
<view class="flex-col items-start">
<text class="font text_2">{{ showRole }}名称</text>
<view class="flex-col justify-start items-start text-wrapper mt-7">
<view class="field">
<text class="field-label">{{ showRole }}名称</text>
<view class="input-box">
<input
class="text_3 font text_4"
class="input"
placeholder="请输入{{ showRole }}名称"
placeholder-class="ph"
bindinput="onNameInput"
value="{{nickName}}"
value="{{ nickName }}"
/>
</view>
</view>
<!-- 手机号 -->
<view class="flex-col items-start mt-24">
<text class="font text_1">手机号</text>
<view class="flex-col justify-start items-start text-wrapper_1 mt-8">
<view class="field">
<text class="field-label">手机号</text>
<view class="input-box">
<input
class="text_3 font text_5"
class="input"
placeholder="请输入手机号"
placeholder-class="ph"
bindinput="onPhoneInput"
value="{{phoneNumber}}"
value="{{ phoneNumber }}"
type="number"
maxLength="11"
maxlength="11"
/>
</view>
</view>
<!-- 搜索按钮 -->
<view
class="flex-col justify-start items-center text-wrapper_2 mt-24"
bindtap="onSearch"
>
<text class="font text_6">搜索</text>
</view>
<view class="btn btn-primary" bindtap="onSearch">搜索</view>
</view>
</view>
<!-- 业绩列表,未搜索前不显示 -->
<block wx:if="{{showList}}">
<view class="flex-col justify-start mt-28">
<view class="flex-col">
<view
class="flex-col list-item mt-25"
wx:for="{{performanceList}}"
wx:for-item="item"
wx:for-index="index"
wx:key="item.id"
>
<!-- 基本信息 -->
<view class="flex-row justify-between self-stretch group">
<view class="flex-col items-start self-center">
<text class="font_2">编号:{{index + 1}}</text>
<text class="font text_8 mt-13">主管:{{item.nickName}}</text>
</view>
<view class="flex-col justify-start self-start text-wrapper_4" bind:tap="changeStaff" data-id="{{ item.userId }}">
<text class="font_3 text_7">员工绩效排名>></text>
</view>
<!-- 业绩列表(按需显示 -->
<block wx:if="{{ showList }}">
<!-- 空状态(可选) -->
<view wx:if="{{ !performanceList || performanceList.length === 0 }}" class="empty">
<image class="empty-img" src="/assets/empty-list.png" mode="aspectFit" />
<text class="empty-text">暂无数据</text>
</view>
<!-- 列表卡片 -->
<view wx:for="{{ performanceList }}"
wx:for-item="item"
wx:for-index="index"
wx:key="item.id"
class="card perf-card">
<!-- 顶部:编号 + 主管 + 跳转员工绩效 -->
<view class="topline">
<view class="id-and-name">
<text class="no">编号:{{ index + 1 }}</text>
<text class="name">主管:{{ item.nickName }}</text>
</view>
<!-- 手机号 & 复制 -->
<view class="flex-row self-start section_3">
<text class="font_4">手机号:{{item.phoneNumber}}</text>
<text
class="font_3 text_9"
bindtap="onCopyPhone"
data-phone="{{item.phoneNumber}}"
>复制</text>
<view class="link-btn" bind:tap="changeStaff" data-id="{{ item.userId }}">
<text class="link-text">员工绩效排名 >></text>
</view>
</view>
<!-- 员工数 & 抽成比例 -->
<view class="flex-row self-stretch group_2">
<view class="flex-col justify-start text-wrapper_5">
<text class="font_4 text_10">员工数:{{item.empCount}}</text>
</view>
<view class="flex-col justify-start text-wrapper_6 ml-10">
<text class="font_4 text_11">比例:{{item.ratePercent}}%</text>
</view>
<!-- 手机号 + 复制 -->
<view class="row">
<text class="row-key">手机号</text>
<view class="row-val">
<text class="mono">{{ item.phoneNumber }}</text>
<text class="copy" bindtap="onCopyPhone" data-phone="{{ item.phoneNumber }}">复制</text>
</view>
</view>
<!-- 业绩网格 -->
<view class="self-stretch group_3">
<view class="flex-col items-start grid-item">
<text class="font_5 text_12">下单量</text>
<text class="font_6 mt-18">{{item.orderCount}}</text>
</view>
<view class="flex-col items-start grid-item_2">
<text class="font_5 text_13">总订单</text>
<text class="font_6 text_15 mt-18">¥{{item.totalAmount}}</text>
</view>
<view class="flex-col items-start grid-item_3">
<text class="font_5 text_14">净成交</text>
<text class="font_6 text_16 mt-17">¥{{item.netAmount}}</text>
</view>
<view class="flex-col items-start grid-item_4">
<text class="font_5 text_17">待释放</text>
<text class="font_6 text_18 mt-18">¥{{item.toRelease}}</text>
</view>
<view class="flex-col items-start grid-item_5">
<text class="font_5">可结算</text>
<text class="font_6 mt-18">{{item.toSettle}}</text>
</view>
<view class="flex-col items-start grid-item_6">
<text class="font_5">已结算</text>
<text class="font_6 text_19 mt-18">¥{{item.settled}}</text>
</view>
<view class="flex-col items-start grid-item_7">
<text class="font_5 text_20">推广数</text>
<text class="font_6 mt-17">{{item.promoCount}}</text>
</view>
<view class="flex-col items-start grid-item_8">
<text class="font_5 text_21">退款</text>
<text class="font_6 text_23 mt-18">¥{{item.refunded}}</text>
</view>
<view class="flex-col items-start grid-item_9">
<text class="font_5 text_22">已回退</text>
<text class="font_6 text_24 mt-18">¥0</text>
</view>
<!-- 员工数 + 抽成比例(徽标 chip -->
<view class="chips">
<view class="chip">员工数:{{ item.empCount }}</view>
<view class="chip">比例:{{ item.ratePercent }}%</view>
</view>
<!-- 业绩九宫格 -->
<view class="grid">
<view class="grid-item">
<text class="gi-label">下单量</text>
<text class="gi-value">{{ item.orderCount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">总订单</text>
<text class="gi-value">¥{{ item.totalAmount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">净成交</text>
<text class="gi-value">¥{{ item.netAmount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">待释放</text>
<text class="gi-value">¥{{ item.toRelease }}</text>
</view>
<view class="grid-item">
<text class="gi-label">可结算</text>
<text class="gi-value">{{ item.toSettle }}</text>
</view>
<view class="grid-item">
<text class="gi-label">已结算</text>
<text class="gi-value">¥{{ item.settled }}</text>
</view>
<view class="grid-item">
<text class="gi-label">推广数</text>
<text class="gi-value">{{ item.promoCount }}</text>
</view>
<view class="grid-item">
<text class="gi-label">退款</text>
<text class="gi-value">¥{{ item.refunded }}</text>
</view>
<view class="grid-item">
<text class="gi-label">已回退</text>
<text class="gi-value">¥0</text>
</view>
</view>
</view>
</view>
</block>
</block>
</scroll-view>
</view>

View File

@ -1,290 +1,237 @@
.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%;
position: fixed;
bottom: 0;
overflow: auto;
height: calc(100vh - 1rpx);
background: #fefbf6;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.text {
color: #e67e22;
font-size: 45rpx;
font-family: SourceHanSansCN;
.page-title {
padding: 24rpx 24rpx 0;
}
.title {
color: #e67e22; /* 主标题暖橙 */
font-size: 40rpx;
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;
.content {
flex: 1;
padding: 24rpx;
box-sizing: border-box;
}
.text-wrapper {
padding: 17.63rpx 0 14.63rpx;
background-color: #ffffff;
border-radius: 9.38rpx;
width: 403.13rpx;
border: solid 1.88rpx #ffeaa7;
.no-scrollbar::-webkit-scrollbar {
width: 0;
height: 0;
display: none;
}
.text_3 {
margin-left: 15.19rpx;
/* ===== 卡片通用 ===== */
.card {
background: #ffffff;
border-radius: 18rpx;
padding: 24rpx;
border: 2rpx solid #ffeaa7; /* 浅橙描边 */
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.05);
}
.font {
.card + .card { margin-top: 20rpx; }
/* ===== 表单 ===== */
.form-card .field + .field { margin-top: 20rpx; }
.field-label {
font-size: 28rpx;
color: #555555;
margin-bottom: 12rpx;
display: block;
}
.input-box {
background: #ffffff;
border: 2rpx solid #ffeaa7;
border-radius: 12rpx;
padding: 0 20rpx;
height: 84rpx;
display: flex;
align-items: center;
}
.input {
flex: 1;
font-size: 28rpx;
color: #1f1f1f;
}
.ph {
color: #b8b8b8;
}
/* 按钮 */
.btn {
height: 88rpx;
border-radius: 999rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.6rpx;
color: #66666b;
font-weight: 600;
margin-top: 24rpx;
}
.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 {
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
color: #ffffff;
line-height: 27.69rpx;
box-shadow: 0 6rpx 14rpx rgba(230, 126, 34, 0.30);
}
.list-item {
padding-bottom: 38.57rpx;
background-color: #ffffff;
border-radius: 16.48rpx;
border: solid 1.88rpx #ffeaa7;
/* ===== 空状态 ===== */
.empty {
padding: 120rpx 0 40rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #999999;
}
.list-item:first-child {
margin-top: 0;
.empty-img { width: 300rpx; height: 300rpx; margin-bottom: 16rpx; }
.empty-text { font-size: 26rpx; }
/* ===== 业绩卡片 ===== */
.topline {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16rpx;
margin-bottom: 8rpx;
}
.group {
padding: 33.62rpx 32.01rpx 31.22rpx 35.33rpx;
.id-and-name {
display: flex;
align-items: baseline;
gap: 16rpx;
flex-wrap: wrap;
}
.font_2 {
font-size: 33.75rpx;
font-family: SourceHanSansCN;
line-height: 31.82rpx;
font-weight: 700;
color: #e88b38;
.no {
font-size: 24rpx;
color: #666666;
}
.text_8 {
line-height: 27.86rpx;
.name {
font-size: 28rpx;
color: #1f1f1f;
font-weight: 600;
}
.text-wrapper_4 {
padding: 18.51rpx 0 15.28rpx;
background-color: #fefbf6;
border-radius: 9.38rpx;
height: 61.88rpx;
border: solid 1.88rpx #ffeaa7;
.link-btn {
height: 56rpx;
padding: 0 18rpx;
border-radius: 999rpx;
background: #fff6e6;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1rpx solid #ffd6b3;
}
.font_3 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.3rpx;
color: #e88b38;
.link-text {
font-size: 24rpx;
color: #e67e22;
font-weight: 600;
}
.text_7 {
margin-left: 19.41rpx;
margin-right: 10.59rpx;
line-height: 24.34rpx;
/* 行:键值对 */
.row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12rpx 0;
border-top: 1rpx dashed #f0f0f0;
}
.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;
.row-key {
font-size: 26rpx;
color: #666666;
}
.font_4 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 27.6rpx;
color: #333333;
.row-val {
display: flex;
align-items: center;
gap: 16rpx;
}
.text_9 {
line-height: 24.15rpx;
margin-left: 20rpx;
.mono {
font-size: 28rpx;
color: #1f1f1f;
font-family: monospace;
letter-spacing: 1rpx;
}
.group_2 {
padding: 24.38rpx 33.75rpx 26.25rpx;
border-bottom: solid 1.88rpx #e88b38;
.copy {
font-size: 24rpx;
color: #e67e22;
padding: 8rpx 14rpx;
border-radius: 12rpx;
background: #fff4f2;
border: 1rpx solid #ffd6cc;
}
.text-wrapper_5 {
padding: 17.72rpx 0 14.53rpx;
background-color: #fefbf6;
border-radius: 9.38rpx;
height: 63.75rpx;
border: solid 1.88rpx #ffeaa7;
/* 徽标 chips */
.chips {
display: flex;
gap: 12rpx;
flex-wrap: wrap;
margin: 12rpx 0 4rpx;
}
.text_10 {
margin-left: 17.08rpx;
margin-right: 7.29rpx;
line-height: 27.75rpx;
.chip {
padding: 10rpx 16rpx;
background: #f7f9fc;
color: #3d4f6e;
border: 1rpx solid #e6edf7;
border-radius: 12rpx;
font-size: 24rpx;
}
.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;
/* 九宫格3 列自适应 */
.grid {
margin-top: 8rpx;
margin-left: -10rpx;
margin-right: -10rpx;
display: flex;
flex-wrap: wrap;
}
.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;
width: 33.3333%;
padding: 14rpx 10rpx;
box-sizing: border-box;
}
.font_5 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 24.3rpx;
color: #66666b;
.gi-label {
font-size: 24rpx;
color: #666666;
}
.text_12 {
line-height: 24.02rpx;
.gi-value {
display: block;
margin-top: 10rpx;
font-size: 30rpx;
font-weight: 700;
color: #1f1f1f;
}
.font_6 {
font-size: 26.25rpx;
font-family: SourceHanSansCN;
line-height: 20.06rpx;
color: #e88b38;
/* 金额类,用主题橙强调 */
.grid-item:nth-child(2) .gi-value,
.grid-item:nth-child(3) .gi-value,
.grid-item:nth-child(4) .gi-value,
.grid-item:nth-child(6) .gi-value,
.grid-item:nth-child(8) .gi-value,
.grid-item:nth-child(9) .gi-value {
color: #e67e22;
}
.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;
/* 小屏两列适配 */
@media (max-width: 360px) {
.grid-item { width: 50%; }
}
.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;
}

View File

@ -1,4 +1,5 @@
import { baseUrl } from "../../../request";
const { notLogin } = require('../../../utils/util')
// pages/dashboardModule/userOrderPerformance/userOrderPerformance.js
Page({
@ -90,11 +91,8 @@ Page({
OrderItems: res.data.data
});
} else {
wx.showToast({
title: res.data.message || '未找到订单',
icon: 'none'
});
this.setData({ OrderItems: [] });
notLogin(res.data.message)
}
},
fail: () => {

View File

@ -1,93 +1,92 @@
<!-- pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxml -->
<view class="flex-col page">
<text class="self-center text">客户订单明细</text>
<view class="page">
<!-- 标题 -->
<view class="page-title">
<text class="title">客户订单明细</text>
</view>
<view class="flex-col self-stretch mt-19">
<view class="flex-col section">
<view class="flex-col group">
<text class="self-start font text_2">订单号</text>
<view class="flex-col justify-start items-start self-stretch text-wrapper">
<scroll-view scroll-y class="content no-scrollbar">
<!-- 搜索表单 -->
<view class="card form-card">
<view class="field">
<text class="field-label">订单号</text>
<view class="input-box">
<input
class="text_3 font text_1"
class="input"
placeholder="请输入订单号"
value="{{orderNumber}}"
placeholder-class="ph"
value="{{ orderNumber }}"
type="number"
bindinput="onOrderNumberInput"
/>
</view>
</view>
<view
class="flex-col justify-start items-center text-wrapper_3"
bindtap="searchOrder"
>
<text class="font_2 text_7">搜索</text>
</view>
<view class="btn btn-primary" bindtap="searchOrder">搜索</view>
</view>
<view class="flex-col mt-35">
<!-- 有数据时渲染列表 -->
<block wx:if="{{OrderItems.length}}">
<!-- 结果列表 -->
<view class="result-wrap">
<!-- 有数据 -->
<block wx:if="{{ OrderItems.length }}">
<view
class="flex-col list-item mt-22"
wx:for="{{OrderItems}}"
wx:for="{{ OrderItems }}"
wx:for-item="item"
wx:for-index="index"
wx:key="id"
class="card order-card"
>
<view class="flex-row items-baseline" style="display: flex; justify-content: space-between;">
<text class="font_2 text_8">订单号:</text>
<text class="font_3">{{item.orderNumber}}</text>
<!-- 顶部:订单号 + 状态徽标 -->
<view class="topline">
<view class="row-left">
<text class="label">订单号</text>
<text class="mono">{{ item.orderNumber }}</text>
</view>
<view class="badge {{ item.orderStatus === '待支付' ? 'badge-pending' : (item.orderStatus === '已支付' || item.orderStatus === '交易成功' ? 'badge-success' : 'badge-default') }}">
<text class="badge-text">{{ item.orderStatus }}</text>
</view>
</view>
<view class="flex-row justify-between mt-19">
<text class="font_2 text_9">用户:</text>
<text class="font_4 text_10">{{item.nickName}}</text>
<!-- 键值对信息 -->
<view class="kv">
<text class="kv-key">用户</text>
<text class="kv-val">{{ item.nickName }}</text>
</view>
<view class="flex-row justify-between items-center mt-19">
<text class="font_2 text_11">手机号</text>
<text class="font_3 text_12">{{item.phoneNumber}}</text>
<view class="kv">
<text class="kv-key">手机号</text>
<text class="kv-val">{{ item.phoneNumber }}</text>
</view>
<view class="flex-row justify-between items-center mt-19">
<text class="font_2 text_13">金额</text>
<text class="font_3 text_24">¥{{item.totalAmount}}</text>
<view class="kv">
<text class="kv-key">金额</text>
<text class="kv-val money">¥{{ item.totalAmount }}</text>
</view>
<view class="flex-row justify-between items-center mt-19">
<text class="font_2 text_15">状态:</text>
<text class="font_4 text_16">{{item.orderStatus}}</text>
<view class="kv">
<text class="kv-key">抽成</text>
<text class="kv-val">主管:{{ item.firstRate * 100 }}%,员工:{{ item.secondRate * 100 }}%</text>
</view>
<view class="flex-row justify-between items-center mt-19">
<text class="font_2 text_17">抽成:</text>
<text class="font_4 text_18">主管:{{item.firstRate * 100}}%,员工:{{item.secondRate * 100}}%
</text>
<view class="kv">
<text class="kv-key">奖励</text>
<text class="kv-val">主管:¥{{ item.firstReward }},员工:¥{{ item.secondReward }}</text>
</view>
<view class="flex-row justify-between items-center mt-19">
<text class="font_2 text_19">奖励:</text>
<text class="font_4 text_20">主管:¥{{item.firstReward}},员工:¥{{item.secondReward}}
</text>
<view class="kv">
<text class="kv-key">提成状态</text>
<text class="kv-val">{{ item.commissionStatus }}</text>
</view>
<view class="flex-row justify-between mt-19">
<text class="font_2 text_21">提成状态:</text>
<text class="font_4 text_23">{{item.commissionStatus}}</text>
</view>
<!-- <view class="flex-row justify-between mt-19">
<text class="font_2 text_4">创建时间:</text>
<text class="font_3 text_5">{{item.createTime}}</text>
</view> -->
</view>
</block>
<!-- 无数据时提示 -->
<!-- 无数据 -->
<block wx:else>
<text class="self-center font text_4">暂无数据</text>
<view class="empty">
<image class="empty-img" src="/assets/empty-list.png" mode="aspectFit" />
<text class="empty-text">暂无数据</text>
</view>
</block>
</view>
</view>
</scroll-view>
</view>

View File

@ -1,176 +1,133 @@
.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%;
position: fixed;
bottom: 0;
overflow: auto;
height: calc(100vh - 1rpx);
background: #fefbf6; /* 与你项目的暖米黄保持一致 */
min-height: 100vh;
display: flex;
flex-direction: column;
}
.text {
color: #e67e22;
font-size: 45rpx;
font-family: SourceHanSansCN;
.page-title { padding: 24rpx 24rpx 0; }
.title {
color: #e67e22; /* 暖橙主色 */
font-size: 40rpx;
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;
.content {
flex: 1;
padding: 24rpx;
box-sizing: border-box;
}
.group {
padding: 47.87rpx 0 51.56rpx;
.no-scrollbar::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* ===== 卡片 ===== */
.card {
background: #ffffff;
border-radius: 18rpx;
padding: 24rpx;
border: 2rpx solid #ffeaa7; /* 浅橙描边,延续你原风格 */
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.05);
}
.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;
.card + .card { margin-top: 20rpx; }
/* ===== 表单 ===== */
.form-card .field + .field { margin-top: 20rpx; }
.field-label {
font-size: 28rpx;
color: #555555;
margin-bottom: 12rpx;
display: block;
}
.text_3 {
margin-left: 15.19rpx;
width: 500rpx;
.input-box {
height: 84rpx;
border-radius: 12rpx;
border: 2rpx solid #ffeaa7;
background: #ffffff;
padding: 0 20rpx;
display: flex;
align-items: center;
}
.font {
.input {
flex: 1;
font-size: 28rpx;
color: #1f1f1f;
}
.ph { color: #b8b8b8; }
.btn {
height: 88rpx;
border-radius: 999rpx;
margin-top: 24rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 28.54rpx;
color: #66666b;
font-weight: 600;
}
.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 {
.btn-primary {
background: linear-gradient(180deg, #ffa400 0%, #e67e22 100%);
color: #ffffff;
line-height: 27.69rpx;
box-shadow: 0 6rpx 14rpx rgba(230,126,34,0.30);
}
.list-item {
padding: 44.94rpx 7.14rpx 41.46rpx 29.68rpx;
background-color: #ffffff;
border-radius: 11.89rpx;
border: solid 1.88rpx #ffeaa7;
/* ===== 列表容器 ===== */
.result-wrap { margin-top: 20rpx; }
/* 顶部行:订单号 + 状态徽标 */
.topline {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16rpx;
margin-bottom: 6rpx;
}
.list-item:first-child {
margin-top: 0;
.row-left {
display: flex;
align-items: baseline;
gap: 12rpx;
flex-wrap: wrap;
}
.text_8 {
line-height: 27.66rpx;
.label { font-size: 26rpx; color: #666666; }
.mono { font-size: 28rpx; color: #1f1f1f; font-family: monospace; letter-spacing: 1rpx; }
.badge {
height: 40rpx;
padding: 0 16rpx;
border-radius: 999rpx;
display: inline-flex;
align-items: center;
justify-content: center;
}
.font_3 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 22.76rpx;
margin-right: 15rpx;
color: #444444;
.badge-text { font-size: 22rpx; font-weight: 600; }
.badge-pending{ background: #fff6e6; color: #ff8d1a; border: 1rpx solid #ffd6b3; }
.badge-success{ background: #e9fbef; color: #12b05b; border: 1rpx solid #b9f0cf; }
.badge-default{ background: #f0f0f0; color: #666666; border: 1rpx solid #e6e6e6; }
/* 键值行 */
.kv {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12rpx 0;
border-top: 1rpx dashed #f0f0f0;
}
.text_9 {
line-height: 28.24rpx;
.kv:first-of-type { border-top: 0; }
.kv-key { font-size: 26rpx; color: #666666; }
.kv-val {
font-size: 28rpx;
color: #1f1f1f;
text-align: right;
max-width: 70%;
word-break: break-all;
}
.font_4 {
font-size: 30rpx;
font-family: SourceHanSansCN;
line-height: 28.54rpx;
color: #444444;
.money { color: #e67e22; font-weight: 700; }
/* 空状态 */
.empty {
padding: 120rpx 0 40rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #999999;
}
.text_10 {
margin-right: 15rpx;
line-height: 27.84rpx;
}
.text_11 {
line-height: 27.81rpx;
}
.text_12 {
margin-right: 15rpx;
}
.text_13 {
line-height: 28.29rpx;
}
.text_24 {
margin-right: 15rpx;
}
.text_15 {
line-height: 28.01rpx;
}
.text_16 {
margin-right: 15rpx;
line-height: 28.09rpx;
}
.text_17 {
line-height: 28.16rpx;
}
.text_18 {
margin-right: 15rpx;
}
.text_19 {
line-height: 28.2rpx;
}
.text_20 {
margin-right: 15rpx;
}
.text_21 {
line-height: 28.31rpx;
}
.text_23 {
margin-right: 15rpx;
margin-bottom: 2.04rpx;
line-height: 27.79rpx;
}
.empty-img { width: 300rpx; height: 300rpx; margin-bottom: 16rpx; }
.empty-text { font-size: 26rpx; }