Commit ad9414f6 by Lin

style(reception): 更新接待中心组件样式以优化视觉效果

- 为 un-segmented 组件添加 active-color 属性
- 移除多余的 shape 属性,调整 font-size 和 bg-color
- 更新 tab 索引逻辑以支持已提交和未提交状态的切换
1 parent 177e1a0e
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
shape="circle" shape="circle"
type="card" type="card"
:model-value="tabIndex" :model-value="tabIndex"
active-color="#000000"
@update:model-value="onSegmentedTabIndex" @update:model-value="onSegmentedTabIndex"
> >
<un-segmented-item text="本月交付转化率"></un-segmented-item> <un-segmented-item text="本月交付转化率"></un-segmented-item>
......
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
<view v-if="rightTabIndex == 0" class="filter-group filter-group-compact filter-group-entry-segmented glass-card"> <view v-if="rightTabIndex == 0" class="filter-group filter-group-compact filter-group-entry-segmented glass-card">
<view class="filter-tabs-row entry-filter-segmented-wrap"> <view class="filter-tabs-row entry-filter-segmented-wrap">
<un-segmented <un-segmented
shape="circle"
type="card" type="card"
:height="24" :height="24"
:font-size="11" :font-size="11"
...@@ -97,7 +96,6 @@ ...@@ -97,7 +96,6 @@
<view v-if="rightTabIndex == 1" class="filter-group filter-group-compact filter-group-entry-segmented glass-card"> <view v-if="rightTabIndex == 1" class="filter-group filter-group-compact filter-group-entry-segmented glass-card">
<view class="filter-tabs-row entry-filter-segmented-wrap"> <view class="filter-tabs-row entry-filter-segmented-wrap">
<un-segmented <un-segmented
shape="circle"
type="card" type="card"
:height="24" :height="24"
:font-size="11" :font-size="11"
...@@ -115,28 +113,26 @@ ...@@ -115,28 +113,26 @@
<view v-if="filterTabIndex == 0" class="filter-group filter-group-compact glass-card review-tabs-wrap"> <view v-if="filterTabIndex == 0" class="filter-group filter-group-compact glass-card review-tabs-wrap">
<view class="filter-tabs-row entry-filter-segmented-wrap"> <view class="filter-tabs-row entry-filter-segmented-wrap">
<un-segmented <un-segmented
shape="circle"
type="card" type="card"
:height="24" :height="24"
:font-size="11" :font-size="12"
bg-color="rgba(241, 245, 249, 0.5)" bg-color="rgba(241, 245, 249, 0.5)"
active-color="#000000" active-color="#000000"
:model-value="resultTabIndex" :model-value="submittedResultTabIndex"
@update:model-value="switchResultTab" @update:model-value="switchSubmittedResultTab"
> >
<un-segmented-item text="战败"></un-segmented-item>
<un-segmented-item text="成交"></un-segmented-item> <un-segmented-item text="成交"></un-segmented-item>
<un-segmented-item text="战败"></un-segmented-item>
</un-segmented> </un-segmented>
</view> </view>
</view> </view>
<view v-if="filterTabIndex == 0" class="filter-group filter-group-compact glass-card review-tabs-wrap"> <view v-if="filterTabIndex == 0" class="filter-group filter-group-compact glass-card review-tabs-wrap">
<view class="filter-tabs-row entry-filter-segmented-wrap"> <view class="filter-tabs-row entry-filter-segmented-wrap">
<un-segmented <un-segmented
shape="circle"
type="card" type="card"
:height="24" :height="24"
:font-size="11" :font-size="11"
bg-color="rgba(241, 245, 249, 0.5)" bg-color="#f1f5f9"
active-color="#000000" active-color="#000000"
:model-value="reviewTabIndex" :model-value="reviewTabIndex"
@update:model-value="switchReviewTab" @update:model-value="switchReviewTab"
...@@ -149,14 +145,13 @@ ...@@ -149,14 +145,13 @@
<view v-if="filterTabIndex == 1" class="filter-group filter-group-compact glass-card review-tabs-wrap"> <view v-if="filterTabIndex == 1" class="filter-group filter-group-compact glass-card review-tabs-wrap">
<view class="filter-tabs-row entry-filter-segmented-wrap"> <view class="filter-tabs-row entry-filter-segmented-wrap">
<un-segmented <un-segmented
shape="circle"
type="card" type="card"
:height="24" :height="24"
:font-size="11" :font-size="11"
bg-color="rgba(241, 245, 249, 0.5)" bg-color="rgba(241, 245, 249, 0.5)"
active-color="#000000" active-color="#000000"
:model-value="resultTabIndex" :model-value="unsubmittedPendingTabIndex"
@update:model-value="switchResultTab" @update:model-value="switchUnsubmittedPendingTab"
> >
<un-segmented-item text="待上传"></un-segmented-item> <un-segmented-item text="待上传"></un-segmented-item>
<un-segmented-item text="待提交"></un-segmented-item> <un-segmented-item text="待提交"></un-segmented-item>
...@@ -250,7 +245,7 @@ import { getMerchantPerformance, getCustomerFileList, getReceptionList } from '@ ...@@ -250,7 +245,7 @@ import { getMerchantPerformance, getCustomerFileList, getReceptionList } from '@
import { storage } from '@/utils/storage.uts' import { storage } from '@/utils/storage.uts'
// 产值卡片 tabs:0=本月交付转化率,1=本月交付客单价 // 产值卡片 tabs:0=本月交付转化率,1=本月交付客单价
const outputTabIndex = ref(1); const outputTabIndex = ref(0);
// 右侧 tabs:0=客户录入,1=接待复盘 // 右侧 tabs:0=客户录入,1=接待复盘
const rightTabIndex = ref(0); const rightTabIndex = ref(0);
...@@ -264,8 +259,10 @@ const entryFilterIndex = ref(1); ...@@ -264,8 +259,10 @@ const entryFilterIndex = ref(1);
// 复盘 tabs:0=复盘(已复盘),1=未复盘;请求 reviewFlag:0=已复盘,1=未复盘 // 复盘 tabs:0=复盘(已复盘),1=未复盘;请求 reviewFlag:0=已复盘,1=未复盘
const reviewTabIndex = ref(1); const reviewTabIndex = ref(1);
// 结果 tabs:0=战败,1=成交 // 已提交下结果 tabs:0=战败,1=成交(→ orderFinishFlag)
const resultTabIndex = ref(0); const submittedResultTabIndex = ref(0);
// 未提交下子 tabs:0=待上传,1=待提交(当前与列表参数同样映射到 orderFinishFlag,若后端字段不同再拆参)
const unsubmittedPendingTabIndex = ref(0);
// 客户档案列表(客户录入 Tab,接口 dj.api.smartcarlife.customervisits.customerInfoPage) // 客户档案列表(客户录入 Tab,接口 dj.api.smartcarlife.customervisits.customerInfoPage)
const customerList = ref<UTSJSONObject[]>([]) const customerList = ref<UTSJSONObject[]>([])
...@@ -827,7 +824,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null { ...@@ -827,7 +824,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null {
* 接待复盘列表:dj.api.smartcarlife.reception.customer.page * 接待复盘列表:dj.api.smartcarlife.reception.customer.page
* - 已提交/未提交 → submitted(1/0,与列表项 submitted 字段对齐;若后端参数名不同请改此处) * - 已提交/未提交 → submitted(1/0,与列表项 submitted 字段对齐;若后端参数名不同请改此处)
* - 复盘/未复盘 → reviewFlag(0=已复盘,非 0 如 1=未复盘) * - 复盘/未复盘 → reviewFlag(0=已复盘,非 0 如 1=未复盘)
* - 战败/成交 → orderFinishFlag(战败=0,成交=1,与 ReceptionCenter mock 一致) * - 战败/成交(已提交)/ 待上传·待提交(未提交)→ orderFinishFlag(0/1;未提交若后端另有字段请改映射)
*/ */
function getDefaultReceptionListParams(): UTSJSONObject | null { function getDefaultReceptionListParams(): UTSJSONObject | null {
const ctx = getLoginShopMerchantAndSceneBussiness() const ctx = getLoginShopMerchantAndSceneBussiness()
...@@ -835,8 +832,10 @@ function getDefaultReceptionListParams(): UTSJSONObject | null { ...@@ -835,8 +832,10 @@ function getDefaultReceptionListParams(): UTSJSONObject | null {
return null return null
} }
const reviewFlag = reviewTabIndex.value == 0 ? 0 : 1 const reviewFlag = reviewTabIndex.value == 0 ? 0 : 1
const orderFinishFlag = resultTabIndex.value == 1 ? 1 : 0
const submitted = filterTabIndex.value == 0 ? 1 : 0 const submitted = filterTabIndex.value == 0 ? 1 : 0
const orderFinishFlag = submitted == 1
? (submittedResultTabIndex.value == 1 ? 1 : 0)
: (unsubmittedPendingTabIndex.value == 1 ? 1 : 0)
return { return {
"merchantId": ctx['merchantId'], "merchantId": ctx['merchantId'],
"pageNum": receptionPageNum.value, "pageNum": receptionPageNum.value,
...@@ -1167,8 +1166,14 @@ function switchReviewTab(index: number): void { ...@@ -1167,8 +1166,14 @@ function switchReviewTab(index: number): void {
void getReceptionRecordList(false) void getReceptionRecordList(false)
} }
function switchResultTab(index: number): void { function switchSubmittedResultTab(index: number): void {
resultTabIndex.value = index submittedResultTabIndex.value = index
receptionPageNum.value = 1
void getReceptionRecordList(false)
}
function switchUnsubmittedPendingTab(index: number): void {
unsubmittedPendingTabIndex.value = index
receptionPageNum.value = 1 receptionPageNum.value = 1
void getReceptionRecordList(false) void getReceptionRecordList(false)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!