客户列表显示时间应该是最后一次更新时间
This commit is contained in:
@@ -180,10 +180,11 @@
|
|||||||
|
|
||||||
// 将 CustomerManagement 数据映射为显示格式
|
// 将 CustomerManagement 数据映射为显示格式
|
||||||
const mappedList = customerRecords.map(item => {
|
const mappedList = customerRecords.map(item => {
|
||||||
// 格式化创建时间
|
// 格式化列表展示时间:按需求优先显示更新时间
|
||||||
let formattedTime = '';
|
let formattedTime = '';
|
||||||
if (item.createTime) {
|
const displayTimeRaw = item.updateTime || item.update_time || item.createTime;
|
||||||
const date = new Date(item.createTime);
|
if (displayTimeRaw) {
|
||||||
|
const date = new Date(displayTimeRaw);
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear();
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
@@ -216,7 +217,7 @@
|
|||||||
serviceStaff: item.salesName || '',
|
serviceStaff: item.salesName || '',
|
||||||
serviceCount: item.contactCount || item.recordingCount || 0,
|
serviceCount: item.contactCount || item.recordingCount || 0,
|
||||||
lastService: formattedTime,
|
lastService: formattedTime,
|
||||||
lastServiceTime: item.updateTime || item.createTime,
|
lastServiceTime: item.updateTime || item.update_time || item.createTime,
|
||||||
tags: tags,
|
tags: tags,
|
||||||
phone: item.contact || item.salesPhone || '',
|
phone: item.contact || item.salesPhone || '',
|
||||||
budget: item.intendedModel || '', // 意向车型作为预算信息
|
budget: item.intendedModel || '', // 意向车型作为预算信息
|
||||||
|
|||||||
@@ -2432,10 +2432,10 @@
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
// 录音开始时间:优先后端专用字段,兼容多种命名,最后退回创建时间
|
// 列表展示时间:按需求优先显示更新时间,兼容多种命名,最后退回开始/创建时间
|
||||||
const recordingStartRaw =
|
const recordingStartRaw =
|
||||||
item.startTime ||
|
item.updateTime ||
|
||||||
item.createTime;
|
item.update_time ;
|
||||||
let formattedTime = '';
|
let formattedTime = '';
|
||||||
if (recordingStartRaw) {
|
if (recordingStartRaw) {
|
||||||
const date = new Date(recordingStartRaw);
|
const date = new Date(recordingStartRaw);
|
||||||
@@ -2453,7 +2453,7 @@
|
|||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
title: `${item.salesName || ''}的服务记录`,
|
title: `${item.salesName || ''}的服务记录`,
|
||||||
date: formattedTime ? `开始时间:${formattedTime}` : '',
|
date: formattedTime ? `更新时间:${formattedTime}` : '',
|
||||||
description: item.summary || '',
|
description: item.summary || '',
|
||||||
customerName: item.customerName || '',
|
customerName: item.customerName || '',
|
||||||
recordingName: item.recordingName || '', // 记录名称
|
recordingName: item.recordingName || '', // 记录名称
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
class="tab-item"
|
class="tab-item"
|
||||||
:class="{ active: activeTab === 'status' }"
|
:class="{ active: activeTab === 'status' }"
|
||||||
@click="switchTab('status')">
|
@click="switchTab('status')">
|
||||||
<text>服务状态</text>
|
<text>服务中</text>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="tab-item"
|
class="tab-item"
|
||||||
@@ -263,6 +263,12 @@ import CommonBeginReception from "./common_begin_reception.vue";
|
|||||||
import ServiceListFurniture from "./serviceListFurniture.vue";
|
import ServiceListFurniture from "./serviceListFurniture.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
incomingTab: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
components: {
|
components: {
|
||||||
statusBar,
|
statusBar,
|
||||||
@@ -330,6 +336,14 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
|
|||||||
showTagActionMenu: false
|
showTagActionMenu: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
incomingTab: {
|
||||||
|
immediate: true,
|
||||||
|
handler(tab) {
|
||||||
|
this.applyIncomingTab(tab);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 计算导航栏和内容区域的位置(使用计算属性确保响应式)
|
// 计算导航栏和内容区域的位置(使用计算属性确保响应式)
|
||||||
computedNavbarTop() {
|
computedNavbarTop() {
|
||||||
@@ -453,6 +467,21 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
applyIncomingTab(tab) {
|
||||||
|
const allowed = ['status', 'reception', 'tag'];
|
||||||
|
if (!allowed.includes(tab)) return;
|
||||||
|
|
||||||
|
// 切tab并执行必要初始化(开始接待需要重置表单)
|
||||||
|
if (this.activeTab !== tab) {
|
||||||
|
this.activeTab = tab;
|
||||||
|
}
|
||||||
|
if (tab === 'reception') {
|
||||||
|
this.resetReceptionForm();
|
||||||
|
} else if (tab === 'tag') {
|
||||||
|
this.tagViewMode = 'list';
|
||||||
|
this.fetchTagList({ force: true });
|
||||||
|
}
|
||||||
|
},
|
||||||
// 计算并更新导航栏和内容区域的位置
|
// 计算并更新导航栏和内容区域的位置
|
||||||
updateNavbarPosition() {
|
updateNavbarPosition() {
|
||||||
console.log('[FurnitureReception][updateNavbarPosition] 开始更新导航栏位置');
|
console.log('[FurnitureReception][updateNavbarPosition] 开始更新导航栏位置');
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
backgroundColor="#FFFFFF">
|
backgroundColor="#FFFFFF">
|
||||||
</uni-nav-bar>
|
</uni-nav-bar>
|
||||||
|
|
||||||
<view class="content">
|
<view class="content" :style="{ paddingTop: contentTop }">
|
||||||
<view class="scene-grid">
|
<view class="scene-grid">
|
||||||
<view
|
<view
|
||||||
class="scene-card"
|
class="scene-card"
|
||||||
@@ -37,6 +37,19 @@
|
|||||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
function getSystemInfo() {
|
||||||
|
try {
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
return {
|
||||||
|
statusBarHeight: systemInfo.statusBarHeight || 20,
|
||||||
|
};
|
||||||
|
} catch (e) {
|
||||||
|
return {
|
||||||
|
statusBarHeight: 20,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
components: {
|
components: {
|
||||||
@@ -44,7 +57,10 @@
|
|||||||
},
|
},
|
||||||
// #endif
|
// #endif
|
||||||
data() {
|
data() {
|
||||||
|
const systemInfo = getSystemInfo();
|
||||||
|
const totalNavbarHeight = systemInfo.statusBarHeight * 2 + 44 * 2;
|
||||||
return {
|
return {
|
||||||
|
contentTop: totalNavbarHeight + 'rpx',
|
||||||
scenes: [
|
scenes: [
|
||||||
{
|
{
|
||||||
id: 'meeting',
|
id: 'meeting',
|
||||||
@@ -115,54 +131,56 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding-top: 44px;
|
padding-left: 24rpx;
|
||||||
padding: 44px 16px 20px;
|
padding-right: 24rpx;
|
||||||
|
padding-bottom: 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-grid {
|
.scene-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
gap: 16px;
|
gap: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-card {
|
.scene-card {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 12px;
|
border-radius: 24rpx;
|
||||||
padding: 24px 16px;
|
padding: 32rpx 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-card:active {
|
.scene-card:active {
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-icon {
|
.scene-icon {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 16rpx;
|
||||||
width: 64px;
|
width: 96rpx;
|
||||||
height: 64px;
|
height: 96rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: linear-gradient(135deg, rgba(42, 104, 255, 0.1) 0%, rgba(42, 104, 255, 0.05) 100%);
|
background: linear-gradient(135deg, rgba(42, 104, 255, 0.1) 0%, rgba(42, 104, 255, 0.05) 100%);
|
||||||
border-radius: 16px;
|
border-radius: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-title {
|
.scene-title {
|
||||||
font-size: 16px;
|
font-size: 32rpx;
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
color: #333333;
|
color: #333;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 12rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scene-desc {
|
.scene-desc {
|
||||||
font-size: 12px;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #666;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="subpackage-host">
|
<view class="subpackage-host">
|
||||||
<component v-if="Impl" :is="Impl" />
|
<component v-if="Impl" :is="Impl" :incomingTab="incomingTab" />
|
||||||
<view v-else class="loading">
|
<view v-else class="loading">
|
||||||
<text v-if="error">{{ error }}</text>
|
<text v-if="error">{{ error }}</text>
|
||||||
<text v-else>正在加载接待模块...</text>
|
<text v-else>正在加载接待模块...</text>
|
||||||
@@ -13,12 +13,26 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
Impl: null,
|
Impl: null,
|
||||||
|
incomingTab: '',
|
||||||
error: ''
|
error: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.loadImpl();
|
this.loadImpl();
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
// tabBar 的 switchTab 不稳定携带 query,因此从 storage 消费目标tab
|
||||||
|
try {
|
||||||
|
const allowed = ['status', 'reception', 'tag'];
|
||||||
|
const tab = (uni.getStorageSync('workbench-reception-tab') || '').toString();
|
||||||
|
if (allowed.includes(tab)) {
|
||||||
|
this.incomingTab = tab;
|
||||||
|
uni.removeStorageSync('workbench-reception-tab');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadSubPackagePagesSubpackage() {
|
loadSubPackagePagesSubpackage() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -7,16 +7,17 @@
|
|||||||
<text class="category-title">接待页面标签</text>
|
<text class="category-title">接待页面标签</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="function-grid">
|
<view class="function-grid">
|
||||||
<view class="function-item" @click="openReceptionTab('status')">
|
|
||||||
<view class="function-icon">📌</view>
|
|
||||||
<text class="function-name">服务状态</text>
|
|
||||||
<text class="function-desc">进入接待页并切到服务状态</text>
|
|
||||||
</view>
|
|
||||||
<view class="function-item" @click="openReceptionTab('reception')">
|
<view class="function-item" @click="openReceptionTab('reception')">
|
||||||
<view class="function-icon">🛎️</view>
|
<view class="function-icon">🛎️</view>
|
||||||
<text class="function-name">开始接待</text>
|
<text class="function-name">开始接待</text>
|
||||||
<text class="function-desc">进入接待页并切到开始接待</text>
|
<text class="function-desc">进入接待页并切到开始接待</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="function-item" @click="openReceptionTab('status')">
|
||||||
|
<view class="function-icon">📌</view>
|
||||||
|
<text class="function-name">服务中</text>
|
||||||
|
<text class="function-desc">进入接待页并切到服务中</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="function-item" @click="openReceptionTab('tag')">
|
<view class="function-item" @click="openReceptionTab('tag')">
|
||||||
<view class="function-icon">🗂️</view>
|
<view class="function-icon">🗂️</view>
|
||||||
<text class="function-name">标签管理</text>
|
<text class="function-name">标签管理</text>
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ page {
|
|||||||
|
|
||||||
.redirecting-text {
|
.redirecting-text {
|
||||||
padding: 40rpx 30rpx;
|
padding: 40rpx 30rpx;
|
||||||
color: #999;
|
color: #666;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user