diff --git a/pages/reception/reception.vue b/pages/reception/reception.vue
index e30cb85..f3856f7 100644
--- a/pages/reception/reception.vue
+++ b/pages/reception/reception.vue
@@ -35,6 +35,12 @@
@click="switchTab('performance')">
服务表现
+
+ 开始接待
+
@@ -95,6 +101,93 @@
服务表现内容
+
+
+
+
+
+ 客户姓名
+
+
+
+ 客户电话
+
+
+
+ 性别
+
+
+
+ {{ receptionForm.gender || '请选择性别' }}
+
+ ⌄
+
+
+
+
+ 年龄
+
+
+
+ 销售姓名
+
+
+
+ 销售电话
+
+
+
+ 住址
+
+
+
+
+
+ 取消
+
+
+ 保存
+
+
+
@@ -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;
+ }
diff --git a/pages/team/team.vue b/pages/team/team.vue
index 966c6bb..5c0c726 100644
--- a/pages/team/team.vue
+++ b/pages/team/team.vue
@@ -1,12 +1,256 @@
-
+
-
-
- 团队
- 团队页面内容
+
+
+
+
+
+
+
+ 统计周期
+
+ 本周
+ ⌄
+
+
+
+
+
+
+ 个人排行
+
+
+ 团队排行
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ {{ item.value }}分钟
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ {{ item.value }}组客户
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+ {{ item.value }}%
+
+
+
+
+
+
+
+
+
+
+ 全区
+ 门店对比
+
+
+
+
+
+ {{ item.rank }}
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+ {{ item.value }}分钟
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.rank }}
+
+
+
+
+ {{ item.name }}
+
+
+ {{ item.used }}
+ {{ item.opened }}
+
+ {{ item.rate }}%
+
+
+
+
+
@@ -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);
+ }
}
- }
+ };