接待 补充
This commit is contained in:
@@ -35,6 +35,12 @@
|
||||
@click="switchTab('performance')">
|
||||
<text>服务表现</text>
|
||||
</view>
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: activeTab === 'reception' }"
|
||||
@click="switchTab('reception')">
|
||||
<text>开始接待</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 服务状态列表 -->
|
||||
@@ -95,6 +101,93 @@
|
||||
<view class="performance-content" v-if="activeTab === 'performance'">
|
||||
<text class="empty-text">服务表现内容</text>
|
||||
</view>
|
||||
|
||||
<!-- 开始接待表单 -->
|
||||
<scroll-view class="reception-form" scroll-y v-if="activeTab === 'reception'">
|
||||
<view class="form-card">
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">客户姓名</text>
|
||||
<input
|
||||
class="form-item__input"
|
||||
v-model="receptionForm.customerName"
|
||||
placeholder="请输入客户姓名"
|
||||
placeholder-style="color: #9ca3af"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">客户电话</text>
|
||||
<input
|
||||
class="form-item__input"
|
||||
v-model="receptionForm.contact"
|
||||
type="number"
|
||||
placeholder="请输入客户电话"
|
||||
placeholder-style="color: #9ca3af"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">性别</text>
|
||||
<picker
|
||||
mode="selector"
|
||||
:range="genderOptions"
|
||||
:value="genderIndex"
|
||||
@change="onGenderChange"
|
||||
>
|
||||
<view class="form-item__picker">
|
||||
<text :class="receptionForm.gender ? 'form-item__picker-text' : 'form-item__picker-placeholder'">
|
||||
{{ receptionForm.gender || '请选择性别' }}
|
||||
</text>
|
||||
<text class="form-item__picker-icon">⌄</text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">年龄</text>
|
||||
<input
|
||||
class="form-item__input"
|
||||
v-model="receptionForm.age"
|
||||
type="number"
|
||||
placeholder="请输入年龄"
|
||||
placeholder-style="color: #9ca3af"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">销售姓名</text>
|
||||
<input
|
||||
class="form-item__input"
|
||||
v-model="receptionForm.salesName"
|
||||
placeholder="请输入销售姓名"
|
||||
placeholder-style="color: #9ca3af"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">销售电话</text>
|
||||
<input
|
||||
class="form-item__input"
|
||||
v-model="receptionForm.salesPhone"
|
||||
type="number"
|
||||
placeholder="请输入销售电话"
|
||||
placeholder-style="color: #9ca3af"
|
||||
/>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-item__label">住址</text>
|
||||
<input
|
||||
class="form-item__input"
|
||||
v-model="receptionForm.detailedAddress"
|
||||
placeholder="请输入详细住址"
|
||||
placeholder-style="color: #9ca3af"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-actions">
|
||||
<view class="form-btn form-btn--cancel" @click="onCancel">
|
||||
<text class="form-btn__text">取消</text>
|
||||
</view>
|
||||
<view class="form-btn form-btn--save" @click="onSave">
|
||||
<text class="form-btn__text">保存</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -103,6 +196,8 @@
|
||||
// #ifdef APP
|
||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||
// #endif
|
||||
import { API_BASE_URL } from "@/common/config.js";
|
||||
|
||||
export default {
|
||||
// #ifdef APP
|
||||
components: {
|
||||
@@ -112,6 +207,17 @@
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'status',
|
||||
genderOptions: ["男", "女"],
|
||||
genderIndex: -1,
|
||||
receptionForm: {
|
||||
customerName: "",
|
||||
contact: "",
|
||||
gender: "",
|
||||
age: "",
|
||||
salesName: "",
|
||||
salesPhone: "",
|
||||
detailedAddress: ""
|
||||
},
|
||||
serviceStatusList: [
|
||||
{
|
||||
staffName: '三多',
|
||||
@@ -160,6 +266,108 @@
|
||||
viewServiceDetail(item) {
|
||||
// 查看服务详情
|
||||
console.log('查看服务详情', item);
|
||||
},
|
||||
onGenderChange(e) {
|
||||
this.genderIndex = e.detail.value;
|
||||
this.receptionForm.gender = this.genderOptions[e.detail.value];
|
||||
},
|
||||
onCancel() {
|
||||
// 重置表单
|
||||
this.receptionForm = {
|
||||
customerName: "",
|
||||
contact: "",
|
||||
gender: "",
|
||||
age: "",
|
||||
salesName: "",
|
||||
salesPhone: "",
|
||||
detailedAddress: ""
|
||||
};
|
||||
this.genderIndex = -1;
|
||||
uni.showToast({
|
||||
title: "已取消",
|
||||
icon: "none"
|
||||
});
|
||||
},
|
||||
async onSave() {
|
||||
// 表单验证
|
||||
if (!this.receptionForm.customerName) {
|
||||
uni.showToast({
|
||||
title: "请输入客户姓名",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.receptionForm.contact) {
|
||||
uni.showToast({
|
||||
title: "请输入客户电话",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 构建请求参数
|
||||
const params = {
|
||||
customerName: this.receptionForm.customerName,
|
||||
contact: this.receptionForm.contact,
|
||||
dealershipId: "",
|
||||
dealershipName: "",
|
||||
salesId: "",
|
||||
salesName: this.receptionForm.salesName || "",
|
||||
recordingCount: 0,
|
||||
intendedModel: "",
|
||||
infoCard: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
remark: "",
|
||||
detailedAddress: this.receptionForm.detailedAddress || "",
|
||||
salesPhone: this.receptionForm.salesPhone || "",
|
||||
contactCount: 0
|
||||
};
|
||||
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: "保存中..."
|
||||
});
|
||||
|
||||
// 构建URL
|
||||
let url;
|
||||
// #ifdef H5
|
||||
url = `/api/customerManagement/add`;
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
url = `${API_BASE_URL}api/customerManagement/add`;
|
||||
// #endif
|
||||
|
||||
const res = await uni.request({
|
||||
url: url,
|
||||
method: "POST",
|
||||
data: params,
|
||||
timeout: 10000
|
||||
});
|
||||
|
||||
uni.hideLoading();
|
||||
|
||||
if (res.statusCode === 200 && res.data && res.data.success) {
|
||||
uni.showToast({
|
||||
title: "保存成功",
|
||||
icon: "success"
|
||||
});
|
||||
// 保存成功后重置表单
|
||||
this.onCancel();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data?.message || "保存失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
uni.hideLoading();
|
||||
console.error("保存失败:", error);
|
||||
uni.showToast({
|
||||
title: "保存失败,请重试",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -433,4 +641,111 @@
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 开始接待表单样式 */
|
||||
.reception-form {
|
||||
height: calc(100vh - 300rpx);
|
||||
background-color: #F5F5F5;
|
||||
padding: 24rpx 32rpx;
|
||||
}
|
||||
|
||||
.form-card {
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.form-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-item__label {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
width: 160rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.form-item__input {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
background-color: #f9fafb;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.form-item__picker {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
background-color: #f9fafb;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.form-item__picker-text {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.form-item__picker-placeholder {
|
||||
font-size: 28rpx;
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.form-item__picker-icon {
|
||||
font-size: 24rpx;
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.form-btn {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.form-btn--cancel {
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
|
||||
.form-btn--save {
|
||||
background-color: #007AFF;
|
||||
}
|
||||
|
||||
.form-btn__text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.form-btn--cancel .form-btn__text {
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.form-btn--save .form-btn__text {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,12 +1,256 @@
|
||||
<template>
|
||||
<view class="warp">
|
||||
<view class="page-wrap">
|
||||
<!-- #ifdef APP -->
|
||||
<statusBar></statusBar>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="content">
|
||||
<text class="title">团队</text>
|
||||
<text class="desc">团队页面内容</text>
|
||||
|
||||
<!-- 头部:返回 + 标题“AI销售管理” -->
|
||||
<view class="page-header">
|
||||
<view class="page-header__back" @tap="onBack">
|
||||
<text class="page-header__back-icon">‹</text>
|
||||
</view>
|
||||
<text class="page-header__title">AI销售管理</text>
|
||||
<!-- 占位,使标题居中 -->
|
||||
<view class="page-header__right"></view>
|
||||
</view>
|
||||
|
||||
<view class="page-container">
|
||||
<!-- 统计周期 -->
|
||||
<view class="filter-row">
|
||||
<text class="filter-row__label">统计周期</text>
|
||||
<view class="filter-row__value">
|
||||
<text class="filter-row__value-text">本周</text>
|
||||
<text class="filter-row__value-icon">⌄</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 顶部切换:个人排行 / 团队排行 -->
|
||||
<view class="tab-switch">
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ 'tab-item--active': activeTab === 'personal' }"
|
||||
@tap="changeTab('personal')"
|
||||
>
|
||||
<text class="tab-text">个人排行</text>
|
||||
</view>
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ 'tab-item--active': activeTab === 'team' }"
|
||||
@tap="changeTab('team')"
|
||||
>
|
||||
<text class="tab-text">团队排行</text>
|
||||
</view>
|
||||
<view
|
||||
class="tab-slider"
|
||||
:style="{
|
||||
transform: activeTab === 'personal'
|
||||
? 'translateX(0)'
|
||||
: 'translateX(100%)'
|
||||
}"
|
||||
></view>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y class="scroll-area">
|
||||
<!-- 个人排行布局 -->
|
||||
<view class="card-list" v-if="activeTab === 'personal'">
|
||||
<!-- 今日服务时长 -->
|
||||
<view class="rank-card">
|
||||
<view class="rank-card__header">
|
||||
<text class="rank-card__title">今日服务时长</text>
|
||||
<view class="rank-card__more" @tap="onMore('duration')">
|
||||
<text class="rank-card__more-text">更多</text>
|
||||
<text class="rank-card__more-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="rank-row"
|
||||
v-for="item in currentData.duration"
|
||||
:key="item.id"
|
||||
>
|
||||
<image
|
||||
class="rank-row__avatar"
|
||||
:src="item.avatar"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="rank-row__main">
|
||||
<text class="rank-row__name">{{ item.name }}</text>
|
||||
<view class="rank-row__progress">
|
||||
<view
|
||||
class="rank-row__progress-inner rank-row__progress-inner--blue"
|
||||
:style="{ width: item.progress + '%' }"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="rank-row__value">{{ item.value }}分钟</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 今日服务接待量 -->
|
||||
<view class="rank-card">
|
||||
<view class="rank-card__header">
|
||||
<text class="rank-card__title">今日服务接待量</text>
|
||||
<view class="rank-card__more" @tap="onMore('customers')">
|
||||
<text class="rank-card__more-text">更多</text>
|
||||
<text class="rank-card__more-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="rank-row"
|
||||
v-for="item in currentData.customers"
|
||||
:key="item.id"
|
||||
>
|
||||
<image
|
||||
class="rank-row__avatar"
|
||||
:src="item.avatar"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="rank-row__main">
|
||||
<text class="rank-row__name">{{ item.name }}</text>
|
||||
<view class="rank-row__progress">
|
||||
<view
|
||||
class="rank-row__progress-inner rank-row__progress-inner--blue"
|
||||
:style="{ width: item.progress + '%' }"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="rank-row__value">{{ item.value }}组客户</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 本周服务 SOP 执行表现 -->
|
||||
<view class="rank-card">
|
||||
<view class="rank-card__header">
|
||||
<text class="rank-card__title">本周服务SOP执行表现</text>
|
||||
<view class="rank-card__more" @tap="onMore('sop')">
|
||||
<text class="rank-card__more-text">更多</text>
|
||||
<text class="rank-card__more-arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="rank-row"
|
||||
v-for="item in currentData.sop"
|
||||
:key="item.id"
|
||||
>
|
||||
<image
|
||||
class="rank-row__avatar"
|
||||
:src="item.avatar"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="rank-row__main">
|
||||
<text class="rank-row__name">{{ item.name }}</text>
|
||||
<view class="rank-row__progress rank-row__progress--dashed">
|
||||
<view
|
||||
class="rank-row__progress-inner rank-row__progress-inner--blue"
|
||||
:style="{ width: item.progress + '%' }"
|
||||
></view>
|
||||
<!-- 中间虚线分隔线(用伪线条模拟) -->
|
||||
<view class="rank-row__divider"></view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="rank-row__value">{{ item.value }}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 团队排行布局 -->
|
||||
<view class="card-list" v-else>
|
||||
<!-- 门店人均服务时长 -->
|
||||
<view class="rank-card">
|
||||
<view class="rank-card__header rank-card__header--with-sub">
|
||||
<text class="rank-card__title">门店人均服务时长</text>
|
||||
<text class="rank-card__sub-right">日均服务时长</text>
|
||||
</view>
|
||||
<view class="rank-card__tabs">
|
||||
<text class="rank-card__tab rank-card__tab--active">全区</text>
|
||||
<text class="rank-card__tab">门店对比</text>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="store-row"
|
||||
v-for="item in teamStoreData.serviceTime"
|
||||
:key="item.rank"
|
||||
>
|
||||
<view class="store-row__left">
|
||||
<view
|
||||
class="rank-badge"
|
||||
:class="'rank-badge--' + item.badgeType"
|
||||
>
|
||||
<text class="rank-badge__text">{{ item.rank }}</text>
|
||||
</view>
|
||||
<text
|
||||
class="store-row__name"
|
||||
:class="{ 'store-row__name--me': item.isMine }"
|
||||
>
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="store-row__middle">
|
||||
<view class="rank-row__progress">
|
||||
<view
|
||||
class="rank-row__progress-inner rank-row__progress-inner--blue"
|
||||
:style="{ width: item.progress + '%' }"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<text
|
||||
class="store-row__value"
|
||||
:class="{ 'store-row__value--highlight': item.isMine }"
|
||||
>
|
||||
{{ item.value }}分钟
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 门店工牌使用率 -->
|
||||
<view class="rank-card">
|
||||
<view class="rank-card__header rank-card__header--with-sub">
|
||||
<text class="rank-card__title">门店工牌使用率</text>
|
||||
</view>
|
||||
|
||||
<!-- 表头 -->
|
||||
<view class="table-header">
|
||||
<text class="table-header__cell table-header__cell--rank">排名</text>
|
||||
<text class="table-header__cell table-header__cell--store">门店对比</text>
|
||||
<text class="table-header__cell">工牌使用(人)</text>
|
||||
<text class="table-header__cell">工牌开通(人)</text>
|
||||
<text class="table-header__cell table-header__cell--rate">使用率</text>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="table-row"
|
||||
v-for="item in teamStoreData.badgeUsage"
|
||||
:key="item.rank"
|
||||
>
|
||||
<view class="table-row__cell table-row__cell--rank">
|
||||
<view
|
||||
class="rank-badge"
|
||||
:class="'rank-badge--' + item.badgeType"
|
||||
>
|
||||
<text class="rank-badge__text">{{ item.rank }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table-row__cell table-row__cell--store">
|
||||
<text
|
||||
class="table-row__store"
|
||||
:class="{ 'table-row__store--me': item.isMine }"
|
||||
>
|
||||
{{ item.name }}
|
||||
</text>
|
||||
</view>
|
||||
<text class="table-row__cell">{{ item.used }}</text>
|
||||
<text class="table-row__cell">{{ item.opened }}</text>
|
||||
<text
|
||||
class="table-row__cell table-row__cell--rate"
|
||||
:class="{ 'table-row__cell--highlight': item.isMine }"
|
||||
>
|
||||
{{ item.rate }}%
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -15,6 +259,9 @@
|
||||
// #ifdef APP
|
||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||
// #endif
|
||||
|
||||
const defaultAvatar = "/static/logo.png";
|
||||
|
||||
export default {
|
||||
// #ifdef APP
|
||||
components: {
|
||||
@@ -23,13 +270,70 @@
|
||||
// #endif
|
||||
data() {
|
||||
return {
|
||||
activeTab: "personal",
|
||||
personalData: {
|
||||
duration: [
|
||||
{ id: 1, name: "三多", value: 90, progress: 100, avatar: defaultAvatar },
|
||||
{ id: 2, name: "雅秋", value: 78, progress: 78 / 90 * 100, avatar: defaultAvatar },
|
||||
{ id: 3, name: "炫辰", value: 60, progress: 60 / 90 * 100, avatar: defaultAvatar }
|
||||
],
|
||||
customers: [
|
||||
{ id: 1, name: "三多", value: 3, progress: 100, avatar: defaultAvatar },
|
||||
{ id: 2, name: "曼云", value: 1, progress: 1 / 3 * 100, avatar: defaultAvatar },
|
||||
{ id: 3, name: "雅秋", value: 1, progress: 1 / 3 * 100, avatar: defaultAvatar }
|
||||
],
|
||||
sop: [
|
||||
{ id: 1, name: "三多", value: 91.5, progress: 100, avatar: defaultAvatar },
|
||||
{ id: 2, name: "曼云", value: 75, progress: 75 / 91.5 * 100, avatar: defaultAvatar }
|
||||
]
|
||||
},
|
||||
// 团队排行:门店维度数据
|
||||
teamStoreData: {
|
||||
serviceTime: [
|
||||
{ rank: 1, name: "A门店", value: 33, progress: 100, badgeType: "gold", isMine: false },
|
||||
{ rank: 2, name: "B门店", value: 28, progress: 28 / 33 * 100, badgeType: "silver", isMine: false },
|
||||
{ rank: 3, name: "C门店", value: 16, progress: 16 / 33 * 100, badgeType: "bronze", isMine: false },
|
||||
{ rank: 11, name: "我的门店", value: 12, progress: 12 / 33 * 100, badgeType: "normal", isMine: true }
|
||||
],
|
||||
badgeUsage: [
|
||||
{ rank: 1, name: "A门店", used: 9, opened: 10, rate: 90, badgeType: "gold", isMine: false },
|
||||
{ rank: 2, name: "B门店", used: 8, opened: 10, rate: 80, badgeType: "silver", isMine: false },
|
||||
{ rank: 3, name: "C门店", used: 7, opened: 10, rate: 70, badgeType: "bronze", isMine: false },
|
||||
{ rank: 5, name: "我的门店", used: 5, opened: 10, rate: 50, badgeType: "normal", isMine: true }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentData() {
|
||||
return this.personalData;
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
changeTab(tab) {
|
||||
if (this.activeTab === tab) return;
|
||||
this.activeTab = tab;
|
||||
// 预留:切换时可请求接口
|
||||
// this.loadRankData();
|
||||
},
|
||||
onBack() {
|
||||
// 如果有页面栈则返回上一页,否则回到首页
|
||||
const pages = getCurrentPages();
|
||||
if (pages && pages.length > 1) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/customer/customer"
|
||||
});
|
||||
}
|
||||
},
|
||||
onMore(type) {
|
||||
// 预留:跳转到更多排行榜详情页
|
||||
// uni.navigateTo({ url: `/pages/team/rank-detail?type=${type}&tab=${this.activeTab}` })
|
||||
console.log("点击更多", type, this.activeTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -38,35 +342,420 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
background-color: #f4f6fb;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
.warp {
|
||||
background-color: #fff;
|
||||
|
||||
.page-wrap {
|
||||
flex: 1;
|
||||
min-height: 100vh;
|
||||
background-color: #f4f6fb;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
.page-container {
|
||||
padding: 0 24rpx 32rpx;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 16rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.filter-row__label {
|
||||
font-size: 24rpx;
|
||||
color: #6b7280;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.filter-row__value {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #eef2ff;
|
||||
border-radius: 20rpx;
|
||||
padding: 6rpx 14rpx;
|
||||
}
|
||||
|
||||
.filter-row__value-text {
|
||||
font-size: 24rpx;
|
||||
color: #1d4ed8;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.filter-row__value-icon {
|
||||
font-size: 20rpx;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
height: 88rpx;
|
||||
padding: 0 24rpx;
|
||||
background-color: #ffffff;
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-shadow: 0 1rpx 0 rgba(229, 231, 235, 0.9);
|
||||
}
|
||||
|
||||
.page-header__back {
|
||||
width: 80rpx;
|
||||
justify-content: flex-start;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.page-header__back-icon {
|
||||
font-size: 40rpx;
|
||||
color: #4b5563;
|
||||
}
|
||||
|
||||
.page-header__title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.page-header__right {
|
||||
width: 80rpx;
|
||||
}
|
||||
|
||||
.tab-switch {
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
background-color: #e5edf8;
|
||||
padding: 6rpx;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40rpx;
|
||||
display: flex;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.tab-item--active .tab-text {
|
||||
color: #1b68ff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.desc {
|
||||
|
||||
.tab-text {
|
||||
font-size: 26rpx;
|
||||
color: #7a8aa5;
|
||||
}
|
||||
|
||||
.tab-slider {
|
||||
position: absolute;
|
||||
top: 4rpx;
|
||||
left: 4rpx;
|
||||
width: 50%;
|
||||
height: 72rpx;
|
||||
border-radius: 36rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 10rpx 20rpx rgba(59, 120, 255, 0.15);
|
||||
transition: transform 0.25s ease-out;
|
||||
}
|
||||
|
||||
.scroll-area {
|
||||
max-height: calc(100vh - 120rpx);
|
||||
}
|
||||
|
||||
.card-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.rank-card {
|
||||
background-color: #ffffff;
|
||||
border-radius: 24rpx;
|
||||
padding: 24rpx 24rpx 18rpx;
|
||||
box-shadow: 0 10rpx 30rpx rgba(7, 34, 85, 0.04);
|
||||
}
|
||||
|
||||
.rank-card__header {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.rank-card__header--with-sub {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.rank-card__title {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
font-weight: 600;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.rank-card__sub-right {
|
||||
font-size: 22rpx;
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.rank-card__more {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.rank-card__more-text {
|
||||
font-size: 24rpx;
|
||||
color: #9ca3af;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.rank-card__more-arrow {
|
||||
font-size: 26rpx;
|
||||
color: #d1d5db;
|
||||
}
|
||||
|
||||
.rank-card__tabs {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.rank-card__tab {
|
||||
font-size: 24rpx;
|
||||
color: #9ca3af;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.rank-card__tab--active {
|
||||
color: #2563eb;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.rank-row {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.rank-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.rank-row__avatar {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 32rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.rank-row__main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.rank-row__name {
|
||||
font-size: 26rpx;
|
||||
color: #111827;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.rank-row__progress {
|
||||
height: 16rpx;
|
||||
border-radius: 8rpx;
|
||||
background-color: #e5edf8;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rank-row__progress-inner {
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.rank-row__progress-inner--blue {
|
||||
background-image: linear-gradient(90deg, #36d1ff, #246bff);
|
||||
}
|
||||
|
||||
.rank-row__value {
|
||||
font-size: 26rpx;
|
||||
color: #111827;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
/* 门店排行行 */
|
||||
.store-row {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.store-row__left {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 220rpx;
|
||||
}
|
||||
|
||||
.store-row__name {
|
||||
font-size: 26rpx;
|
||||
color: #111827;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.store-row__name--me {
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
.store-row__middle {
|
||||
flex: 1;
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
|
||||
.store-row__value {
|
||||
font-size: 26rpx;
|
||||
color: #111827;
|
||||
width: 140rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.store-row__value--highlight {
|
||||
color: #2563eb;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 排名圆圈 */
|
||||
.rank-badge {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
background-color: #e5e7eb;
|
||||
}
|
||||
|
||||
.rank-badge__text {
|
||||
font-size: 22rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.rank-badge--gold {
|
||||
background-image: linear-gradient(135deg, #fbbf24, #f59e0b);
|
||||
box-shadow: 0 6rpx 12rpx rgba(245, 158, 11, 0.35);
|
||||
}
|
||||
|
||||
.rank-badge--silver {
|
||||
background-image: linear-gradient(135deg, #d1d5db, #9ca3af);
|
||||
box-shadow: 0 6rpx 12rpx rgba(156, 163, 175, 0.35);
|
||||
}
|
||||
|
||||
.rank-badge--bronze {
|
||||
background-image: linear-gradient(135deg, #fb923c, #f97316);
|
||||
box-shadow: 0 6rpx 12rpx rgba(248, 113, 22, 0.35);
|
||||
}
|
||||
|
||||
.rank-badge--normal {
|
||||
background-image: linear-gradient(135deg, #2563eb, #1d4ed8);
|
||||
box-shadow: 0 6rpx 12rpx rgba(37, 99, 235, 0.35);
|
||||
}
|
||||
|
||||
/* 表格:门店工牌使用率 */
|
||||
.table-header {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
border-bottom-width: 1rpx;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #e5e7eb;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.table-header__cell {
|
||||
font-size: 22rpx;
|
||||
color: #9ca3af;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-header__cell--rank {
|
||||
width: 120rpx;
|
||||
flex: 0 0 120rpx;
|
||||
}
|
||||
|
||||
.table-header__cell--store {
|
||||
text-align: left;
|
||||
flex: 0 0 180rpx;
|
||||
}
|
||||
|
||||
.table-header__cell--rate {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 14rpx 0;
|
||||
}
|
||||
|
||||
.table-row__cell {
|
||||
flex: 1;
|
||||
font-size: 24rpx;
|
||||
color: #111827;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-row__cell--rank {
|
||||
width: 120rpx;
|
||||
flex: 0 0 120rpx;
|
||||
}
|
||||
|
||||
.table-row__cell--store {
|
||||
text-align: left;
|
||||
flex: 0 0 180rpx;
|
||||
}
|
||||
|
||||
.table-row__cell--rate {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-row__cell--highlight {
|
||||
color: #2563eb;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.table-row__store {
|
||||
font-size: 24rpx;
|
||||
color: #111827;
|
||||
}
|
||||
|
||||
.table-row__store--me {
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
/* SOP 卡片的虚线分割线样式 */
|
||||
.rank-row__progress--dashed {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rank-row__divider {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: -10rpx;
|
||||
bottom: -10rpx;
|
||||
border-left-width: 2rpx;
|
||||
border-left-style: dashed;
|
||||
border-left-color: rgba(156, 163, 175, 0.6);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user