fix: stats not update when change tab with data updated
This commit is contained in:
parent
59674d1295
commit
b07966c4e6
1 changed files with 27 additions and 18 deletions
|
|
@ -247,25 +247,34 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function fetchQuotationList() {
|
async function fetchQuotationList() {
|
||||||
const ret = await quotationStore.getQuotationList({
|
{
|
||||||
page: quotationPage.value,
|
const ret = await quotationStore.getQuotationList({
|
||||||
pageSize: quotationPageSize.value,
|
page: quotationPage.value,
|
||||||
payCondition:
|
pageSize: quotationPageSize.value,
|
||||||
pageState.currentTab !== 'all'
|
payCondition:
|
||||||
? (
|
pageState.currentTab !== 'all'
|
||||||
{
|
? (
|
||||||
fullAmountCash: 'Full',
|
{
|
||||||
installmentsCash: 'Split',
|
fullAmountCash: 'Full',
|
||||||
fullAmountBill: 'BillFull',
|
installmentsCash: 'Split',
|
||||||
installmentsBill: 'BillSplit',
|
fullAmountBill: 'BillFull',
|
||||||
} as const
|
installmentsBill: 'BillSplit',
|
||||||
)[pageState.currentTab]
|
} as const
|
||||||
: undefined,
|
)[pageState.currentTab]
|
||||||
});
|
: undefined,
|
||||||
|
});
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
quotationData.value = ret.result;
|
quotationData.value = ret.result;
|
||||||
quotationPageMax.value = Math.ceil(ret.total / quotationPageSize.value);
|
quotationPageMax.value = Math.ceil(ret.total / quotationPageSize.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
const ret = await quotationStore.getQuotationStats();
|
||||||
|
if (ret) {
|
||||||
|
quotationStats.value = Object.assign(quotationStats.value, ret);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue