美化了样式

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/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;
}