fix: 智聪记账管理,统计页面,增加tab按钮。

This commit is contained in:
tianyongbao
2025-02-20 18:09:43 +08:00
parent f1995bdc6f
commit 7f5e803797
20 changed files with 215 additions and 11 deletions

View File

@@ -50,14 +50,31 @@
</div>
</div>
<div></div>
</div>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<div style="margin:8px">
<button :type="firstType" style="margin-right:5px" size=mini @click="btFirstClick">账户余额</button>
<button :type="secondType" type="primary" size=mini @click="btSecondClick">信用卡可用余额</button>
</div>
<u-list v-show="!tabShow" @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item">
<view class="item-header">
<u--text lines="2"
:text="item.account+''+item.availableLimit" size="30rpx" color="#333333" ></u--text>
:text="item.account+''+item.availableLimit+' 元'" size="30rpx" color="#333333" ></u--text>
</view>
</view>
</u-list-item>
<view>
</view>
</u-list>
<u-list v-show="tabShow" @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in secondListData" :key="index">
<view class="list-item">
<view class="item-header">
<u--text lines="2"
:text="item.account+''+item.availableLimit+' 元'" size="30rpx" color="#333333" ></u--text>
</view>
</view>
@@ -84,12 +101,18 @@
import {reactive ,toRefs,ref,computed }from "vue";
const pageNum = ref(1)
const listData = ref([])
const isShow = ref(false)
const accountTypeList = ref([])
const settingPickShow = ref(false)
const settingColumns = ref([])
const showAccount = ref(false)
const tabShow = ref(false)
const secondListData = ref([])
const firstType = ref("primary")
const secondType = ref("default")
const accountsBalance = ref({
debetBalance: '',
creditAvailableLimit: '',
@@ -128,16 +151,30 @@
getAccountsAnalysis({...queryParams.value }).then(res => {
accountsBalance.value = { ...res.data }
listData.value = listData.value.concat(res.data.accountsBalancesList)
secondListData.value = secondListData.value.concat(res.data.creditBalancesList)
}).catch(() => {
})
}
function getDict() {
function getDict() {
// 记账类型类型
getDicts('account_type').then(res => {
accountTypeList.value =[res.data]
})
}
function btFirstClick() {
tabShow.value=false
firstType.value="primary"
secondType.value="default"
}
function btSecondClick() {
secondType.value="primary"
firstType.value="default"
tabShow.value=true
}
function settingConfirm(e) {
queryParams.value.settingId = e.value[0].settingId
queryParams.value.settingName = e.value[0].settingName
@@ -177,6 +214,18 @@
<style lang="scss" scoped>
.app-container {
/* 在App.vue的<style>中或者单独的style文件中 */
.btn-normal {
background-color: #f0f0f0;
color: #333;
}
.btn-selected {
background-color: #007AFF;
color: #fff;
}
.header-con {
width: 100%;
height: 100px;