fix CustomerDataCharts.vue style

This commit is contained in:
Timi
2026-10-30 11:54:25 +08:00
parent 98e14f318b
commit 267149868c
2 changed files with 119 additions and 118 deletions
+40 -40
View File
@@ -73,6 +73,46 @@ html.theme-dark body {
}
}
.filters {
--td-search-bg-color: var(--tui-white);
--td-search-square-radius: 1rem;
top: -1rem;
margin: -1rem 0 1rem 0;
padding: 1rem 1rem 0 1rem;
z-index: 10;
position: sticky;
.t-input,
[class*="__input-box"] {
--td-button-border-radius: 99rem;
border: 1px solid var(--td-component-border);
height: 2.25rem;
padding: .25rem .25rem .25rem .75rem;
z-index: 2;
position: relative;
border-radius: 1rem;
}
.tabs {
--td-tab-item-height: 32px;
}
.menus {
--td-spacer-1: 6px;
width: 100%;
border: 1px solid rgba(148, 163, 184, .18);
overflow: hidden;
z-index: 1;
margin-top: -1rem;
border-top: none;
padding-top: .8rem;
border-radius: 0 0 1rem 1rem;
}
}
.pull-refresh {
flex: 1;
min-height: 0;
@@ -93,46 +133,6 @@ html.theme-dark body {
overflow: visible !important;
}
}
.filters {
--td-search-bg-color: var(--tui-white);
--td-search-square-radius: 1rem;
top: -1rem;
margin: -1rem 0 1rem 0;
padding: 1rem 1rem 0 1rem;
z-index: 10;
position: sticky;
.t-input,
[class*="__input-box"] {
--td-button-border-radius: 99rem;
border: 1px solid var(--td-component-border);
height: 2.25rem;
padding: .25rem .25rem .25rem .75rem;
z-index: 2;
position: relative;
border-radius: 1rem;
}
.tabs {
--td-tab-item-height: 32px;
}
.menus {
--td-spacer-1: 6px;
width: 100%;
border: 1px solid rgba(148, 163, 184, .18);
overflow: hidden;
z-index: 1;
margin-top: -1rem;
border-top: none;
padding-top: .8rem;
border-radius: 0 0 1rem 1rem;
}
}
}
}
+79 -78
View File
@@ -1,86 +1,88 @@
<template>
<t-navbar
fixed
:z-index="20"
:title="routeNavBarTitle"
left-arrow
@left-click="$router.back()"
/>
<div v-can="permissionCodes.stat.read" class="customer-data-charts-page">
<div class="filters glass">
<t-input
v-model="customerCode"
class="customer-search"
type="search"
borderless
placeholder="输入客户编码或姓名"
@clear="applyCustomerSearch"
@enter="applyCustomerSearch"
>
<template #suffix-icon>
<t-button
size="extra-small"
theme="primary"
variant="outline"
content="选择客户"
@click.stop="selectorVisible = true"
/>
</template>
</t-input>
</div>
<customer-profile-card v-entrance-transition class="customer" :customer="selectedCustomer" />
<div class="charts">
<t-segmented
v-if="selectedCustomer"
v-model="chartMode"
class="chart-mode"
block
:options="chartModeOptions"
v-entrance-transition
/>
<customer-order-charts
v-entrance-transition
v-if="selectedCustomer && chartMode === 'order'"
:customer-id="selectedCustomer.id || ''"
:date-text-list="chartDateTextList"
:store-id="selectedCustomer.storeId"
/>
<template v-else-if="selectedCustomer">
<customer-chart-summary
<div class="page-layout navbar customer-data-charts-page">
<t-navbar
fixed
:z-index="20"
:title="routeNavBarTitle"
left-arrow
@left-click="$router.back()"
/>
<main v-can="permissionCodes.stat.read" class="page-content scroll column">
<div class="filters glass">
<t-input
v-model="customerCode"
class="customer-search"
type="search"
borderless
placeholder="输入客户编码或姓名"
@clear="applyCustomerSearch"
@enter="applyCustomerSearch"
>
<template #suffix-icon>
<t-button
size="extra-small"
theme="primary"
variant="outline"
content="选择客户"
@click.stop="selectorVisible = true"
/>
</template>
</t-input>
</div>
<customer-profile-card v-entrance-transition class="customer" :customer="selectedCustomer" />
<div class="charts">
<t-segmented
v-if="selectedCustomer"
v-model="chartMode"
class="chart-mode"
block
:options="chartModeOptions"
v-entrance-transition
:customer="selectedCustomer"
:month-cursor="monthCursor"
:selected-event-id-list="selectedEventIdList"
/>
<customer-event-record-calendar-section
v-entrance-transition
v-model="monthCursor"
v-model:selected-event-id-list="selectedEventIdList"
:customer-id="selectedCustomer.id || ''"
:customer-name="selectedCustomer.name"
:store-id="selectedCustomer.storeId"
@list="toEventRecordList"
/>
<customer-record-trend-chart
<customer-order-charts
v-entrance-transition
v-if="selectedCustomer && chartMode === 'order'"
:customer-id="selectedCustomer.id || ''"
:date-text-list="chartDateTextList"
:selected-event-id-list="selectedEventIdList"
:store-id="selectedCustomer.storeId"
/>
<customer-event-structure-chart
<template v-else-if="selectedCustomer">
<customer-chart-summary
v-entrance-transition
:customer="selectedCustomer"
:month-cursor="monthCursor"
:selected-event-id-list="selectedEventIdList"
/>
<customer-event-record-calendar-section
v-entrance-transition
v-model="monthCursor"
v-model:selected-event-id-list="selectedEventIdList"
:customer-id="selectedCustomer.id || ''"
:customer-name="selectedCustomer.name"
:store-id="selectedCustomer.storeId"
@list="toEventRecordList"
/>
<customer-record-trend-chart
v-entrance-transition
:customer-id="selectedCustomer.id || ''"
:date-text-list="chartDateTextList"
:selected-event-id-list="selectedEventIdList"
/>
<customer-event-structure-chart
v-entrance-transition
:customer-id="selectedCustomer.id || ''"
:date-text-list="monthDateTextList"
:selected-event-id-list="selectedEventIdList"
/>
</template>
<customer-selector
v-entrance-transition
:customer-id="selectedCustomer.id || ''"
:date-text-list="monthDateTextList"
:selected-event-id-list="selectedEventIdList"
v-model="selectedCustomerId"
v-model:visible="selectorVisible"
@change="handleCustomerSelected"
/>
</template>
<customer-selector
v-entrance-transition
v-model="selectedCustomerId"
v-model:visible="selectorVisible"
@change="handleCustomerSelected"
/>
</div>
</div>
</main>
</div>
</template>
@@ -285,11 +287,10 @@ function getDateEnd(date: Date): Date {
<style scoped lang="less">
.customer-data-charts-page {
gap: 1rem;
padding: var(--app-nav-height) 0 1rem 0;
display: flex;
flex-direction: column;
.filters {
margin-bottom: 0;
}
.customer {
margin: 0 1rem;