From 392479418547737668836150ef7faf19f8a57ce7 Mon Sep 17 00:00:00 2001 From: jinbooks_dev Date: Tue, 17 Jun 2025 10:43:19 +0800 Subject: [PATCH] Update other_subjects.vue --- .../src/views/dashboard/accounting/other_subjects.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jinbooks-ui/src/views/dashboard/accounting/other_subjects.vue b/jinbooks-ui/src/views/dashboard/accounting/other_subjects.vue index 148d5a5..d7047e8 100644 --- a/jinbooks-ui/src/views/dashboard/accounting/other_subjects.vue +++ b/jinbooks-ui/src/views/dashboard/accounting/other_subjects.vue @@ -77,7 +77,7 @@ const data = reactive({ const {queryParams, resData} = toRefs(data); const handleSubjectChange = (value: any) => { - window.localStorage.setItem('fund_subject_code', subjectCode.value) + window.localStorage.setItem('fund_subject_code', subjectCode.value||'1002') queryParams.value.subjectCodes = [subjectCode.value] getList() } @@ -234,7 +234,9 @@ onMounted(() => { bookId: currBookStore.bookId }).then((res: any) => { subjectList.value = res.data - subjectCode.value = window.localStorage.getItem('fund_subject_code') || subjectList.value[0].code + //默认科目 1002 银行存款 + subjectCode.value = window.localStorage.getItem('fund_subject_code') || "1002" + console.log(window.localStorage.getItem('fund_subject_code')=='undefined') queryParams.value.subjectCodes = [subjectCode.value] getList() })