收入明细网格结构优化
This commit is contained in:
parent
04e2fd29bc
commit
5e09db3d16
|
|
@ -42,7 +42,7 @@
|
|||
<view v-else-if="cardList.length === 0" class="empty-container">
|
||||
<text class="empty-text">暂无数据</text>
|
||||
</view>
|
||||
<cash-flow-card v-else v-for="(item, index) in cardList" :key="index" :cardData="item" />
|
||||
<cash-flow-card v-for="(item, index) in cardList" v-else :key="index" :cardData="item" />
|
||||
</view>
|
||||
<!-- 底部弹窗 -->
|
||||
<uni-popup ref="popup" :mask-click="true" type="bottom">
|
||||
|
|
@ -91,11 +91,7 @@ export default {
|
|||
date: currentDate,
|
||||
startDate: this.getDate('start'),
|
||||
endDate: this.getDate('end'),
|
||||
expenseTypes: [
|
||||
'提现',
|
||||
'订单',
|
||||
'其他'
|
||||
],
|
||||
expenseTypes: ['提现', '订单'],
|
||||
cardList: [],
|
||||
loading: false,
|
||||
}
|
||||
|
|
@ -158,12 +154,12 @@ export default {
|
|||
|
||||
const params = {
|
||||
beginCreateTime: this.date + ' 00:00:01',
|
||||
endCreateTime: endTime
|
||||
endCreateTime: endTime,
|
||||
}
|
||||
|
||||
console.log('查询参数:', {
|
||||
beginCreateTime: params.beginCreateTime,
|
||||
endCreateTime: params.endCreateTime
|
||||
endCreateTime: params.endCreateTime,
|
||||
})
|
||||
|
||||
// 根据选择的类型添加筛选条件
|
||||
|
|
@ -190,14 +186,14 @@ export default {
|
|||
console.error('获取数据失败:', response.msg)
|
||||
uni.showToast({
|
||||
title: response.msg || '获取数据失败',
|
||||
icon: 'none'
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('API调用失败:', error)
|
||||
uni.showToast({
|
||||
title: '网络错误,请重试',
|
||||
icon: 'none'
|
||||
icon: 'none',
|
||||
})
|
||||
} finally {
|
||||
this.loading = false
|
||||
|
|
@ -222,16 +218,14 @@ export default {
|
|||
time: time,
|
||||
orderNumber: log.id,
|
||||
amount: log.amount,
|
||||
bstType: log.bstType // 保留原始类型用于过滤
|
||||
bstType: log.bstType, // 保留原始类型用于过滤
|
||||
}
|
||||
})
|
||||
|
||||
// 如果是"其他"类型,过滤掉提现和订单
|
||||
if (this.expenseType === '其他') {
|
||||
const originalCount = items.length
|
||||
items = items.filter(item =>
|
||||
item.bstType !== 'WITHDRAW' && item.bstType !== 'ORDER'
|
||||
)
|
||||
items = items.filter(item => item.bstType !== 'WITHDRAW' && item.bstType !== 'ORDER')
|
||||
console.log(`其他类型过滤: 原始${originalCount}条,过滤后${items.length}条`)
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +236,7 @@ export default {
|
|||
date: date,
|
||||
outflow: totalExpense,
|
||||
inflow: totalIncome,
|
||||
items: items
|
||||
items: items,
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -253,8 +247,8 @@ export default {
|
|||
// 根据业务类型获取标题
|
||||
getTitleByBstType(bstType) {
|
||||
const titleMap = {
|
||||
'WITHDRAW': '提现',
|
||||
'ORDER': '订单'
|
||||
WITHDRAW: '提现',
|
||||
ORDER: '订单',
|
||||
}
|
||||
return titleMap[bstType] || '其他'
|
||||
},
|
||||
|
|
@ -262,8 +256,8 @@ export default {
|
|||
// 根据业务类型获取状态
|
||||
getStatusByBstType(bstType) {
|
||||
const statusMap = {
|
||||
'WITHDRAW': '审核中',
|
||||
'ORDER': ''
|
||||
WITHDRAW: '审核中',
|
||||
ORDER: '',
|
||||
}
|
||||
return statusMap[bstType] || ''
|
||||
},
|
||||
|
|
@ -420,7 +414,7 @@ view {
|
|||
}
|
||||
|
||||
.type-item {
|
||||
width: 30%;
|
||||
width: 45%;
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user