Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cc1177ba
authored
Apr 07, 2026
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/rework' of
http://192.168.3.233:8090/monorepo/venus
into feature/rework
2 parents
64da3cdc
9fd0f18f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
250 additions
and
222 deletions
apps/uniappX/uniapp-x-tape/pages/receptionCenter/FormAdd.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/cards/CardMonthValue.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/center.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/filters/CustomerTags.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/filters/ReceptionListPrimaryFilter.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/filters/ReceptionListSecondaryFilter.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/forms/FormDetail.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/lists/ListCustomer.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/lists/ListReception.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/receptionDetail.uvue
apps/uniappX/uniapp-x-tape/pages/receptionCenter/FormAdd.uvue
View file @
cc1177b
<template>
<!-- 自定义导航页:按窗口安全区预留顶部,避免状态栏/刘海与首屏重叠 -->
<!-- <view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view> -->
<!-- <view class="form-add-top-bar">
<view class="form-add-back-btn" @click="handleClose">
<un-icon name="arrow-left" size="20"></un-icon>
</view>
<text class="form-add-title-text">客户档案</text>
<view style="width: 36px;"></view>
</view> -->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<un-navbar title="客户档案" @leftClick="handleClose" />
<view class="form-add-root">
<!-- 与接待中心 center.uvue 一致:安全区 + 固定导航占位,避免首屏表单被导航栏遮挡 -->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<un-navbar title="客户档案" @leftClick="handleClose" />
<view class="reception-navbar-spacer"></view>
<view class="form-add-wrap">
<view class="form-add-body">
<un-form :model="formData" labelWidth="80" borderBottom>
<un-form :model="formData" labelWidth="80"
labelAlign="left"
borderBottom>
<un-form-item label="车主姓名" prop="ownerName">
<un-input
v-model="formData['ownerName']"
border="none"
inputAlign="right"
placeholder="请输入车主姓名"
:maxlength="50"
:style="{ textAlign: 'left' }"
></un-input>
</un-form-item>
...
...
@@ -28,50 +22,61 @@
v-model="formData['ownerPhone']"
border="none"
type="tel"
inputAlign="right"
placeholder="请输入车主电话"
:maxlength="11"
:style="{ textAlign: 'left' }"
></un-input>
</un-form-item>
<un-form-item label="品牌车型" prop="brandModel">
<un-cell
:value="formData.brandModel !== '' ? formData.brandModel : '请选择品牌车型'"
isLink
:border="false"
@click="brandCascaderShow = true"
:valueStyle="formData.brandModel !== '' ? 'color: #1e293b; font-size: 15px;' : 'color: #94a3b8; font-size: 15px;'"
></un-cell>
<view class="form-add-link-cell" @click="brandCascaderShow = true">
<text
class="form-add-link-cell__value"
:style="getCellValueStyle(formData.brandModel !== '')"
>
{{ formData.brandModel !== '' ? formData.brandModel : '请选择品牌车型' }}
</text>
<un-icon name="arrow-right" color="#a1a1a1"></un-icon>
</view>
</un-form-item>
<un-form-item label="接待场景" prop="receptionSceneName">
<un-cell
:value="formData.receptionSceneName !== '' ? formData.receptionSceneName : '请选择接待场景'"
isLink
:border="false"
@click="sceneSelectShow = true"
:valueStyle="formData.receptionSceneName !== '' ? 'color: #1e293b; font-size: 15px;' : 'color: #94a3b8; font-size: 15px;'"
></un-cell>
<view class="form-add-link-cell" @click="sceneSelectShow = true">
<text
class="form-add-link-cell__value"
:style="getCellValueStyle(formData.receptionSceneName !== '')"
>
{{ formData.receptionSceneName !== '' ? formData.receptionSceneName : '请选择接待场景' }}
</text>
<un-icon name="arrow-right" color="#a1a1a1"></un-icon>
</view>
</un-form-item>
<un-form-item label="到店日期" prop="arrivalDate">
<un-cell
:value="formData.arrivalDate !== '' ? formData.arrivalDate : '请选择到店日期'"
isLink
:border="false"
@click="onOpenDatePicker"
:valueStyle="formData.arrivalDate !== '' ? 'color: #1e293b; font-size: 15px;' : 'color: #94a3b8; font-size: 15px;'"
></un-cell>
<view class="form-add-link-cell" @click="onOpenDatePicker">
<text
class="form-add-link-cell__value"
:style="getCellValueStyle(formData.arrivalDate !== '')"
>
{{ formData.arrivalDate !== '' ? formData.arrivalDate : '请选择到店日期' }}
</text>
<un-icon name="arrow-right" color="#a1a1a1"></un-icon>
</view>
</un-form-item>
<un-form-item label="客户标签" prop="customerTagName">
<un-cell
:value="formData.customerTagName !== '' ? formData.customerTagName : '请选择客户标签'"
isLink
:border="false"
<view
class="form-add-link-cell"
@click="customerTagsSelectShow = true"
:valueStyle="formData.customerTagName !== '' ? 'color: #1e293b; font-size: 15px;' : 'color: #94a3b8; font-size: 15px;'"
:style="{ position: 'relative', zIndex: 10 }"
></un-cell>
>
<text
class="form-add-link-cell__value"
:style="getCellValueStyle(formData.customerTagName !== '')"
>
{{ formData.customerTagName !== '' ? formData.customerTagName : '请选择客户标签' }}
</text>
<un-icon name="arrow-right" color="#a1a1a1"></un-icon>
</view>
</un-form-item>
</un-form>
</view>
...
...
@@ -114,10 +119,11 @@
@cancel="datePickerShow = false"
@close="datePickerShow = false"
/>
</view>
</template>
<script setup lang="uts">
import { ref, watch, nextTick, computed, onMounted
, onUnmounted
} from 'vue'
import { ref, watch, nextTick, computed, onMounted } from 'vue'
import { ComponentPublicInstance } from 'vue'
import CarBrands from '@/components/CarBrands.uvue'
import SenceSelect from './filters/SenceSelect.uvue'
...
...
@@ -127,6 +133,13 @@ import { storage } from '@/utils/storage.uts'
const phoneRex = /^1[3-9]\d{9}$/
function getCellValueStyle(hasValue: boolean): string {
// 统一控制:label 左、value 右(这里只管 value 的对齐与颜色)
return hasValue
? 'color: #1e293b; font-size: 14px; text-align: right;margin-right: 6px;'
: 'color:rgb(151, 150, 150); font-size: 14px; text-align: right;margin-right: 6px;'
}
const props = withDefaults(
defineProps<{
show?: boolean
...
...
@@ -567,17 +580,18 @@ async function handleSubmit(): Promise<void> {
const body = res as UTSJSONObject
const code = fieldStr(body, 'code')
console.log('saveVisitsInfo 保存更新成功code', code)
if (code !== '0') {
// 失败直接提示后结束
if (code != '0') {
const msg = fieldStr(body, 'message')
uni.showToast({ title: msg !== '' ? msg : '保存失败', icon: 'none' })
return
}
// 成功:处理重复记录提示(后端可能用 data 标记归类结果)
const flag = fieldStr(body, 'data')
if (flag === '2') {
// 重复记录处理
await new Promise<void>((resolve) => {
uni.showModal({
content: '存在与该手机号相同的接待记录,系统将自动归类到已接待',
...
...
@@ -591,11 +605,8 @@ async function handleSubmit(): Promise<void> {
// 提父级刷新并关闭
uni.showToast({ title: '提交成功', icon: 'success' })
resetForm()
emit('saved')
emit('close')
handleClose();
uni.$emit('refresh-reception-list')
uni.navigateBack()
} catch (_e) {
uni.showToast({ title: '网络异常,请重试', icon: 'none' })
...
...
@@ -609,10 +620,6 @@ onMounted(() => {
syncReceptionSafeTopSpacer()
})
onUnmounted(() => {
// 清理工作已在 syncReceptionSafeTopSpacer 中简化,无需定时器
})
onLoad((options: UTSJSONObject) => {
const recordStr = options['record']
if (recordStr != null && typeof recordStr === 'string' && recordStr !== '') {
...
...
@@ -646,30 +653,10 @@ onLoad((options: UTSJSONObject) => {
flex-shrink: 0;
}
.form-add-top-bar {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
/* un-navbar 固定定位时不占文档流高度,预留标题栏区域(与 center.uvue 一致) */
.reception-navbar-spacer {
height: 44px;
flex-shrink: 0;
box-sizing: border-box;
padding: 8px 16px;
background-color: #ffffff;
}
.form-add-title-text {
font-size: 18px;
font-weight: 600;
color: #1e293b;
}
.form-add-back-btn {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 8px;
}
.form-add-wrap {
...
...
@@ -691,14 +678,17 @@ onLoad((options: UTSJSONObject) => {
.form-add-footer {
display: flex;
flex-direction: row;
margin
-top
: 24px;
margin: 24px;
padding-top: 16px;
border-top: 1px solid #e2e8f0;
/* 禁止按钮被挤压 */
flex-shrink: 0;
background-color: #ffffff;
/* 底部安全区适配 */
padding-bottom: env(safe-area-inset-bottom);
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.btn {
...
...
@@ -732,4 +722,24 @@ onLoad((options: UTSJSONObject) => {
.submit-btn .btn-text {
color: #ffffff;
}
.form-add-link-cell {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
}
.form-add-link-cell__value {
flex: 1;
}
.form-add-link-cell__arrow {
margin-left: 6px;
color: #cbd5e1;
font-size: 14px;
text-align: right;
}
</style>
apps/uniappX/uniapp-x-tape/pages/receptionCenter/cards/CardMonthValue.uvue
View file @
cc1177b
...
...
@@ -175,8 +175,9 @@ const ringRightStyle = computed(() => {
}
.summary-value-box {
display: flex;
flex-direction: row;
align-items:
baseline
;
align-items:
flex-end
;
}
.summary-value-num {
...
...
@@ -189,6 +190,7 @@ const ringRightStyle = computed(() => {
font-size: 14px;
color: #1677ff;
margin-left: 2px;
padding-bottom: 4px;
}
.summary-personal {
...
...
apps/uniappX/uniapp-x-tape/pages/receptionCenter/center.uvue
View file @
cc1177b
...
...
@@ -2,11 +2,11 @@
<!-- 接待中心 Tab 聚合页 -->
<view class="reception-center-page">
<!-- 顶部安全区 -->
<
view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view
>
<
un-navbar title="接待中心" left-icon="" /
>
<
view class="reception-navbar-spacer"></view
>
<
!-- <view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view> --
>
<
!-- <un-navbar title="接待中心" left-icon="" /> --
>
<
!-- <view class="reception-navbar-spacer"></view> --
>
<!-- Tab 切换 -->
<view class="reception-tabs-container">
<un-tabs
...
...
@@ -89,14 +89,18 @@
@confirm="onReviewPickerConfirm"
/>
<!-- 客户
档案详情全屏层
-->
<view v-if="show
Reception
Detail" class="form-detail-inner">
<!-- 客户
录入列表 → 客户档案(FormDetail)
-->
<view v-if="show
CustomerForm
Detail" class="form-detail-inner">
<FormDetail
:show="show
Reception
Detail"
:detail="
reception
DetailItem"
@close="on
Reception
DetailClose"
:show="show
CustomerForm
Detail"
:detail="
customerForm
DetailItem"
@close="on
CustomerForm
DetailClose"
/>
</view>
<!-- 接待复盘列表 → 接待详情(receptionDetail) -->
<view v-if="showReceptionRecordDetail" class="form-detail-inner">
<ReceptionDetail :item="receptionRecordItem" @close="onReceptionRecordDetailClose" />
</view>
</view>
</template>
...
...
@@ -105,6 +109,7 @@
import { ref, computed, onMounted, onUnmounted, watch } from 'vue'
import { type UnPickerColumn, type UnPickerColumnItem, type UnPickerConfirmEvent, type UnTabItem } from '@/uni_modules/uview-unix'
import FormDetail from './forms/FormDetail.uvue'
import ReceptionDetail from './receptionDetail.uvue'
import ReceptionDashboardTab from './tabs/ReceptionDashboardTab.uvue'
import ReceptionCustomerListTab from './tabs/ReceptionCustomerListTab.uvue'
import type { CompareRow, OutputSummary } from './types/reception-output-types.uts'
...
...
@@ -231,6 +236,7 @@ function getPerformanceData(): Promise<void> {
}
function getCustomerList(append: boolean): Promise<void> {
console.log('[ReceptionCenter] 获取客户列表触底加载', append)
return getCustomerListImpl(append)
}
...
...
@@ -305,9 +311,12 @@ function togglePerformanceMetricsVisibility(): void {
performanceMetricsVisible.value = !performanceMetricsVisible.value
}
// 客户档案详情弹窗:客户录入卡片点击时展示
const showReceptionDetail = ref(false)
const receptionDetailItem = ref<UTSJSONObject | null>(null)
// 客户档案详情(客户录入列表卡片)
const showCustomerFormDetail = ref(false)
const customerFormDetailItem = ref<UTSJSONObject | null>(null)
// 接待复盘详情(接待列表卡片 → receptionDetail.uvue)
const showReceptionRecordDetail = ref(false)
const receptionRecordItem = ref<UTSJSONObject>({})
// 是否使用鸿蒙/问界口径(true=问界/鸿蒙;false=延保/权益)
// channelType == 1 => 问界/鸿蒙
...
...
@@ -399,15 +408,20 @@ function onListCustomerEntryEdit(item: UTSJSONObject): void {
})
}
// 客户档案详情弹窗关闭(FormDetail 组件 emit close 时调用)
function onReceptionDetailClose(): void {
showReceptionDetail.value = false
receptionDetailItem.value = null
function onCustomerFormDetailClose(): void {
showCustomerFormDetail.value = false
customerFormDetailItem.value = null
}
function onReceptionRecordDetailClose(): void {
showReceptionRecordDetail.value = false
receptionRecordItem.value = {}
}
function onListCustomerEntryClick(item: UTSJSONObject): void {
receptionDetailItem.value = item
showReceptionDetail.value = true
customerFormDetailItem.value = item
showCustomerFormDetail.value = true
showReceptionRecordDetail.value = false
}
function onListCustomerEntryDelete(item: UTSJSONObject): void {
...
...
@@ -427,8 +441,9 @@ function onListCustomerEntryDelete(item: UTSJSONObject): void {
function onReceptionCardClick(item: UTSJSONObject): void {
if (filterTabIndex.value == 0) {
receptionDetailItem.value = item
showReceptionDetail.value = true
receptionRecordItem.value = item
showReceptionRecordDetail.value = true
showCustomerFormDetail.value = false
} else {
uni.showToast({ title: '该接待尚不支持复盘', icon: 'none' })
}
...
...
@@ -611,7 +626,6 @@ function getDefaultReceptionListParams(): UTSJSONObject | null {
// 页面加载/模块切换时请求门店业绩数据
getPerformanceDataImpl = async (): Promise<void> => {
const raw = storage.get('userInfo') as UTSJSONObject | null
console.log('[getPerformanceData] userInfo:', raw)
if (raw == null) {
performanceData.value = getMockPerformanceData()
return
...
...
@@ -648,7 +662,8 @@ getPerformanceDataImpl = async (): Promise<void> => {
const res = await getMerchantPerformance(params)
const resObj = res as UTSJSONObject
const bizData = resObj['data'] as UTSJSONObject | null
performanceData.value = isPerformanceDataEmpty(bizData) ? getMockPerformanceData() : (bizData as UTSJSONObject)
// performanceData.value = isPerformanceDataEmpty(bizData) ? getMockPerformanceData() : (bizData as UTSJSONObject)
performanceData.value = bizData as UTSJSONObject
console.log('获取业绩数据成功:', performanceData.value)
} catch (err) {
console.error('获取业绩数据失败:', err)
...
...
@@ -671,11 +686,6 @@ getCustomerListImpl = async (append: boolean): Promise<void> => {
return
}
}
const fileParams = getDefaultCustomerFileParams()
if (fileParams == null) {
console.warn('[getCustomerList] 无登录门店信息,跳过客户档案列表请求')
return
}
let pageBumped = false
if (append) {
customerFilePageNum.value = customerFilePageNum.value + 1
...
...
@@ -684,8 +694,18 @@ getCustomerListImpl = async (append: boolean): Promise<void> => {
} else {
customerListHasMore.value = true
}
const fileParams = getDefaultCustomerFileParams()
if (fileParams == null) {
console.warn('[getCustomerList] 无登录门店信息,跳过客户档案列表请求')
if (pageBumped) {
customerFilePageNum.value = customerFilePageNum.value - 1
customerListLoadingMore.value = false
}
return
}
try {
const res = await getCustomerFileList(fileParams)
console.log('[ReceptionCenter] 获取客户列表res', res)
const resObj = res as UTSJSONObject
const codeRaw = resObj['code']
if (`${codeRaw}` != '0') {
...
...
@@ -767,11 +787,6 @@ getReceptionRecordListImpl = async (append: boolean): Promise<void> => {
return
}
}
const receptionParams = getDefaultReceptionListParams()
if (receptionParams == null) {
console.warn('[getReceptionRecordList] 无登录门店信息,跳过接待复盘列表请求')
return
}
let pageBumped = false
if (append) {
receptionPageNum.value = receptionPageNum.value + 1
...
...
@@ -780,6 +795,15 @@ getReceptionRecordListImpl = async (append: boolean): Promise<void> => {
} else {
receptionListHasMore.value = true
}
const receptionParams = getDefaultReceptionListParams()
if (receptionParams == null) {
console.warn('[getReceptionRecordList] 无登录门店信息,跳过接待复盘列表请求')
if (pageBumped) {
receptionPageNum.value = receptionPageNum.value - 1
receptionListLoadingMore.value = false
}
return
}
console.log("receptionParams接待复盘参数",receptionParams);
try {
const res = await getReceptionList(receptionParams)
...
...
apps/uniappX/uniapp-x-tape/pages/receptionCenter/filters/CustomerTags.uvue
View file @
cc1177b
...
...
@@ -561,10 +561,12 @@
</script>
<style scoped lang="scss">
/* 仅作弹层容器:勿 flex:1,否则会与表单区(如 FormAdd 的 form-add-wrap)瓜分纵向空间并引发点击穿透/叠层问题 */
.customer-tags-root {
width: 100%;
flex: 1;
min-height: 0;
height: 0;
flex-grow: 0;
flex-shrink: 0;
display: flex;
flex-direction: column;
/* Android:滚动父级勿用 overflow:hidden,易导致子 list-view 手势异常(FormDetail 同注) */
...
...
apps/uniappX/uniapp-x-tape/pages/receptionCenter/filters/ReceptionListPrimaryFilter.uvue
View file @
cc1177b
...
...
@@ -24,10 +24,9 @@
>
<view class="filter-tabs-row entry-filter-segmented-wrap">
<un-segmented
shape="circle"
type="card"
:height="40"
bg-color="
rgba(241, 245, 249, 0.5)
"
bg-color="
#f1f5f9
"
active-color="#000000"
:model-value="filterTabIndex"
@update:model-value="emit('switchFilterTab', $event)"
...
...
apps/uniappX/uniapp-x-tape/pages/receptionCenter/filters/ReceptionListSecondaryFilter.uvue
View file @
cc1177b
...
...
@@ -102,7 +102,6 @@ const reviewTabLabel = computed((): string => {
background-color: rgba(255, 255, 255, 0.5);
padding: 4px 12px;
border-radius: 999px;
border: 1px solid rgba(226, 232, 240, 1);
flex-direction: row;
align-items: center;
}
...
...
@@ -116,8 +115,7 @@ const reviewTabLabel = computed((): string => {
justify-content: space-between;
border-radius: 10px;
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
border: 1px solid #dbe6f5;
box-shadow: 0 1px 3px rgba(30, 41, 59, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
box-shadow: 0 1px 3px rgba(30, 41, 59, 0.06), inset 0 1px 0 #ffffff;
box-sizing: border-box;
}
...
...
@@ -141,7 +139,7 @@ const reviewTabLabel = computed((): string => {
.tag-box--filter .tag-arrow-icon {
width: 14px;
height: 14px;
margin-left:
8
px;
margin-left:
6
px;
opacity: 0.8;
}
</style>
apps/uniappX/uniapp-x-tape/pages/receptionCenter/forms/FormDetail.uvue
View file @
cc1177b
<template>
<view class="form-detail-root">
<!--
自定义导航页:按窗口安全区预留顶部,避免状态栏/刘海与首屏重叠
-->
<!--
与 FormAdd 一致:安全区 + 固定导航占位,避免首屏内容被导航栏遮挡
-->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<view class="form-detail-top-bar">
<view class="form-detail-back-btn" @click="handleClose">
<un-icon name="arrow-left" size="20"></un-icon>
</view>
</view>
<un-navbar title="客户档案" @leftClick="handleClose" />
<view class="reception-navbar-spacer"></view>
<view class="form-detail-wrap">
<view class="form-detail-header">
<text class="form-detail-title">客户档案</text>
</view>
<!-- 使用 flex: 1 自动撑满剩余空间,避免底部留白 -->
<list-view
class="form-detail-scroll"
...
...
@@ -87,9 +81,6 @@ type GoodsCardItem = {
customerTag: string
}
/** 顶部返回栏占位(与 updateLayoutHeights 内扣减一致) */
const FORM_DETAIL_TOP_BAR_PX = 48
/** 顶部安全区占位(px):与系统状态栏/刘海对齐,随窗口信息刷新 */
const receptionPageInsetTopPx = ref(0)
...
...
@@ -708,24 +699,10 @@ function handleClose(): void {
flex-shrink: 0;
}
.form-detail-top-bar {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
width: 100%;
/* un-navbar 固定定位时不占文档流高度,预留标题栏区域(与 FormAdd / center 一致) */
.reception-navbar-spacer {
height: 44px;
flex-shrink: 0;
box-sizing: border-box;
padding-left: 8px;
padding-top: 5px;
}
.form-detail-back-btn {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 8px;
}
.form-detail-wrap {
...
...
@@ -741,19 +718,6 @@ function handleClose(): void {
box-sizing: border-box;
}
.form-detail-header {
width: 100%;
padding: 0 24px;
box-sizing: border-box;
margin-bottom: 26px;
}
.form-detail-title {
font-size: 18px;
font-weight: 700;
color: #1e293b;
}
.form-detail-scroll {
width: 100%;
flex: 1;
...
...
apps/uniappX/uniapp-x-tape/pages/receptionCenter/lists/ListCustomer.uvue
View file @
cc1177b
<template>
<!-- 客户录入列表:与 customervisits.customerInfoPage 字段对齐(ownerPhone / brandModel / customerTagName / arrivalDate / ownerName) -->
<view class="customer-entry-list">
<!-- 首次加载:列表为空时,用骨架卡片占位,避免空白 -->
<view
v-for="item in customerList"
v-if="loading && (props.customerList == null || props.customerList.length == 0)"
v-for="i in skeletonCardCount"
:key="'entry-skeleton-' + i"
class="list-card list-card-entry glass-card"
>
<un-skeleton rows="3" title loading></un-skeleton>
</view>
<view
v-else
v-for="item in props.customerList"
:key="getStr(item, 'id')"
class="list-card list-card-entry glass-card"
@click="onEntryCardClick(item)"
@longpress="onEntryCardLongPress(item)"
>
<view class="card-header-row">
<view class="card-title-box">
<text class="card-name">{{ getStr(item, 'ownerName') }}</text>
<text class="card-car">{{ getStr(item, 'brandModel') }}</text>
<un-skeleton :rows="3" title :loading="loading">
<view class="card-header-row">
<view class="card-title-box">
<text class="card-name">{{ getStr(item, 'ownerName') }}</text>
<text class="card-car">{{ getStr(item, 'brandModel') }}</text>
</view>
</view>
</view
>
<view class="card-info-list"
>
<view class="info-row"><text class="info-label">车主电话</text><text class="info-value">{{ formatPhone(getStr(item, 'ownerPhone')
) }}</text></view>
<view class="info-row"><text class="info-label">品牌车型</text><text class="info-value">{{ getStr(item, 'brandModel
') }}</text></view>
<view class="info-row"><text class="info-label">客户标签</text><text class="info-value">{{ getStr(item, 'customerTagName'
) }}</text></view>
<
view class="info-row"><text class="info-label">到店日期</text><text class="info-value">{{ formatArrivalDateOnly(getArrivalTsForEntry(item)) }}</text><
/view>
</
view
>
<view class="card-info-list"
>
<view class="info-row"><text class="info-label">车主电话</text><text class="info-value">{{ formatPhone(getStr(item, 'ownerPhone')) }}</text></view
>
<view class="info-row"><text class="info-label">品牌车型</text><text class="info-value">{{ getStr(item, 'brandModel'
) }}</text></view>
<view class="info-row"><text class="info-label">客户标签</text><text class="info-value">{{ getStr(item, 'customerTagName
') }}</text></view>
<view class="info-row"><text class="info-label">到店日期</text><text class="info-value">{{ formatArrivalDateOnly(getArrivalTsForEntry(item)
) }}</text></view>
</view>
</
un-skeleton
>
<view
v-if="isEntryCardMaskVisible(item)"
v-if="
!loading &&
isEntryCardMaskVisible(item)"
class="entry-card-mask"
@click.stop="onEntryCardMaskAbsorbTap"
>
...
...
@@ -46,15 +58,20 @@
</template>
<script setup lang="uts">
import { ref, watch } from 'vue'
import {
computed,
ref, watch } from 'vue'
const props = defineProps<{
/** 客户档案列表(由父级拉取并传入) */
customerList: UTSJSONObject[]
/** 与父级「今日到店 / 全部客户」分段器同步;切换时关闭长按遮罩 */
entryFilterIndex: number
/** 加载中:骨架屏覆盖卡片内容;列表为空时用骨架卡片占位 */
loading?: boolean
}>()
const loading = computed<boolean>(() => props.loading === true)
const skeletonCardCount = 3
const emit = defineEmits<{
/** 点击卡片:打开客户档案详情 */
'entry-click': [item: UTSJSONObject]
...
...
@@ -170,11 +187,17 @@ function formatArrivalDateOnly(ts: number | null): string {
}
function onEntryCardClick(item: UTSJSONObject): void {
if (loading.value) {
return
}
entryOverlayEntryId.value = ''
emit('entry-click', item)
}
function onEntryCardLongPress(item: UTSJSONObject): void {
if (loading.value) {
return
}
entryOverlayEntryId.value = getStr(item, 'id')
}
...
...
apps/uniappX/uniapp-x-tape/pages/receptionCenter/lists/ListReception.uvue
View file @
cc1177b
<template>
<!-- 接待复盘记录列表:与接待接口字段对齐,数据由父级拉取后传入 -->
<view class="reception-record-list">
<!-- 首次加载:列表为空时,用骨架卡片占位,避免空白 -->
<view
v-for="(item, idx) in receptionRecordList"
v-if="!loading && (props.receptionRecordList == null || props.receptionRecordList.length == 0)"
v-for="i in skeletonCardCount"
:key="'reception-skeleton-' + i"
class="list-card glass-card"
>
<un-skeleton rows="3" title loading></un-skeleton>
</view>
<view
v-else
v-for="(item, idx) in props.receptionRecordList"
:key="getStr(item, 'batchId') != '' ? getStr(item, 'batchId') + '-' + idx : 'recv-' + idx"
class="list-card glass-card"
@click="onCardClick(item)"
>
<view class="card-header-row">
<view class="card-title-box">
<text class="card-name">{{ getStr(item, 'customerName') }}</text>
<text class="card-car">{{ getStr(item, 'carBrand') }}</text>
</view>
<view class="card-status-box">
<view class="status-badge bg-slate-100">
<text class="status-text text-slate-400">{{ getReviewFlagText(item) }}</text>
<un-skeleton :rows="3" title :loading="loading">
<view class="card-header-row">
<view class="card-title-box">
<text class="card-name">{{ getStr(item, 'customerName') }}</text>
<text class="card-car">{{ getStr(item, 'carBrand') }}</text>
</view>
<view
v-if="shouldShowOrderFinishBadge(item)"
:class="orderFinishFlagIsSuccess(item) ? 'status-badge bg-green-50' : 'status-badge bg-red-50'"
>
<text :class="orderFinishFlagIsSuccess(item) ? 'status-text text-green-400' : 'status-text text-red-400'">{{ getOrderFinishResultLabel(item) }}</text>
<view class="card-status-box">
<view class="status-badge bg-slate-100">
<text class="status-text text-slate-400">{{ getReviewFlagText(item) }}</text>
</view>
<view
v-if="shouldShowOrderFinishBadge(item)"
:class="orderFinishFlagIsSuccess(item) ? 'status-badge bg-green-50' : 'status-badge bg-red-50'"
>
<text :class="orderFinishFlagIsSuccess(item) ? 'status-text text-green-400' : 'status-text text-red-400'">{{ getOrderFinishResultLabel(item) }}</text>
</view>
</view>
</view>
</view
>
<view class="card-info-list"
>
<view class="info-row"><text class="info-label">客户电话</text><text class="info-value">{{ formatPhone(getStr(item, 'phoneNumber')
) }}</text></view>
<view class="info-row"><text class="info-label">销售姓名</text><text class="info-value">{{ getReceptionSalesDisplay
(item) }}</text></view>
<view class="info-row"><text class="info-label">接待时长</text><text class="info-value">{{ formatReceptionDuration(item
) }}</text></view>
<view class="info-row"><text class="info-label">开始接待</text><text class="info-value">{{ formatTimestamp(getTs(item, 'receptionStart
Time')) }}</text></view>
<
view class="info-row info-row-last"><text class="info-label">结束接待</text><text class="info-value">{{ formatTimestamp(getTs(item, 'receptionEndTime')) }}</text><
/view>
</
view
>
<view class="card-info-list"
>
<view class="info-row"><text class="info-label">客户电话</text><text class="info-value">{{ formatPhone(getStr(item, 'phoneNumber')) }}</text></view
>
<view class="info-row"><text class="info-label">销售姓名</text><text class="info-value">{{ getReceptionSalesDisplay(item
) }}</text></view>
<view class="info-row"><text class="info-label">接待时长</text><text class="info-value">{{ formatReceptionDuration
(item) }}</text></view>
<view class="info-row"><text class="info-label">开始接待</text><text class="info-value">{{ formatTimestamp(getTs(item, 'receptionStartTime')
) }}</text></view>
<view class="info-row info-row-last"><text class="info-label">结束接待</text><text class="info-value">{{ formatTimestamp(getTs(item, 'receptionEnd
Time')) }}</text></view>
</view>
</
un-skeleton
>
</view>
</view>
</template>
<script setup lang="uts">
defineProps<{
import { computed } from 'vue'
const props = defineProps<{
/** 接待记录列表(由父级拉取并传入) */
receptionRecordList: UTSJSONObject[]
/** 加载中:骨架屏覆盖卡片内容;列表为空时用骨架卡片占位 */
loading?: boolean
}>()
const loading = computed<boolean>(() => props.loading === true)
const skeletonCardCount = 3
const emit = defineEmits<{
/** 点击卡片:父级根据 filterTabIndex 等处理详情或 toast */
'reception-click': [item: UTSJSONObject]
...
...
@@ -177,6 +196,9 @@ function formatReceptionDuration(item: UTSJSONObject): string {
}
function onCardClick(item: UTSJSONObject): void {
if (loading.value) {
return
}
emit('reception-click', item)
}
</script>
...
...
apps/uniappX/uniapp-x-tape/pages/receptionCenter/receptionDetail.uvue
View file @
cc1177b
...
...
@@ -2,12 +2,9 @@
<view class="detail-container">
<!-- 自定义导航页:按窗口安全区预留顶部,避免状态栏/刘海与首屏重叠 -->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<!-- 顶部返回按钮:用于关闭该详情组件(由父级处理 close 事件) -->
<view class="detail-header">
<view class="back-btn" @click="onBack">
<un-icon name="arrow-left"></un-icon>
</view>
</view>
<!-- 与 FormDetail 一致:固定导航 + 占位,避免首屏内容被导航栏遮挡 -->
<un-navbar title="接待详情" @leftClick="onBack" />
<view class="reception-navbar-spacer"></view>
<!-- 主内容区:可滚动 -->
<scroll-view class="main-scroll" scroll-y="true">
<!-- 客户卡片 -->
...
...
@@ -1357,28 +1354,15 @@ defineExpose({
background-color: #F8FAFC;
}
.detail-header {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
width: 100%;
box-sizing: border-box;
padding-left: 8px;
margin-top: 0;
}
.reception-safe-top-spacer {
width: 100%;
flex-shrink: 0;
}
.back-btn {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 8px;
/* un-navbar 固定定位时不占文档流高度,预留标题栏区域(与 FormDetail 一致) */
.reception-navbar-spacer {
height: 44px;
flex-shrink: 0;
}
/* ── 主滚动区 ───────────────────────────────────────────────────────────────── */
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment