Commit a60a595f by Lin

refactor(carBrands): 替换弹窗组件并优化样式

- 将 un-popup 组件替换为 MessageBox 组件,简化弹窗逻辑
- 优化品牌和车系选择列表的样式,提升用户体验
- 移除不必要的样式和计算,清理代码结构
1 parent 06a09850
<template> <template>
<!-- 保持单根节点,确保父组件 v-show 生效 --> <!-- 保持单根节点,确保父组件 v-show 生效 -->
<view class="fade-in-up"> <view>
<SingleColumnSkeleton v-if="!flag" :count="4" /> <view v-if="!flag" class="skeleton-wrap">
<view v-else class="list-container"> <un-skeleton :animate="true"
avatar
:loading="true"
rows="6"
title>
</un-skeleton>
</view>
<view v-else class="box">
<template v-if="loginUserInfoList.length > 0"> <template v-if="loginUserInfoList.length > 0">
<view v-for="(item, index) in loginUserInfoList" <view v-for="(item, index) in loginUserInfoList"
:key="index" :key="index"
...@@ -18,6 +25,7 @@ ...@@ -18,6 +25,7 @@
<text class="name">{{ item.merchantName }}</text> <text class="name">{{ item.merchantName }}</text>
<text class="shop_no">商户号:{{ item.merchantId }}</text> <text class="shop_no">商户号:{{ item.merchantId }}</text>
</view> </view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
...@@ -31,7 +39,6 @@ ...@@ -31,7 +39,6 @@
import { defineExpose, onMounted, ref } from "vue"; import { defineExpose, onMounted, ref } from "vue";
import { apiGetListSelectAccount, apiGetSceneMerchantRefStoreList, apiSelectAccountLogin } from "@/api/user-api.uts"; import { apiGetListSelectAccount, apiGetSceneMerchantRefStoreList, apiSelectAccountLogin } from "@/api/user-api.uts";
import SingleColumnSkeleton from "./Skeleton/SingleColumnSkeleton.uvue";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
type AccountItem = { type AccountItem = {
...@@ -143,12 +150,18 @@ function get4SStoreList(loginUserObj: UTSJSONObject): void { ...@@ -143,12 +150,18 @@ function get4SStoreList(loginUserObj: UTSJSONObject): void {
function selectAccountLogin(id: string, merchantName: string, userInfo: AccountItem | null): void { function selectAccountLogin(id: string, merchantName: string, userInfo: AccountItem | null): void {
console.log(`选择账号${merchantName}登录!`); console.log(`选择账号${merchantName}登录!`);
uni.showLoading({
title: "加载中",
mask: false
});
const params: UTSJSONObject = { const params: UTSJSONObject = {
id id
}; };
apiSelectAccountLogin(params).then((res: UTSJSONObject): void => { apiSelectAccountLogin(params).then((res: UTSJSONObject): void => {
uni.hideLoading();
console.log("selectAccountLogin 返回数据:", res); console.log("selectAccountLogin 返回数据:", res);
const code = res.code as null | string; const code = res.code as null | string;
...@@ -176,6 +189,7 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI ...@@ -176,6 +189,7 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI
}); });
} }
}).catch((error: any | null): void => { }).catch((error: any | null): void => {
uni.hideLoading();
console.error("selectAccountLogin 失败:", error); console.error("selectAccountLogin 失败:", error);
uni.showToast({ uni.showToast({
title: "网络异常,请稍后重试", title: "网络异常,请稍后重试",
...@@ -222,7 +236,6 @@ function chooseAccount(item: AccountItem): void { ...@@ -222,7 +236,6 @@ function chooseAccount(item: AccountItem): void {
} }
i++; i++;
} }
console.log("选择账号:", list);
loginUserInfoList.value = list; loginUserInfoList.value = list;
selectedUuid.value = item.uuid; selectedUuid.value = item.uuid;
choiceAccountLogin(); choiceAccountLogin();
...@@ -265,9 +278,16 @@ function getListSelectAccount(autoLogin: boolean): void { ...@@ -265,9 +278,16 @@ function getListSelectAccount(autoLogin: boolean): void {
console.log("进入选择账号页面!autoLogin:", autoLogin); console.log("进入选择账号页面!autoLogin:", autoLogin);
flag.value = false; flag.value = false;
uni.showLoading({
title: "加载中",
mask: false
});
const params: UTSJSONObject = {}; const params: UTSJSONObject = {};
apiGetListSelectAccount(params).then((res: UTSJSONObject): void => { apiGetListSelectAccount(params).then((res: UTSJSONObject): void => {
uni.hideLoading();
console.log("getListSelectAccount 返回数据:", res); console.log("getListSelectAccount 返回数据:", res);
const code = res.code as null | string; const code = res.code as null | string;
...@@ -316,7 +336,7 @@ function getListSelectAccount(autoLogin: boolean): void { ...@@ -316,7 +336,7 @@ function getListSelectAccount(autoLogin: boolean): void {
i++; i++;
} }
console.log("解析后的账号列表,数量:", accountList.length,accountList); console.log("解析后的账号列表,数量:", accountList.length);
loginUserInfoList.value = accountList; loginUserInfoList.value = accountList;
copyLoginUserInfoList.value = accountList; copyLoginUserInfoList.value = accountList;
flag.value = true; flag.value = true;
...@@ -340,6 +360,7 @@ function getListSelectAccount(autoLogin: boolean): void { ...@@ -340,6 +360,7 @@ function getListSelectAccount(autoLogin: boolean): void {
flag.value = true; flag.value = true;
} }
}).catch((error: any | null): void => { }).catch((error: any | null): void => {
uni.hideLoading();
flag.value = true; flag.value = true;
console.error("getListSelectAccount 失败:", error); console.error("getListSelectAccount 失败:", error);
uni.showToast({ uni.showToast({
...@@ -361,155 +382,122 @@ onMounted(() => { ...@@ -361,155 +382,122 @@ onMounted(() => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.list-container { .skeleton-wrap {
display: flex; padding: 24px;
flex-direction: column;
width: 100%; width: 100%;
} }
.items { .box {
min-height: 92px;
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border-radius: 16px;
padding: 18px;
display: flex; display: flex;
flex-direction: row;
align-items: center; align-items: center;
box-sizing: border-box; flex-wrap: wrap;
border: 1px solid rgba(226, 232, 240, 0.6); padding: 0 24px;
box-shadow: justify-content: space-between;
0 2px 8px rgba(15, 23, 42, 0.04),
0 8px 24px rgba(15, 23, 42, 0.06);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
width: 100%;
margin-bottom: 16px;
position: relative;
overflow: hidden;
// 微妙的光泽效果 .items {
&::before { width: 48%;
content: ''; margin-bottom: 24px;
position: absolute; height: 80px;
top: 0; background: #ffffff;
left: -100%; border-radius: 8px;
width: 100%; padding: 16px;
height: 100%;
background: linear-gradient(
90deg,
transparent 0%,
rgba(255, 255, 255, 0.3) 50%,
transparent 100%
);
transition: left 0.6s ease;
}
&:last-child {
margin-bottom: 0;
}
&:active {
transform: translateY(-2px);
box-shadow:
0 4px 12px rgba(15, 23, 42, 0.08),
0 12px 32px rgba(15, 23, 42, 0.1);
border-color: rgba(22, 119, 255, 0.2);
}
.left {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
.name {
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 16px;
color: #1e293b;
letter-spacing: 0.3px;
line-height: 1.4;
}
.shop_no {
font-weight: 400;
font-size: 13px;
margin-top: 6px;
color: #94a3b8;
letter-spacing: 0.2px;
}
}
.right {
flex-shrink: 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-right: 16px; justify-content: space-between;
box-sizing: border-box;
border: 2px solid transparent;
.midle { .left {
width: 52px; flex: 1;
height: 52px;
border-radius: 26px;
display: flex; display: flex;
flex-direction: row; flex-direction: column;
align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease; .name {
} font-weight: 500;
overflow: hidden;
.midle-text { text-overflow: ellipsis;
font-size: 14px; white-space: nowrap;
font-weight: 700; font-size: 16px;
text-align: center; color: #181a1f;
letter-spacing: 0.5px; }
}
.shop_no {
.midle_1 { font-weight: 400;
background: linear-gradient(135deg, rgba(242, 71, 36, 0.12) 0%, rgba(242, 71, 36, 0.06) 100%); font-size: 14px;
.midle-text { color: #f24724; } margin-top: 6px;
} color: #999ea8;
}
.midle_2 {
background: linear-gradient(135deg, rgba(255, 157, 10, 0.12) 0%, rgba(255, 157, 10, 0.06) 100%);
.midle-text { color: #ff9d0a; }
}
.midle_3 {
background: linear-gradient(135deg, rgba(52, 123, 255, 0.12) 0%, rgba(52, 123, 255, 0.06) 100%);
.midle-text { color: #347bff; }
} }
.midle_4 { .right {
background: linear-gradient(135deg, rgba(53, 195, 118, 0.12) 0%, rgba(53, 195, 118, 0.06) 100%); flex-shrink: 0;
.midle-text { color: #35c376; } display: flex;
} flex-direction: row;
align-items: center;
.midle_5 { margin-right: 14px;
background: linear-gradient(135deg, rgba(53, 195, 118, 0.12) 0%, rgba(53, 195, 118, 0.06) 100%);
.midle-text { color: #35c376; } .midle {
width: 48px;
height: 48px;
border-radius: 4px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.midle-text {
font-size: 14px;
font-weight: 700;
text-align: center;
}
.midle_1 {
background-color: #f247241a;
.midle-text {
color: #f24724;
}
}
.midle_2 {
background-color: #ff9d0a1a;
.midle-text {
color: #ff9d0a;
}
}
.midle_3 {
background-color: #347bff1a;
.midle-text {
color: #347bff;
}
}
.midle_4 {
background-color: #35c3761a;
.midle-text {
color: #35c376;
}
}
.midle_5 {
background-color: #35c3761a;
.midle-text {
color: #35c376;
}
}
} }
} }
}
.active {
background: linear-gradient(135deg, rgba(22, 119, 255, 0.06) 0%, rgba(22, 119, 255, 0.02) 100%);
border-color: rgba(22, 119, 255, 0.3);
box-shadow:
0 4px 16px rgba(22, 119, 255, 0.12),
0 12px 32px rgba(22, 119, 255, 0.16);
transform: translateY(-2px);
.left .name {
color: #1677FF;
font-weight: 700;
}
.right .midle { .active {
box-shadow: 0 4px 12px rgba(22, 119, 255, 0.2); border: 2px solid #347bff;
transform: scale(1.05);
} }
} }
</style> </style>
...@@ -170,7 +170,6 @@ import { type ComponentPublicInstance, type Ref, computed, onMounted, onResize, ...@@ -170,7 +170,6 @@ import { type ComponentPublicInstance, type Ref, computed, onMounted, onResize,
import { type UnPickerColumn, type UnPickerColumnItem, type UnPickerConfirmEvent, type UnTabItem } from "@/uni_modules/uview-unix"; import { type UnPickerColumn, type UnPickerColumnItem, type UnPickerConfirmEvent, type UnTabItem } from "@/uni_modules/uview-unix";
import { getCustomerFileList, getMerchantPerformance, getReceptionList } from "@/api/receiption.uts"; import { getCustomerFileList, getMerchantPerformance, getReceptionList } from "@/api/receiption.uts";
import SceneShell from "@/components/HomeFrame/SceneShell.uvue"; import SceneShell from "@/components/HomeFrame/SceneShell.uvue";
import { cssClassRef } from "@/services/adapter";
import { updateOrientation, useOrientation } from "@/services/adapter/hooks/index.uts"; import { updateOrientation, useOrientation } from "@/services/adapter/hooks/index.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import FormDetail from "./forms/FormDetail.uvue"; import FormDetail from "./forms/FormDetail.uvue";
...@@ -188,10 +187,6 @@ onShow(() => { ...@@ -188,10 +187,6 @@ onShow(() => {
(shellRef.value as ComponentPublicInstance).$callMethod("updateApp"); (shellRef.value as ComponentPublicInstance).$callMethod("updateApp");
} }
}); });
const isPortrait768x1174 = computed((): boolean => {
// 仅在 768x1174 分辨率(竖屏适配类名)下展示顶部安全区占位
return cssClassRef.value.indexOf("layout-portrait-768x1174") >= 0;
});
const receptionOrientationHook = useOrientation(); const receptionOrientationHook = useOrientation();
const hookOrientation = computed((): string => { const hookOrientation = computed((): string => {
return (receptionOrientationHook.orientationKey as Ref<string>).value; return (receptionOrientationHook.orientationKey as Ref<string>).value;
...@@ -229,20 +224,9 @@ const mainTabs: UnTabItem[] = [ ...@@ -229,20 +224,9 @@ const mainTabs: UnTabItem[] = [
const mainTabBarHeight = 52; const mainTabBarHeight = 52;
const mainTabLineWidth = 42; const mainTabLineWidth = 42;
const mainTabLineHeight = 4; const mainTabLineHeight = 4;
const mainTabActiveStyle = { const mainTabActiveStyle = { color: "#1677ff", fontWeight: 700, fontSize: "17px" } as UTSJSONObject;
color: "#1677ff", const mainTabInactiveStyle = { color: "#94a3b8", fontWeight: 500, fontSize: "15px" } as UTSJSONObject;
fontWeight: 700, const mainTabItemStyle = { paddingLeft: "18px", paddingRight: "18px" } as UTSJSONObject;
fontSize: "17px"
} as UTSJSONObject;
const mainTabInactiveStyle = {
color: "#94a3b8",
fontWeight: 500,
fontSize: "15px"
} as UTSJSONObject;
const mainTabItemStyle = {
paddingLeft: "18px",
paddingRight: "18px"
} as UTSJSONObject;
/** 客户列表下的二级 Tab:0=客户录入,1=接待复盘(原 rightTabIndex) */ /** 客户列表下的二级 Tab:0=客户录入,1=接待复盘(原 rightTabIndex) */
const listSubTabIndex = ref(0); const listSubTabIndex = ref(0);
...@@ -402,18 +386,7 @@ const isLandscape = computed((): boolean => { ...@@ -402,18 +386,7 @@ const isLandscape = computed((): boolean => {
return (receptionOrientationHook.isPortrait as Ref<boolean>).value != true; return (receptionOrientationHook.isPortrait as Ref<boolean>).value != true;
}); });
/** 记录上一次打印过的方向,避免轮询期间刷屏 */ /** 记录上一次打印过的方向,避免轮询期间刷屏 */
let lastOrientationLogLandscape: boolean | null = null;
function syncReceptionDashboardLayout(): void { function syncReceptionDashboardLayout(): void {
/**
* 接待中心「布局同步」:
* - 横竖屏 UI 由 useOrientation(isPortrait / orientationKey)与 isLandscape(computed)驱动,须先刷新全局方向再读 isLandscape
* - 横屏窄宽时启用筛选区窄模式,避免 segmented 等控件最小宽度导致溢出
*
* 说明:
* - uni-app x(尤其 APP 端)对 onWindowResize 支持不稳定,因此通过定时轮询触发同步
* - 部分机型旋转后 getWindowInfo 的 windowWidth/windowHeight 刷新可能滞后,这里优先用 systemInfo 的 screenWidth/screenHeight 做兜底
*/
updateOrientation(); updateOrientation();
// 必须用 uni.getWindowInfo():uview-unix 的 getWindowInfo 在 Android 上返回 GetWindowInfoResult,不能 as UTSJSONObject // 必须用 uni.getWindowInfo():uview-unix 的 getWindowInfo 在 Android 上返回 GetWindowInfoResult,不能 as UTSJSONObject
const info = uni.getWindowInfo(); const info = uni.getWindowInfo();
...@@ -430,13 +403,6 @@ function syncReceptionDashboardLayout(): void { ...@@ -430,13 +403,6 @@ function syncReceptionDashboardLayout(): void {
// 横屏判定:宽 > 高。取值优先级:systemInfo.screen* -> windowInfo.screen* -> windowInfo.window* // 横屏判定:宽 > 高。取值优先级:systemInfo.screen* -> windowInfo.screen* -> windowInfo.window*
const w = sysSw > 0 ? sysSw : (sw > 0 ? sw : ww); const w = sysSw > 0 ? sysSw : (sw > 0 ? sw : ww);
const h = sysSh > 0 ? sysSh : (sh > 0 ? sh : wh); const h = sysSh > 0 ? sysSh : (sh > 0 ? sh : wh);
if (lastOrientationLogLandscape == null || lastOrientationLogLandscape != isLandscape.value) {
lastOrientationLogLandscape = isLandscape.value;
console.log(
`[ReceptionCenter] 屏幕方向变化:${isLandscape.value ? "横屏" : "竖屏"}(w=${w}, h=${h}, window=${ww}x${wh}, screen=${sw}x${sh})`
);
}
console.log("[ReceptionCenter] syncReceptionDashboardLayout");
// 横屏窄宽适配:避免右侧筛选区控件(如 segmented)在小于阈值时出现横向溢出 // 横屏窄宽适配:避免右侧筛选区控件(如 segmented)在小于阈值时出现横向溢出
const RECEPTION_FILTER_NARROW_WIDTH = 920; const RECEPTION_FILTER_NARROW_WIDTH = 920;
...@@ -450,36 +416,7 @@ let getPerformanceDataImpl: () => Promise<void> = async (): Promise<void> => {}; ...@@ -450,36 +416,7 @@ let getPerformanceDataImpl: () => Promise<void> = async (): Promise<void> => {};
let getCustomerListImpl: (append: boolean) => Promise<void> = async (_append: boolean): Promise<void> => {}; let getCustomerListImpl: (append: boolean) => Promise<void> = async (_append: boolean): Promise<void> => {};
let getReceptionRecordListImpl: (append: boolean) => Promise<void> = async (_append: boolean): Promise<void> => {}; let getReceptionRecordListImpl: (append: boolean) => Promise<void> = async (_append: boolean): Promise<void> => {};
// onResize 回调可能在窗口尺寸变化过程中高频触发,这里做一次去重,避免控制台刷屏 onResize((_res: any) => {
let lastOnResizeWidth: null | number = null;
let lastOnResizeHeight: null | number = null;
onResize((res: any) => {
// 1) 直接打印回调参数(满足“打印返回参数”的需求)
console.log("[ReceptionCenter][onResize] res =", res);
// 2) 尝试从回调中提取 width/height 做去重(字段结构在不同端可能不同,必须防御性处理)
let w: null | number = null;
let h: null | number = null;
const obj = res as UTSJSONObject;
const sizeRaw = obj.size;
if (sizeRaw != null) {
const sizeObj = sizeRaw as UTSJSONObject;
const ww = sizeObj.windowWidth;
const wh = sizeObj.windowHeight;
if (typeof ww === "number") { w = ww; }
if (typeof wh === "number") { h = wh; }
} else {
const ww = obj.windowWidth;
const wh = obj.windowHeight;
if (typeof ww === "number") { w = ww; }
if (typeof wh === "number") { h = wh; }
}
if (w != null && h != null && (lastOnResizeWidth != w || lastOnResizeHeight != h)) {
lastOnResizeWidth = w;
lastOnResizeHeight = h;
console.log(`[ReceptionCenter][onResize] size = ${w}x${h}`);
}
updateOrientation(); updateOrientation();
syncReceptionDashboardLayout(); syncReceptionDashboardLayout();
}); });
...@@ -489,7 +426,6 @@ function getPerformanceData(): Promise<void> { ...@@ -489,7 +426,6 @@ function getPerformanceData(): Promise<void> {
} }
function getCustomerList(append: boolean): Promise<void> { function getCustomerList(append: boolean): Promise<void> {
console.log("[ReceptionCenter] 获取客户列表触底加载", append);
return getCustomerListImpl(append); return getCustomerListImpl(append);
} }
...@@ -511,7 +447,6 @@ function onMainTabChange(e: any): void { ...@@ -511,7 +447,6 @@ function onMainTabChange(e: any): void {
} }
} }
mainTabIndex.value = nextIndex; mainTabIndex.value = nextIndex;
console.log("[ReceptionCenter] 主 Tab 切换:", mainTabIndex.value);
if (mainTabIndex.value == 0) { if (mainTabIndex.value == 0) {
void getPerformanceData(); void getPerformanceData();
} else { } else {
...@@ -526,14 +461,12 @@ function onMainTabChange(e: any): void { ...@@ -526,14 +461,12 @@ function onMainTabChange(e: any): void {
} }
function onOutputTabIndexChange(index: number): void { function onOutputTabIndexChange(index: number): void {
console.log("[ReceptionCenter] 产值卡片 Tab 切换:", index);
outputTabIndex.value = index; outputTabIndex.value = index;
} }
/** 客户列表下的二级 Tab 切换 */ /** 客户列表下的二级 Tab 切换 */
function switchListSubTab(index: number): void { function switchListSubTab(index: number): void {
listSubTabIndex.value = index; listSubTabIndex.value = index;
console.log("[ReceptionCenter] 列表二级 Tab 切换:", listSubTabIndex.value);
// 重置页码并加载对应列表 // 重置页码并加载对应列表
if (index == 0) { if (index == 0) {
...@@ -553,10 +486,8 @@ function onListScrollToLower(): void { ...@@ -553,10 +486,8 @@ function onListScrollToLower(): void {
return; return;
} }
if (listSubTabIndex.value == 0) { if (listSubTabIndex.value == 0) {
console.log("[ReceptionCenter] 客户列表触底");
void getCustomerList(true); void getCustomerList(true);
} else { } else {
console.log("[ReceptionCenter] 接待列表触底");
void getReceptionRecordList(true); void getReceptionRecordList(true);
} }
} }
...@@ -588,7 +519,6 @@ function onReceptionCardClick(item: UTSJSONObject): void { ...@@ -588,7 +519,6 @@ function onReceptionCardClick(item: UTSJSONObject): void {
// 是否使用鸿蒙/问界口径(true=问界/鸿蒙;false=延保/权益) // 是否使用鸿蒙/问界口径(true=问界/鸿蒙;false=延保/权益)
// channelType == 1 => 问界/鸿蒙 // channelType == 1 => 问界/鸿蒙
const isHarmonyValue = ref(false); const isHarmonyValue = ref(false);
type PerformanceTypeItem = { label: string; value: number } type PerformanceTypeItem = { label: string; value: number }
...@@ -859,7 +789,6 @@ getCustomerListImpl = async (append: boolean): Promise<void> => { ...@@ -859,7 +789,6 @@ getCustomerListImpl = async (append: boolean): Promise<void> => {
} }
const fileParams = getDefaultCustomerFileParams(); const fileParams = getDefaultCustomerFileParams();
if (fileParams == null) { if (fileParams == null) {
console.warn("[getCustomerList] 无登录门店信息,跳过客户档案列表请求");
if (pageBumped) { if (pageBumped) {
customerFilePageNum.value = customerFilePageNum.value - 1; customerFilePageNum.value = customerFilePageNum.value - 1;
} }
...@@ -869,7 +798,6 @@ getCustomerListImpl = async (append: boolean): Promise<void> => { ...@@ -869,7 +798,6 @@ getCustomerListImpl = async (append: boolean): Promise<void> => {
customerListLoadingMore.value = true; customerListLoadingMore.value = true;
try { try {
const res = await getCustomerFileList(fileParams); const res = await getCustomerFileList(fileParams);
console.log("[ReceptionCenter] 获取客户列表res", res);
const resObj = res as UTSJSONObject; const resObj = res as UTSJSONObject;
const codeRaw = resObj.code; const codeRaw = resObj.code;
if (`${codeRaw}` != "0") { if (`${codeRaw}` != "0") {
...@@ -924,7 +852,6 @@ getCustomerListImpl = async (append: boolean): Promise<void> => { ...@@ -924,7 +852,6 @@ getCustomerListImpl = async (append: boolean): Promise<void> => {
CUSTOMER_FILE_PAGE_SIZE CUSTOMER_FILE_PAGE_SIZE
); );
} catch (error) { } catch (error) {
console.error("获取客户档案列表失败:", error);
if (pageBumped) { if (pageBumped) {
customerFilePageNum.value = customerFilePageNum.value - 1; customerFilePageNum.value = customerFilePageNum.value - 1;
} }
...@@ -956,17 +883,14 @@ getReceptionRecordListImpl = async (append: boolean): Promise<void> => { ...@@ -956,17 +883,14 @@ getReceptionRecordListImpl = async (append: boolean): Promise<void> => {
} }
const receptionParams = getDefaultReceptionListParams(); const receptionParams = getDefaultReceptionListParams();
if (receptionParams == null) { if (receptionParams == null) {
console.warn("[getReceptionRecordList] 无登录门店信息,跳过接待复盘列表请求");
if (pageBumped) { if (pageBumped) {
receptionPageNum.value = receptionPageNum.value - 1; receptionPageNum.value = receptionPageNum.value - 1;
} }
return; return;
} }
receptionListLoadingMore.value = true; receptionListLoadingMore.value = true;
console.log("receptionParams接待复盘参数", receptionParams);
try { try {
const res = await getReceptionList(receptionParams); const res = await getReceptionList(receptionParams);
console.log("receptionParams接待复盘列表", res);
const resObj = res as UTSJSONObject; const resObj = res as UTSJSONObject;
const codeRaw = resObj.code; const codeRaw = resObj.code;
if (`${codeRaw}` != "0") { if (`${codeRaw}` != "0") {
...@@ -1034,7 +958,6 @@ getReceptionRecordListImpl = async (append: boolean): Promise<void> => { ...@@ -1034,7 +958,6 @@ getReceptionRecordListImpl = async (append: boolean): Promise<void> => {
} }
}; };
function switchFilterTab(index: number): void { function switchFilterTab(index: number): void {
filterTabIndex.value = index; filterTabIndex.value = index;
receptionPageNum.value = 1; receptionPageNum.value = 1;
...@@ -1152,7 +1075,6 @@ onUnmounted(() => { ...@@ -1152,7 +1075,6 @@ onUnmounted(() => {
<style scoped lang="scss"> <style scoped lang="scss">
@import "./styles/common.scss"; @import "./styles/common.scss";
.reception-shell-page { .reception-shell-page {
flex: 1; flex: 1;
width: 100%; width: 100%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!