feat(M08-B): 补统计保洁员筛选
This commit is contained in:
+5
-3
@@ -137,6 +137,7 @@
|
||||
:loading="loading.statistics"
|
||||
:statistics="statistics"
|
||||
:filters="statisticsFilters"
|
||||
:cleaners="cleaners.items"
|
||||
@refresh="loadStatistics"
|
||||
@filter="changeStatisticsFilters"
|
||||
/>
|
||||
@@ -232,7 +233,7 @@ const settlements = reactive<PageResult<CleaningSettlement>>({
|
||||
const cleaners = reactive<PageResult<ManagedUser>>({ items: [], total: 0, page: 1, pageSize: 20 });
|
||||
const taskFilters = reactive({ storeId: '', cleanerUserId: '' });
|
||||
const settlementFilters = reactive({ storeId: '', cleanerUserId: '' });
|
||||
const statisticsFilters = reactive({ from: '', to: '', storeId: '' });
|
||||
const statisticsFilters = reactive({ from: '', to: '', storeId: '', cleanerUserId: '' });
|
||||
const statistics = reactive<CleaningStatistics>({
|
||||
summary: {
|
||||
taskTotal: 0,
|
||||
@@ -307,7 +308,8 @@ async function loadStatistics() {
|
||||
const result = await getCleaningStatistics(session.value, {
|
||||
from: statisticsFilters.from || undefined,
|
||||
to: statisticsFilters.to || undefined,
|
||||
storeId: statisticsFilters.storeId || undefined
|
||||
storeId: statisticsFilters.storeId || undefined,
|
||||
cleanerUserId: statisticsFilters.cleanerUserId || undefined
|
||||
});
|
||||
Object.assign(statistics.summary, result.summary);
|
||||
statistics.byStatus = result.byStatus;
|
||||
@@ -373,7 +375,7 @@ function changeSettlementPage(page: number) {
|
||||
void loadSettlements();
|
||||
}
|
||||
|
||||
function changeStatisticsFilters(input: { from: string; to: string; storeId: string }) {
|
||||
function changeStatisticsFilters(input: { from: string; to: string; storeId: string; cleanerUserId: string }) {
|
||||
Object.assign(statisticsFilters, input);
|
||||
void loadStatistics();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user