Commit 8eaee81a by liimin

style(ui): 优化组件样式和 z-index 计算

- 为 CarBrands 组件添加动态 z-index 计算,确保弹窗层级正确
- 将 accountItems 页面滚动条设置为隐藏
- 移除 accountItems 页面多余的位置定位样式
- 调整 content-box 的位置和边距样式
- 注释掉背景透明度样式避免视觉干扰
- 整理 ReceptionHome 和 center 页面的多余空行和注释
- 优化 ReceptionCenter 页面的布局样式和间距设置
1 parent bf9d8bf0
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:is-footer="false" :is-footer="false"
position="bottom" position="bottom"
:title="currentView == 'brand' ? '请选择车品牌' : '请选择车系'" :title="currentView == 'brand' ? '请选择车品牌' : '请选择车系'"
:z-index="10076" :z-index="dynamicZIndex"
@close="handleMessageBoxClose"> @close="handleMessageBoxClose">
<scroll-view class="select-box" <scroll-view class="select-box"
:show-scrollbar="false" :show-scrollbar="false"
...@@ -104,6 +104,11 @@ const currentView = ref<"brand" | "series">("brand"); ...@@ -104,6 +104,11 @@ const currentView = ref<"brand" | "series">("brand");
const selectedBrandIndex = ref<number>(-1); const selectedBrandIndex = ref<number>(-1);
// 当前车系列表(根据选中品牌动态变化) // 当前车系列表(根据选中品牌动态变化)
const currentCarList = ref<Array<any>>([]); const currentCarList = ref<Array<any>>([]);
// 动态计算 z-index,确保始终在最上层(高于 ToolBox 的 10073)
const dynamicZIndex = computed<number>(() => {
return 10090 + (currentView.value == "series" ? 1 : 0);
});
const watchStatus = computed<boolean>(() => { const watchStatus = computed<boolean>(() => {
const status = state.user?.historyStatus; const status = state.user?.historyStatus;
if (status == null) { if (status == null) {
......
<template> <template>
<layout-root> <layout-root>
<view class="page-container account-page fade-in"> <view class="page-container account-page fade-in">
<view class="bg"> <view class="bg">
<image class="bg-image" <image class="bg-image"
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</view> </view>
<scroll-view class="list" <scroll-view class="list"
direction="vertical" direction="vertical"
:show-scrollbar="true"> :show-scrollbar="false">
<AccountList v-if="stepIndex == 0" <AccountList v-if="stepIndex == 0"
ref="accountRef" ref="accountRef"
@choose-account="chooseAccount" /> @choose-account="chooseAccount" />
...@@ -108,7 +108,7 @@ onLoad((options: null | UTSJSONObject) => { ...@@ -108,7 +108,7 @@ onLoad((options: null | UTSJSONObject) => {
const search = (): void => { const search = (): void => {
edit.value = false; edit.value = false;
inputFocus.value = false; inputFocus.value = false;
const step = stepIndex.value; const step = stepIndex.value;
if (step == 0) { if (step == 0) {
if (accountRef.value != null) { if (accountRef.value != null) {
...@@ -169,19 +169,17 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -169,19 +169,17 @@ const chooseMerchant = (userInfo: any): void => {
height: 100%; height: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
.bg { .bg {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
.bg-image { .bg-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
opacity: 0.9; opacity: 0.9;
filter: saturate(0.82) brightness(1.03); filter: saturate(0.82) brightness(1.03);
} }
} }
...@@ -193,8 +191,7 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -193,8 +191,7 @@ const chooseMerchant = (userInfo: any): void => {
box-sizing: border-box; box-sizing: border-box;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: relative; display: flex;
.nav-wrap { .nav-wrap {
width: 100%; width: 100%;
height: 66px; height: 66px;
...@@ -217,7 +214,6 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -217,7 +214,6 @@ const chooseMerchant = (userInfo: any): void => {
} }
.step-box { .step-box {
position: absolute;
height: 44px; height: 44px;
border-radius: 14px; border-radius: 14px;
background: transparent; background: transparent;
...@@ -226,7 +222,6 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -226,7 +222,6 @@ const chooseMerchant = (userInfo: any): void => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-sizing: border-box; box-sizing: border-box;
.step-item { .step-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -284,14 +279,15 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -284,14 +279,15 @@ const chooseMerchant = (userInfo: any): void => {
} }
.content-box { .content-box {
position: absolute; position:absolute;
top:60px;
flex: 1; flex: 1;
width: 86%; width: 86%;
box-sizing: border-box; box-sizing: border-box;
margin: 0 auto 2px; margin: 0 10px 2px;
padding-top: 0; padding-top: 0;
border-radius: 20px; border-radius: 20px;
background: rgba(255, 255, 255, 0.36); //ba ckground: rgba(255, 255, 255, 0.36);
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
min-height: 0; min-height: 0;
...@@ -300,7 +296,6 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -300,7 +296,6 @@ const chooseMerchant = (userInfo: any): void => {
.search-box { .search-box {
margin: 0 12px 12px; margin: 0 12px 12px;
position: relative; position: relative;
.search-input { .search-input {
width: 100%; width: 100%;
height: 42px; height: 42px;
...@@ -310,7 +305,6 @@ const chooseMerchant = (userInfo: any): void => { ...@@ -310,7 +305,6 @@ const chooseMerchant = (userInfo: any): void => {
padding: 0 8px; padding: 0 8px;
position: relative; position: relative;
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
.input { .input {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<view class="reception-home-page"> <view class="reception-home-page">
<!-- 顶部安全区 --> <!-- 顶部安全区 -->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view> <view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<!-- 导航栏 --> <!-- 导航栏 -->
<un-navbar title="接待中心" left-icon="" /> <un-navbar title="接待中心" left-icon="" />
<!-- Tab 切换 --> <!-- Tab 切换 -->
<view class="reception-home-tabs"> <view class="reception-home-tabs">
<un-tabs <un-tabs
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
<un-tab-item text="客户列表"></un-tab-item> <un-tab-item text="客户列表"></un-tab-item>
</un-tabs> </un-tabs>
</view> </view>
<!-- Tab 内容区域 --> <!-- Tab 内容区域 -->
<view class="reception-home-content"> <view class="reception-home-content">
<!-- Tab 1: 业绩看板 --> <!-- Tab 1: 业绩看板 -->
<view v-if="currentTabIndex == 0" class="tab-panel tab-panel-dashboard"> <view v-if="currentTabIndex == 0" class="tab-panel tab-panel-dashboard">
<DashboardPanel <DashboardPanel
:performance-data="performanceData" :performance-data="performanceData"
:metrics-visible="performanceMetricsVisible" :metrics-visible="performanceMetricsVisible"
:selected-brand="selectedBrand" :selected-brand="selectedBrand"
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
@toggle-metrics="togglePerformanceMetricsVisibility" @toggle-metrics="togglePerformanceMetricsVisibility"
/> />
</view> </view>
<!-- Tab 2: 客户列表 --> <!-- Tab 2: 客户列表 -->
<view v-if="currentTabIndex == 1" class="tab-panel tab-panel-list"> <view v-if="currentTabIndex == 1" class="tab-panel tab-panel-list">
<CustomerListPanel <CustomerListPanel
...@@ -48,10 +48,10 @@ ...@@ -48,10 +48,10 @@
/> />
</view> </view>
</view> </view>
<!-- 全局弹窗复用(保持原有逻辑) --> <!-- 全局弹窗复用(保持原有逻辑) -->
<un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" /> <un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" />
<!-- 客户档案详情全屏层 --> <!-- 客户档案详情全屏层 -->
<view v-if="showReceptionDetail" class="form-detail-inner"> <view v-if="showReceptionDetail" class="form-detail-inner">
<FormDetail <FormDetail
...@@ -135,7 +135,7 @@ function syncReceptionDashboardLayout(): void { ...@@ -135,7 +135,7 @@ function syncReceptionDashboardLayout(): void {
function onTabChange(e: any): void { function onTabChange(e: any): void {
currentTabIndex.value = e.index ?? 0 currentTabIndex.value = e.index ?? 0
console.log('[ReceptionHome] Tab 切换:', currentTabIndex.value) console.log('[ReceptionHome] Tab 切换:', currentTabIndex.value)
// Tab 切换时刷新对应数据 // Tab 切换时刷新对应数据
if (currentTabIndex.value == 0) { if (currentTabIndex.value == 0) {
// 切换到业绩看板 // 切换到业绩看板
...@@ -162,7 +162,7 @@ function performanceTypeList(): UnPickerColumn { ...@@ -162,7 +162,7 @@ function performanceTypeList(): UnPickerColumn {
{ label: '问界', value: 1 }, { label: '问界', value: 1 },
{ label: '鸿蒙', value: 2 }, { label: '鸿蒙', value: 2 },
] ]
const items: UnPickerColumn = [] const items: UnPickerColumn = []
let i = 0 let i = 0
while (i < list.length) { while (i < list.length) {
...@@ -203,10 +203,10 @@ function togglePerformanceMetricsVisibility(): void { ...@@ -203,10 +203,10 @@ function togglePerformanceMetricsVisibility(): void {
async function loadPerformanceData(): Promise<void> { async function loadPerformanceData(): Promise<void> {
const rawUser = storage.get('userInfo') as UTSJSONObject | null const rawUser = storage.get('userInfo') as UTSJSONObject | null
if (rawUser == null) { return } if (rawUser == null) { return }
const merchantId = rawUser['shopMerchantId'] const merchantId = rawUser['shopMerchantId']
const sceneType = rawUser['sceneType'] const sceneType = rawUser['sceneType']
// 模拟数据(实际应调用接口) // 模拟数据(实际应调用接口)
performanceData.value = { performanceData.value = {
cumulativeDeliveryCount: 128, cumulativeDeliveryCount: 128,
...@@ -224,7 +224,7 @@ async function loadPerformanceData(): Promise<void> { ...@@ -224,7 +224,7 @@ async function loadPerformanceData(): Promise<void> {
targetProduction: 199, targetProduction: 199,
productionContribution: 100, productionContribution: 100,
} as UTSJSONObject } as UTSJSONObject
console.log('[ReceptionHome] 业绩数据加载完成') console.log('[ReceptionHome] 业绩数据加载完成')
} }
...@@ -232,11 +232,11 @@ async function loadPerformanceData(): Promise<void> { ...@@ -232,11 +232,11 @@ async function loadPerformanceData(): Promise<void> {
function getDefaultCustomerFileParams(): UTSJSONObject | null { function getDefaultCustomerFileParams(): UTSJSONObject | null {
const rawUser = storage.get('userInfo') as UTSJSONObject | null const rawUser = storage.get('userInfo') as UTSJSONObject | null
if (rawUser == null) { return null } if (rawUser == null) { return null }
const merchantId = rawUser['shopMerchantId'] const merchantId = rawUser['shopMerchantId']
const sceneType = rawUser['sceneType'] const sceneType = rawUser['sceneType']
const sceneBussiness = sceneType == 0 ? 1 : 2 const sceneBussiness = sceneType == 0 ? 1 : 2
const params = { const params = {
"pageNum": customerFilePageNum.value, "pageNum": customerFilePageNum.value,
"pageSize": CUSTOMER_FILE_PAGE_SIZE, "pageSize": CUSTOMER_FILE_PAGE_SIZE,
...@@ -244,7 +244,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null { ...@@ -244,7 +244,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null {
"merchantId": merchantId, "merchantId": merchantId,
"bussinessScene": sceneBussiness, "bussinessScene": sceneBussiness,
} as UTSJSONObject } as UTSJSONObject
if (entryFilterIndex.value == 0) { if (entryFilterIndex.value == 0) {
const now = new Date() const now = new Date()
const y = now.getFullYear() const y = now.getFullYear()
...@@ -254,7 +254,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null { ...@@ -254,7 +254,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null {
params['startTime'] = `${dateStr} 00:00:00` params['startTime'] = `${dateStr} 00:00:00`
params['endTime'] = `${dateStr} 23:59:59` params['endTime'] = `${dateStr} 23:59:59`
} }
return params return params
} }
...@@ -266,17 +266,17 @@ async function getCustomerList(append: boolean): Promise<void> { ...@@ -266,17 +266,17 @@ async function getCustomerList(append: boolean): Promise<void> {
customerFilePageNum.value++ customerFilePageNum.value++
customerListLoadingMore.value = true customerListLoadingMore.value = true
} }
const fileParams = getDefaultCustomerFileParams() const fileParams = getDefaultCustomerFileParams()
if (fileParams == null) { if (fileParams == null) {
console.warn('[ReceptionHome] 无登录门店信息,跳过客户列表请求') console.warn('[ReceptionHome] 无登录门店信息,跳过客户列表请求')
return return
} }
try { try {
// TODO: 调用实际接口 // TODO: 调用实际接口
console.log('[ReceptionHome] 请求客户列表:', fileParams) console.log('[ReceptionHome] 请求客户列表:', fileParams)
// 模拟数据 // 模拟数据
const mockList: UTSJSONObject[] = [] const mockList: UTSJSONObject[] = []
for (let i = 0; i < 5; i++) { for (let i = 0; i < 5; i++) {
...@@ -289,13 +289,13 @@ async function getCustomerList(append: boolean): Promise<void> { ...@@ -289,13 +289,13 @@ async function getCustomerList(append: boolean): Promise<void> {
arrivalDate: '2026-04-03', arrivalDate: '2026-04-03',
} as UTSJSONObject) } as UTSJSONObject)
} }
if (append) { if (append) {
customerList.value = [...customerList.value, ...mockList] customerList.value = [...customerList.value, ...mockList]
} else { } else {
customerList.value = mockList customerList.value = mockList
} }
customerListHasMore.value = customerList.value.length < 50 // 模拟还有更多 customerListHasMore.value = customerList.value.length < 50 // 模拟还有更多
} catch (err) { } catch (err) {
console.error('[ReceptionHome] 客户列表加载失败:', err) console.error('[ReceptionHome] 客户列表加载失败:', err)
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<view class="reception-center-page"> <view class="reception-center-page">
<!-- 顶部安全区 --> <!-- 顶部安全区 -->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view> <view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<un-navbar title="接待中心" left-icon="" /> <un-navbar title="接待中心" left-icon="" />
<view class="reception-navbar-spacer"></view> <view class="reception-navbar-spacer"></view>
<!-- Tab 切换 --> <!-- Tab 切换 -->
<view class="reception-tabs-container"> <view class="reception-tabs-container">
<un-tabs <un-tabs
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
@change="onMainTabChange" @change="onMainTabChange"
></un-tabs> ></un-tabs>
</view> </view>
<!-- Tab 内容区域 --> <!-- Tab 内容区域 -->
<view class="reception-content-container"> <view class="reception-content-container">
<ReceptionDashboardTab <ReceptionDashboardTab
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
@open-brand-picker="show = true" @open-brand-picker="show = true"
@update:output-tab-index="onOutputTabIndexChange" @update:output-tab-index="onOutputTabIndexChange"
/> />
<ReceptionCustomerListTab <ReceptionCustomerListTab
v-if="mainTabIndex == 1" v-if="mainTabIndex == 1"
:list-sub-tab-index="listSubTabIndex" :list-sub-tab-index="listSubTabIndex"
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
@reception-click="onReceptionCardClick" @reception-click="onReceptionCardClick"
/> />
</view> </view>
<!-- 全局弹窗 --> <!-- 全局弹窗 -->
<un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" /> <un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" />
<un-picker <un-picker
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
@cancel="onReviewPickerClose" @cancel="onReviewPickerClose"
@confirm="onReviewPickerConfirm" @confirm="onReviewPickerConfirm"
/> />
<!-- 客户档案详情全屏层 --> <!-- 客户档案详情全屏层 -->
<view v-if="showReceptionDetail" class="form-detail-inner"> <view v-if="showReceptionDetail" class="form-detail-inner">
<FormDetail <FormDetail
...@@ -274,7 +274,7 @@ function onOutputTabIndexChange(index: number): void { ...@@ -274,7 +274,7 @@ function onOutputTabIndexChange(index: number): void {
function switchListSubTab(index: number): void { function switchListSubTab(index: number): void {
listSubTabIndex.value = index listSubTabIndex.value = index
console.log('[ReceptionCenter] 列表二级 Tab 切换:', listSubTabIndex.value) console.log('[ReceptionCenter] 列表二级 Tab 切换:', listSubTabIndex.value)
// 重置页码并加载对应列表 // 重置页码并加载对应列表
if (index == 0) { if (index == 0) {
customerFilePageNum.value = 1 customerFilePageNum.value = 1
...@@ -918,7 +918,7 @@ onMounted(() => { ...@@ -918,7 +918,7 @@ onMounted(() => {
receptionDashboardLayoutPollId = setInterval(syncReceptionDashboardLayout, RECEPTION_LAYOUT_POLL_MS) receptionDashboardLayoutPollId = setInterval(syncReceptionDashboardLayout, RECEPTION_LAYOUT_POLL_MS)
// 页面加载后再次兜底计算(避免运行期时区/时间跳变导致不一致) // 页面加载后再次兜底计算(避免运行期时区/时间跳变导致不一致)
setTimeProgress() setTimeProgress()
// 根据当前 Tab 加载对应数据 // 根据当前 Tab 加载对应数据
if (mainTabIndex.value == 0) { if (mainTabIndex.value == 0) {
void getPerformanceData() void getPerformanceData()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!