From 0ca2ed36e2850f2d2c907997cf45212b48fb21c1 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Tue, 16 Jul 2024 00:12:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B4=A6=E6=88=B7=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E5=AD=90=E7=B1=BB=E5=88=AB=EF=BC=8C=E8=87=AA=E6=B5=8Bbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accounts/accountDealRecord/addEdit.vue | 59 ++++++++++++++++++- .../accounts/accountDealRecord/details.vue | 1 + .../work/accounts/accountDealRecord/list.vue | 4 ++ .../work/bill/creditCardBill/addEdit.vue | 4 +- .../bill/creditInstallmentHistory/addEdit.vue | 4 +- .../work/bill/onlineLendHistory/addEdit.vue | 4 +- .../work/bill/peopleLendHistory/addEdit.vue | 4 +- 7 files changed, 70 insertions(+), 10 deletions(-) diff --git a/src/pages/work/accounts/accountDealRecord/addEdit.vue b/src/pages/work/accounts/accountDealRecord/addEdit.vue index 007a203..ccb0f8b 100644 --- a/src/pages/work/accounts/accountDealRecord/addEdit.vue +++ b/src/pages/work/accounts/accountDealRecord/addEdit.vue @@ -39,6 +39,11 @@ inputAlign="right" border="none"> + + + + @@ -56,6 +61,10 @@ @confirm="handleAccountNameConfirm"> + + + { getDicts('deal_category').then(res => { dealCategoryList.value =[res.data] }) + // 子类型 + getDicts('daily_expenses').then(res => { + childCategoryList.value =[res.data] + }) + listAccounts(queryAccountParams.value).then((response) => { accountNameList.value = [response.rows] }) // 交易类别 + getDicts('daily_expenses').then(result => { + form.value.childCategoryName=dictStr(form.value.childCategory, result.data) + }) + // 交易类别 getDicts('deal_category').then(result => { form.value.dealCategoryName=dictStr(form.value.dealCategory, result.data) }) @@ -172,6 +196,10 @@ onLoad((option) => { // 交易类别 getDicts('deal_category').then(result => { form.value.dealCategoryName=dictStr(form.value.dealCategory, result.data) + }) + // 交易类别 +getDicts('daily_expenses').then(result => { + form.value.childCategoryName=dictStr(form.value.childCategory, result.data) }) // 记账类型 getDicts('account_type').then(result => { @@ -241,7 +269,7 @@ getDicts('deal_category').then(result => { showAccountName.value = false } function handleDealCategory() { - if (accountTypeList.value[0].length === 0) { + if (dealCategoryList.value[0].length === 0) { proxy.$refs['uToast'].show({ message: '交易类别为空 ', type: 'warning' }) @@ -252,11 +280,38 @@ getDicts('deal_category').then(result => { function handleDealCategoryConfirm(e) { form.value.dealCategoryName = e.value[0].dictLabel form.value.dealCategory = e.value[0].dictValue + //1表示日常支出,如果是日常支出,选择子类别,否则不显示子类别,且子类别与类别相同 + if (form.value.dealCategory === '1') { + form.value.childCategory = null + childCategoryShow.value = true + } else { + childCategoryShow.value = false + form.value.childCategory = form.value.dealCategory + } showDealCategory.value = false } function handleDealCategoryCancel() { showDealCategory.value = false } + + function handleChildCategory() { + if (childCategoryList.value[0].length === 0) { + proxy.$refs['uToast'].show({ + message: '交易子类别为空 ', type: 'warning' + }) + } else { + showChildCategory.value = true + } + } + function handleChildCategoryConfirm(e) { + form.value.childCategoryName = e.value[0].dictLabel + form.value.childCategory = e.value[0].dictValue + showChildCategory.value = false + } + function handleChildCategoryCancel() { + showChildCategory.value = false + } + function handleDealType() { if (dealTypeList.value[0].length === 0) { proxy.$refs['uToast'].show({ diff --git a/src/pages/work/accounts/accountDealRecord/details.vue b/src/pages/work/accounts/accountDealRecord/details.vue index 4684844..946baa9 100644 --- a/src/pages/work/accounts/accountDealRecord/details.vue +++ b/src/pages/work/accounts/accountDealRecord/details.vue @@ -13,6 +13,7 @@ + diff --git a/src/pages/work/accounts/accountDealRecord/list.vue b/src/pages/work/accounts/accountDealRecord/list.vue index 51ed7ae..baa1184 100644 --- a/src/pages/work/accounts/accountDealRecord/list.vue +++ b/src/pages/work/accounts/accountDealRecord/list.vue @@ -111,6 +111,10 @@ 交易类别: {{ dictStr(item.dealCategory, dealCategoryList) }} + + 交易子类别: + {{ item.childCategoryName }} + 备注: {{ item.remark }} diff --git a/src/pages/work/bill/creditCardBill/addEdit.vue b/src/pages/work/bill/creditCardBill/addEdit.vue index bd29922..6dbf0b1 100644 --- a/src/pages/work/bill/creditCardBill/addEdit.vue +++ b/src/pages/work/bill/creditCardBill/addEdit.vue @@ -192,7 +192,7 @@ onLoad((option) => { updateCreditCardBill(form.value).then(res => { proxy.$refs['uToast'].show({ message: '修改成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/creditCardBill//list` }) + uni.navigateTo({ url: `/pages/work/bill/creditCardBill/list` }) } }) }) @@ -200,7 +200,7 @@ onLoad((option) => { addCreditCardBill(form.value).then(res => { proxy.$refs['uToast'].show({ message: '新增成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/creditCardBill//list` }) + uni.navigateTo({ url: `/pages/work/bill/creditCardBill/list` }) } }) }) diff --git a/src/pages/work/bill/creditInstallmentHistory/addEdit.vue b/src/pages/work/bill/creditInstallmentHistory/addEdit.vue index c566c66..45cdeb2 100644 --- a/src/pages/work/bill/creditInstallmentHistory/addEdit.vue +++ b/src/pages/work/bill/creditInstallmentHistory/addEdit.vue @@ -250,7 +250,7 @@ onLoad((option) => { updateInstallmentHistory(form.value).then(res => { proxy.$refs['uToast'].show({ message: '修改成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` }) + uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/list` }) } }) }) @@ -258,7 +258,7 @@ onLoad((option) => { addInstallmentHistory(form.value).then(res => { proxy.$refs['uToast'].show({ message: '新增成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` }) + uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/list` }) } }) }) diff --git a/src/pages/work/bill/onlineLendHistory/addEdit.vue b/src/pages/work/bill/onlineLendHistory/addEdit.vue index 3fde4ff..3bc3680 100644 --- a/src/pages/work/bill/onlineLendHistory/addEdit.vue +++ b/src/pages/work/bill/onlineLendHistory/addEdit.vue @@ -250,7 +250,7 @@ onLoad((option) => { updateInstallmentHistory(form.value).then(res => { proxy.$refs['uToast'].show({ message: '修改成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` }) + uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/list` }) } }) }) @@ -258,7 +258,7 @@ onLoad((option) => { addInstallmentHistory(form.value).then(res => { proxy.$refs['uToast'].show({ message: '新增成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` }) + uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/list` }) } }) }) diff --git a/src/pages/work/bill/peopleLendHistory/addEdit.vue b/src/pages/work/bill/peopleLendHistory/addEdit.vue index 23f666b..d666d0f 100644 --- a/src/pages/work/bill/peopleLendHistory/addEdit.vue +++ b/src/pages/work/bill/peopleLendHistory/addEdit.vue @@ -225,7 +225,7 @@ onLoad((option) => { updateInstallmentHistory(form.value).then(res => { proxy.$refs['uToast'].show({ message: '修改成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` }) + uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/list` }) } }) }) @@ -233,7 +233,7 @@ onLoad((option) => { addInstallmentHistory(form.value).then(res => { proxy.$refs['uToast'].show({ message: '新增成功', complete() { - uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory//list` }) + uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/list` }) } }) })