feat:增加账单搜索功能
This commit is contained in:
@@ -43,10 +43,8 @@ import { useBillStore } from '@/store/bill.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { formatChineseDate } from 'vue3-common/utils/dateUtil'
|
||||
import { IBillRecord } from '@/types/bill.ts'
|
||||
import { deepCopyObject } from 'vue3-common/utils/dataUtil'
|
||||
import { formatAmount } from 'vue3-common/utils/numberUtil'
|
||||
import { getCalendarDailyCount, getCategoryByName } from '@/utils/home/billUtil.ts'
|
||||
import { isMobile } from 'vue3-common/utils/layoutUtil'
|
||||
|
||||
const billStore = useBillStore()
|
||||
const router = useRouter()
|
||||
@@ -101,19 +99,10 @@ const getBillDailyByDate = (date: string) => {
|
||||
const selectBillRecordClick = async (billRecord: IBillRecord) => {
|
||||
await billStore.queryBillRecord(billRecord.id as number)
|
||||
billStore.billApiType = 'UPDATE'
|
||||
|
||||
if (isMobile()) {
|
||||
await router.push({
|
||||
name: 'BillDetailId',
|
||||
params: { id: billStore.currentBillRecord.id }
|
||||
})
|
||||
} else {
|
||||
billStore.billDialog = {
|
||||
title: '编辑账单',
|
||||
visible: true,
|
||||
data: deepCopyObject(billStore.currentBillRecord)
|
||||
}
|
||||
}
|
||||
await router.push({
|
||||
name: 'BillDetailId',
|
||||
params: { id: billStore.currentBillRecord.id }
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user