feat:增加账单搜索功能
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
queryBillBookApi,
|
||||
queryBillCategoryApi, queryBillPayApi,
|
||||
queryBillRecordApi,
|
||||
queryBillStatsApi, queryBillSummaryApi, updateBillRecordApi
|
||||
queryBillStatsApi, queryBillSummaryApi, searchBillSummaryApi, updateBillRecordApi
|
||||
} from '@/apis/bill'
|
||||
import { getCurrentMonth, getCurrentYear, getStartEndDate } from 'vue3-common/utils/dateUtil'
|
||||
import { IDateType, ImagePathEnum } from '@/types'
|
||||
@@ -44,6 +44,11 @@ export const useBillStore = defineStore('bill', {
|
||||
billYear: getCurrentYear(),
|
||||
billMonth: getCurrentMonth()
|
||||
},
|
||||
billSearchForm: {
|
||||
content: '',
|
||||
category: '',
|
||||
location: ''
|
||||
},
|
||||
billDateStatsList: [] as IStatsChart[],
|
||||
billBookStatsList: [] as IStatsChart[],
|
||||
billCategoryStatsList: [] as IStatsChart[],
|
||||
@@ -137,6 +142,11 @@ export const useBillStore = defineStore('bill', {
|
||||
this.isRefresh = !this.isRefresh
|
||||
this.isLoading = false
|
||||
},
|
||||
async searchInfo() {
|
||||
this.isLoading = true
|
||||
this.billRecordList = await searchBillSummaryApi(this.billSearchForm)
|
||||
this.isLoading = false
|
||||
},
|
||||
getEmptyBillRecord(): IBillRecord {
|
||||
return {
|
||||
amount: 0,
|
||||
|
||||
Reference in New Issue
Block a user