fix: 统一功能优化完善。
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="0rpx" customNavHeight="0rpx">
|
||||
<view class="time-filter-row">
|
||||
<view class="time-filter-container">
|
||||
<view :class="['time-filter-item', { 'active': activeTimeFilter === 'today' }]"
|
||||
@click="selectTimeFilter('today')">
|
||||
<text>本日</text>
|
||||
</view>
|
||||
<view :class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')">
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view :class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')">
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view :class="['time-filter-item', { 'active': activeTimeFilter === 'oneMonth' }]"
|
||||
@click="selectTimeFilter('oneMonth')">
|
||||
<text>近一月</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" placeholder="" suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -227,7 +247,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="list" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -272,6 +292,7 @@
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('week') // 当前选中的时间筛选,默认为本周
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
@@ -506,15 +527,21 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'week' // 重置时间筛选为本周
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
getAcccountsOutInAnalysis({...queryParams.value }).then(res => {
|
||||
@@ -526,16 +553,77 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.id=''
|
||||
|
||||
showAccount.value = false
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'today') {
|
||||
// 本日:今天
|
||||
startTime = dayjs(today).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneMonth') {
|
||||
// 近一月:当前日期往前推1个月到当前日期
|
||||
const oneMonthAgo = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate())
|
||||
|
||||
startTime = dayjs(oneMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -692,60 +780,114 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 600rpx;
|
||||
height: 540rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
.time-filter-row {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(102, 126, 234, 0.12);
|
||||
}
|
||||
|
||||
text {
|
||||
color: #667eea;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
uni-icons {
|
||||
color: #667eea;
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="account-badge">
|
||||
<uni-icons type="wallet" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="home-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.account }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -205,7 +205,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="account-badge">
|
||||
<uni-icons type="star-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="home-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.account }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -6,6 +6,34 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'today' }]"
|
||||
@click="selectTimeFilter('today')"
|
||||
>
|
||||
<text>本日</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')"
|
||||
>
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneMonth' }]"
|
||||
@click="selectTimeFilter('oneMonth')"
|
||||
>
|
||||
<text>近一月</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -231,7 +259,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="vip-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -285,6 +313,7 @@
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('week') // 当前选中的时间筛选,默认为本周
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
@@ -520,15 +549,20 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'week' // 重置时间筛选为本周
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -541,11 +575,15 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
@@ -586,6 +624,53 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'today') {
|
||||
// 本日:今天
|
||||
startTime = dayjs(today).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneMonth') {
|
||||
// 近一月:当前日期往前推30天到当前日期
|
||||
const oneMonthAgo = new Date(today)
|
||||
oneMonthAgo.setDate(today.getDate() - 30)
|
||||
|
||||
startTime = dayjs(oneMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -750,7 +835,7 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 470rpx;
|
||||
height: 400rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
@@ -777,6 +862,54 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -7,6 +7,34 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'today' }]"
|
||||
@click="selectTimeFilter('today')"
|
||||
>
|
||||
<text>本日</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')"
|
||||
>
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneMonth' }]"
|
||||
@click="selectTimeFilter('oneMonth')"
|
||||
>
|
||||
<text>近一月</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -292,7 +320,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="wallet" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -312,7 +340,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="list" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="wallet" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -346,6 +374,7 @@
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const secondListData = ref([])
|
||||
const isShow = ref(false)
|
||||
const accountList = ref([])
|
||||
const accountTypeList = ref([])
|
||||
@@ -355,13 +384,8 @@
|
||||
const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
|
||||
const secondListData = ref([])
|
||||
const tabShow = ref(false)
|
||||
const classType = ref("primary")
|
||||
const dayType = ref("default")
|
||||
const viewMode = ref('category') // 'category' 或 'date' 或 'line' 或 'column'
|
||||
|
||||
const activeTimeFilter = ref('week') // 当前选中的时间筛选,默认为本周
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
@@ -612,15 +636,20 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'week' // 重置时间筛选为本周
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -639,11 +668,15 @@ const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
@@ -684,6 +717,52 @@ const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'today') {
|
||||
// 本日:今天
|
||||
startTime = dayjs(today).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneMonth') {
|
||||
// 近一月:当前日期往前推1个月到当前日期
|
||||
const oneMonthAgo = new Date(today.getFullYear(), today.getMonth() - 1, today.getDate())
|
||||
|
||||
startTime = dayjs(oneMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -840,7 +919,7 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 550rpx;
|
||||
height: 500rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
@@ -867,6 +946,54 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="bars" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}</text>
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="card-badge">
|
||||
<uni-icons type="wallet" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="star" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.name }}-{{ item.code }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -344,7 +344,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="card-badge">
|
||||
<uni-icons type="wallet" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="star" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.debitCard }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -6,6 +6,34 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'today' }]"
|
||||
@click="selectTimeFilter('today')"
|
||||
>
|
||||
<text>本日</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')"
|
||||
>
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneMonth' }]"
|
||||
@click="selectTimeFilter('oneMonth')"
|
||||
>
|
||||
<text>近一月</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -225,7 +253,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="paperplane" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -279,6 +307,7 @@
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('week') // 当前选中的时间筛选,默认为本周
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
@@ -509,15 +538,20 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'week' // 重置时间筛选为本周
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -530,11 +564,15 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
@@ -575,6 +613,53 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'today') {
|
||||
// 本日:今天
|
||||
startTime = dayjs(today).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneMonth') {
|
||||
// 近一月:当前日期往前推30天到当前日期
|
||||
const oneMonthAgo = new Date(today)
|
||||
oneMonthAgo.setDate(today.getDate() - 30)
|
||||
|
||||
startTime = dayjs(oneMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -739,34 +824,82 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 480rpx;
|
||||
height: 410rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.filter-btn {
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
|
||||
@@ -7,6 +7,40 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')"
|
||||
>
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneMonth' }]"
|
||||
@click="selectTimeFilter('oneMonth')"
|
||||
>
|
||||
<text>近一月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'threeMonth' }]"
|
||||
@click="selectTimeFilter('threeMonth')"
|
||||
>
|
||||
<text>近3月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'sixMonth' }]"
|
||||
@click="selectTimeFilter('sixMonth')"
|
||||
>
|
||||
<text>近6月</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -209,7 +243,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="arrow-up" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -288,7 +322,10 @@
|
||||
})
|
||||
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
|
||||
const pageSize = ref(10)
|
||||
const recordTypeOptions = ref([])
|
||||
const activeTimeFilter = ref('week') // 当前选中的时间筛选,默认为本周
|
||||
|
||||
// 曲线图配置
|
||||
const lineChartOpts = computed(() => {
|
||||
const dataCount = listData.value ? listData.value.length : 0
|
||||
@@ -523,15 +560,20 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'week' // 重置时间筛选为本周
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -550,11 +592,15 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
@@ -595,6 +641,63 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneMonth') {
|
||||
// 近一月:当前日期往前推30天到当前日期
|
||||
const oneMonthAgo = new Date(today)
|
||||
oneMonthAgo.setDate(today.getDate() - 30)
|
||||
|
||||
startTime = dayjs(oneMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'threeMonth') {
|
||||
// 近3月:当前日期往前推90天到当前日期
|
||||
const threeMonthAgo = new Date(today)
|
||||
threeMonthAgo.setDate(today.getDate() - 90)
|
||||
|
||||
startTime = dayjs(threeMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'sixMonth') {
|
||||
// 近6月:当前日期往前推180天到当前日期
|
||||
const sixMonthAgo = new Date(today)
|
||||
sixMonthAgo.setDate(today.getDate() - 180)
|
||||
|
||||
startTime = dayjs(sixMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -752,34 +855,82 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 650rpx;
|
||||
height: 580rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.filter-btn {
|
||||
.search-input {
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
color: #333333;
|
||||
flex: 1;
|
||||
margin-right: 16rpx;
|
||||
border-radius: 24rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
height: 66rpx !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="gift-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -6,6 +6,40 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')"
|
||||
>
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneMonth' }]"
|
||||
@click="selectTimeFilter('oneMonth')"
|
||||
>
|
||||
<text>近一月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'threeMonth' }]"
|
||||
@click="selectTimeFilter('threeMonth')"
|
||||
>
|
||||
<text>近3月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'sixMonth' }]"
|
||||
@click="selectTimeFilter('sixMonth')"
|
||||
>
|
||||
<text>近6月</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -165,7 +199,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="scan" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -218,6 +252,7 @@
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('week') // 当前选中的时间筛选,默认为本周
|
||||
const pos = ref({
|
||||
amount: '',
|
||||
commission: '',
|
||||
@@ -472,15 +507,20 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'week' // 重置时间筛选为本周
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-1, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
}
|
||||
function getList() {
|
||||
|
||||
@@ -493,11 +533,15 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-1, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
queryParams.value.startTime = dayjs(monday).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(sunday).format(formatValue)
|
||||
queryParams.value.time = dayjs(monday).format(formatValue)+'-'+dayjs(sunday).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
@@ -538,6 +582,63 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneMonth') {
|
||||
// 近一月:当前日期往前推30天到当前日期
|
||||
const oneMonthAgo = new Date(today)
|
||||
oneMonthAgo.setDate(today.getDate() - 30)
|
||||
|
||||
startTime = dayjs(oneMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'threeMonth') {
|
||||
// 近3月:当前日期往前推90天到当前日期
|
||||
const threeMonthAgo = new Date(today)
|
||||
threeMonthAgo.setDate(today.getDate() - 90)
|
||||
|
||||
startTime = dayjs(threeMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
} else if (type === 'sixMonth') {
|
||||
// 近6月:当前日期往前推180天到当前日期
|
||||
const sixMonthAgo = new Date(today)
|
||||
sixMonthAgo.setDate(today.getDate() - 180)
|
||||
|
||||
startTime = dayjs(sixMonthAgo).format(formatValue)
|
||||
endTime = dayjs(today).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -694,7 +795,7 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 850rpx;
|
||||
height: 800rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
@@ -720,6 +821,54 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="pos-badge">
|
||||
<uni-icons type="wallet" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="navigate-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.nameCode }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -344,7 +344,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="pos-badge">
|
||||
<uni-icons type="wallet" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="navigate-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.pos }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="eye-slash-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.nameCode }}</text>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="wallet-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -8,6 +8,40 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')"
|
||||
>
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'threeMonth' }]"
|
||||
@click="selectTimeFilter('threeMonth')"
|
||||
>
|
||||
<text>近3月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'sixMonth' }]"
|
||||
@click="selectTimeFilter('sixMonth')"
|
||||
>
|
||||
<text>近6月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneYear' }]"
|
||||
@click="selectTimeFilter('oneYear')"
|
||||
>
|
||||
<text>近1年</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -214,7 +248,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="calendar-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -267,6 +301,7 @@ import { listBankcardLend } from '@/api/invest/bankcardlend'
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list', 'line' 或 'column'
|
||||
const activeTimeFilter = ref('month') // 当前选中的时间筛选,默认为本月
|
||||
const historyObj = ref({
|
||||
unclearedDetailCount: '',
|
||||
unClearedDetail: '',
|
||||
@@ -502,16 +537,74 @@ function searchSubmit() {
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7 // 周日为0,转换为7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'threeMonth') {
|
||||
// 近3月:本月1号到下下个月月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 3, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'sixMonth') {
|
||||
// 近6月:本月1号到5个月后的月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 6, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneYear') {
|
||||
// 近1年:本月1号到11个月后的月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 12, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'month' // 重置时间筛选为本月
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
queryParams.value.dataType = '2'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
// 当前月份的结束日期
|
||||
const endDate = new Date(today.getFullYear(), today.getMonth() + 2, 0)
|
||||
const end = `${endDate.getFullYear()}-${(endDate.getMonth() + 1).toString().padStart(2, '0')}-${endDate.getDate().toString().padStart(2, '0')}`
|
||||
// 重置为本月:本月1号到月底
|
||||
const start = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const end = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
@@ -527,10 +620,9 @@ const end = `${endDate.getFullYear()}-${(endDate.getMonth() + 1).toString().padS
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
// 当前月份的结束日期
|
||||
const endDate = new Date(today.getFullYear(), today.getMonth() + 2, 0)
|
||||
const end = `${endDate.getFullYear()}-${(endDate.getMonth() + 1).toString().padStart(2, '0')}-${endDate.getDate().toString().padStart(2, '0')}`
|
||||
// 默认本月:本月1号到月底
|
||||
const start = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const end = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
@@ -757,6 +849,92 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: fit-content;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 12rpx;
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 16rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="search" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -9,6 +9,40 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'threeMonth' }]"
|
||||
@click="selectTimeFilter('threeMonth')"
|
||||
>
|
||||
<text>近3月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'sixMonth' }]"
|
||||
@click="selectTimeFilter('sixMonth')"
|
||||
>
|
||||
<text>近6月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneYear' }]"
|
||||
@click="selectTimeFilter('oneYear')"
|
||||
>
|
||||
<text>近1年</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'twoYear' }]"
|
||||
@click="selectTimeFilter('twoYear')"
|
||||
>
|
||||
<text>近2年</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -174,7 +208,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="fire" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -228,6 +262,7 @@ import { listBankcardLend } from '@/api/invest/bankcardlend'
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('month') // 当前选中的时间筛选,默认为本月
|
||||
const futuresStock = ref({
|
||||
maxRevenue: '',
|
||||
maxLoss: '',
|
||||
@@ -488,16 +523,18 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'month' // 重置时间筛选为本月
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = 2
|
||||
queryParams.value.dataType = '1'
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
const start = dayjs(end).add(-12, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本月:当月的第一天到最后一天
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
const end = start
|
||||
queryParams.value.startTime = start
|
||||
queryParams.value.endTime = end
|
||||
queryParams.value.time = start + '-' + end
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -510,11 +547,12 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
// 默认本月:当月的第一天到最后一天
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
const start = dayjs(end).add(-12, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
const start = end
|
||||
queryParams.value.startTime = start
|
||||
queryParams.value.endTime = end
|
||||
queryParams.value.time = start + '-' + end
|
||||
listFutureStocks(queryFutureStocksListParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
@@ -555,6 +593,56 @@ const start = dayjs(end).add(-12, 'months')
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const currentYear = today.getFullYear()
|
||||
const currentMonth = today.getMonth() + 1
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'month') {
|
||||
// 本月:当月
|
||||
const month = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
startTime = month
|
||||
endTime = month
|
||||
} else if (type === 'threeMonth') {
|
||||
// 近3月:当前月份往前推3个月到当前月份
|
||||
const endMonth = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
const startDate = dayjs(endMonth).add(-2, 'months')
|
||||
startTime = dayjs(startDate).format(formatValue)
|
||||
endTime = endMonth
|
||||
} else if (type === 'sixMonth') {
|
||||
// 近6月:当前月份往前推6个月到当前月份
|
||||
const endMonth = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
const startDate = dayjs(endMonth).add(-5, 'months')
|
||||
startTime = dayjs(startDate).format(formatValue)
|
||||
endTime = endMonth
|
||||
} else if (type === 'oneYear') {
|
||||
// 近1年:当前月份往前推12个月到当前月份
|
||||
const endMonth = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
const startDate = dayjs(endMonth).add(-11, 'months')
|
||||
startTime = dayjs(startDate).format(formatValue)
|
||||
endTime = endMonth
|
||||
} else if (type === 'twoYear') {
|
||||
// 近2年:当前月份往前推24个月到当前月份
|
||||
const endMonth = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
const startDate = dayjs(endMonth).add(-23, 'months')
|
||||
startTime = dayjs(startDate).format(formatValue)
|
||||
endTime = endMonth
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -711,7 +799,7 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 800rpx;
|
||||
height: 780rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
@@ -737,6 +825,54 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -3,6 +3,40 @@
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="0rpx"
|
||||
customNavHeight="0rpx">
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'threeMonth' }]"
|
||||
@click="selectTimeFilter('threeMonth')"
|
||||
>
|
||||
<text>近3月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'sixMonth' }]"
|
||||
@click="selectTimeFilter('sixMonth')"
|
||||
>
|
||||
<text>近6月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneYear' }]"
|
||||
@click="selectTimeFilter('oneYear')"
|
||||
>
|
||||
<text>近1年</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'twoYear' }]"
|
||||
@click="selectTimeFilter('twoYear')"
|
||||
>
|
||||
<text>近2年</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -179,7 +213,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="settings" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -233,6 +267,7 @@ import { listBankcardLend } from '@/api/invest/bankcardlend'
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('month') // 当前选中的时间筛选,默认为本月
|
||||
const futuresStock = ref({
|
||||
maxRevenue: '',
|
||||
maxLoss: '',
|
||||
@@ -487,15 +522,15 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'month' // 重置时间筛选为本月
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = 2
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
const start = dayjs(end).add(-12, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
const currentMonth = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
queryParams.value.startTime = currentMonth
|
||||
queryParams.value.endTime = currentMonth
|
||||
queryParams.value.time = currentMonth + '-' + currentMonth
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -508,16 +543,62 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
const start = dayjs(end).add(-12, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
const currentMonth = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
queryParams.value.startTime = currentMonth
|
||||
queryParams.value.endTime = currentMonth
|
||||
queryParams.value.time = currentMonth + '-' + currentMonth
|
||||
listFutureStocks(queryFutureStocksListParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const currentYear = today.getFullYear()
|
||||
const currentMonth = today.getMonth() + 1
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'month') {
|
||||
// 本月
|
||||
const month = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
startTime = month
|
||||
endTime = month
|
||||
} else if (type === 'threeMonth') {
|
||||
// 近3月:当前月份往前推3个月到当前月份(包含当前月份,共3个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 3, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
} else if (type === 'sixMonth') {
|
||||
// 近6月:当前月份往前推6个月到当前月份(包含当前月份,共6个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 6, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
} else if (type === 'oneYear') {
|
||||
// 近1年:当前月份往前推12个月到当前月份(包含当前月份,共12个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 12, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
} else if (type === 'twoYear') {
|
||||
// 近2年:当前月份往前推24个月到当前月份(包含当前月份,共24个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 24, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
@@ -709,7 +790,7 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 750rpx;
|
||||
height: 700rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
@@ -735,6 +816,54 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -9,6 +9,40 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'week' }]"
|
||||
@click="selectTimeFilter('week')"
|
||||
>
|
||||
<text>本周</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'threeMonth' }]"
|
||||
@click="selectTimeFilter('threeMonth')"
|
||||
>
|
||||
<text>近3月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'sixMonth' }]"
|
||||
@click="selectTimeFilter('sixMonth')"
|
||||
>
|
||||
<text>近6月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneYear' }]"
|
||||
@click="selectTimeFilter('oneYear')"
|
||||
>
|
||||
<text>近1年</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -215,7 +249,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="upload-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -268,6 +302,7 @@ import { listBankcardLend } from '@/api/invest/bankcardlend'
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('month') // 当前选中的时间筛选,默认为本月
|
||||
const historyObj = ref({
|
||||
unclearedDetailCount: '',
|
||||
unClearedDetail: '',
|
||||
@@ -504,19 +539,78 @@ function searchSubmit() {
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'week') {
|
||||
// 本周:本周一到周日
|
||||
const dayOfWeek = today.getDay() || 7
|
||||
const monday = new Date(today)
|
||||
monday.setDate(today.getDate() - dayOfWeek + 1)
|
||||
const sunday = new Date(monday)
|
||||
sunday.setDate(monday.getDate() + 6)
|
||||
|
||||
startTime = dayjs(monday).format(formatValue)
|
||||
endTime = dayjs(sunday).format(formatValue)
|
||||
} else if (type === 'month') {
|
||||
// 本月:本月1号到本月最后一天
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'threeMonth') {
|
||||
// 近3月:本月1号到下下个月月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 3, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'sixMonth') {
|
||||
// 近6月:本月1号到5个月后的月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 6, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
} else if (type === 'oneYear') {
|
||||
// 近1年:本月1号到11个月后的月底
|
||||
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const lastDay = new Date(today.getFullYear(), today.getMonth() + 12, 0)
|
||||
|
||||
startTime = dayjs(firstDay).format(formatValue)
|
||||
endTime = dayjs(lastDay).format(formatValue)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'month' // 重置时间筛选为本月
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
queryParams.value.dataType = '3'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
// 当前月份的结束日期
|
||||
const endDate = new Date(today.getFullYear(), today.getMonth() + 2, 0)
|
||||
const end = `${endDate.getFullYear()}-${(endDate.getMonth() + 1).toString().padStart(2, '0')}-${endDate.getDate().toString().padStart(2, '0')}`
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 重置为本月:本月1号到月底
|
||||
const start = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const end = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue) + '-' + dayjs(end).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -529,13 +623,12 @@ const end = `${endDate.getFullYear()}-${(endDate.getMonth() + 1).toString().padS
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
// 当前月份的结束日期
|
||||
const endDate = new Date(today.getFullYear(), today.getMonth() + 2, 0)
|
||||
const end = `${endDate.getFullYear()}-${(endDate.getMonth() + 1).toString().padStart(2, '0')}-${endDate.getDate().toString().padStart(2, '0')}`
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
// 默认本月:本月1号到月底
|
||||
const start = new Date(today.getFullYear(), today.getMonth(), 1)
|
||||
const end = new Date(today.getFullYear(), today.getMonth() + 1, 0)
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue) + '-' + dayjs(end).format(formatValue)
|
||||
listBankcardLend(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
@@ -760,6 +853,54 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="download-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -9,6 +9,40 @@
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<view class="time-filter-container">
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'month' }]"
|
||||
@click="selectTimeFilter('month')"
|
||||
>
|
||||
<text>本月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'threeMonth' }]"
|
||||
@click="selectTimeFilter('threeMonth')"
|
||||
>
|
||||
<text>近3月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'sixMonth' }]"
|
||||
@click="selectTimeFilter('sixMonth')"
|
||||
>
|
||||
<text>近6月</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'oneYear' }]"
|
||||
@click="selectTimeFilter('oneYear')"
|
||||
>
|
||||
<text>近1年</text>
|
||||
</view>
|
||||
<view
|
||||
:class="['time-filter-item', { 'active': activeTimeFilter === 'twoYear' }]"
|
||||
@click="selectTimeFilter('twoYear')"
|
||||
>
|
||||
<text>近2年</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly suffixIcon="calendar"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
@@ -174,7 +208,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-left">
|
||||
<view class="time-badge">
|
||||
<uni-icons type="calendar" size="16" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="flag-filled" size="16" color="#ffffff"></uni-icons>
|
||||
<text>{{ item.time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -228,6 +262,7 @@ import { listBankcardLend } from '@/api/invest/bankcardlend'
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const viewMode = ref('list') // 'list' 或 'line' 或 'column'
|
||||
const activeTimeFilter = ref('month') // 当前选中的时间筛选,默认为本月
|
||||
const futuresStock = ref({
|
||||
maxRevenue: '',
|
||||
maxLoss: '',
|
||||
@@ -483,16 +518,16 @@ function searchSubmit() {
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
activeTimeFilter.value = 'month' // 重置时间筛选为本月
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = 2
|
||||
queryParams.value.dataType = '2'
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
const start = dayjs(end).add(-12, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
const currentMonth = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
queryParams.value.startTime = currentMonth
|
||||
queryParams.value.endTime = currentMonth
|
||||
queryParams.value.time = currentMonth + '-' + currentMonth
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
@@ -505,16 +540,62 @@ function searchSubmit() {
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
const start = dayjs(end).add(-12, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
const currentMonth = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2)
|
||||
queryParams.value.startTime = currentMonth
|
||||
queryParams.value.endTime = currentMonth
|
||||
queryParams.value.time = currentMonth + '-' + currentMonth
|
||||
listFutureStocks(queryFutureStocksListParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 时间筛选快捷选择
|
||||
function selectTimeFilter(type) {
|
||||
activeTimeFilter.value = type
|
||||
let formatValue = 'YYYY-MM'
|
||||
const today = new Date()
|
||||
const currentYear = today.getFullYear()
|
||||
const currentMonth = today.getMonth() + 1
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
|
||||
if (type === 'month') {
|
||||
// 本月
|
||||
const month = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
startTime = month
|
||||
endTime = month
|
||||
} else if (type === 'threeMonth') {
|
||||
// 近3月:当前月份往前推3个月到当前月份(包含当前月份,共3个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 3, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
} else if (type === 'sixMonth') {
|
||||
// 近6月:当前月份往前推6个月到当前月份(包含当前月份,共6个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 6, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
} else if (type === 'oneYear') {
|
||||
// 近1年:当前月份往前推12个月到当前月份(包含当前月份,共12个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 12, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
} else if (type === 'twoYear') {
|
||||
// 近2年:当前月份往前推24个月到当前月份(包含当前月份,共24个月)
|
||||
const startDate = new Date(currentYear, currentMonth - 24, 1)
|
||||
startTime = startDate.getFullYear() + '-' + ('0' + (startDate.getMonth() + 1)).slice(-2)
|
||||
endTime = currentYear + '-' + ('0' + currentMonth).slice(-2)
|
||||
}
|
||||
|
||||
queryParams.value.startTime = startTime
|
||||
queryParams.value.endTime = endTime
|
||||
queryParams.value.time = startTime + '-' + endTime
|
||||
|
||||
// 自动查询
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
@@ -706,7 +787,7 @@ page {
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
width: calc(100% - 48rpx);
|
||||
height: 800rpx;
|
||||
height: 750rpx;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
}
|
||||
@@ -732,6 +813,54 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-filter-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 8rpx;
|
||||
overflow-x: auto;
|
||||
padding: 0;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.time-filter-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 20rpx;
|
||||
background: rgba(102, 126, 234, 0.08);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid rgba(102, 126, 234, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
min-width: 0;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #667eea;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="list" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.accountName }}</text>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<view class="item-header">
|
||||
<view class="first-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="list" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-name">{{ item.accountName }}</text>
|
||||
<text class="card-date">{{ item.createTime }}</text>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons :type="detailInfo.type === '储蓄卡账户' ? 'wallet-filled' : 'vip-filled'" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="wallet" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code" v-if="detailInfo.code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="account-icon">
|
||||
<uni-icons :type="item.type === '1' ? 'wallet-filled' : 'vip-filled'" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="wallet" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}</text>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<view class="section">
|
||||
<view class="header-card">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="28" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="redo" size="28" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}</text>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="redo" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="credit-card-name">{{ item.name }}</text>
|
||||
</view>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<view class="header-card">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="redo-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="loop" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="transfer-name">{{ detailInfo.name }}</text>
|
||||
</view>
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<view class="item-header">
|
||||
<view class="first-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="redo-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="loop" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-name">{{ item.outAccountName }} → {{ item.inAccountName }}</text>
|
||||
</view>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<view class="header-card">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="28" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="bars" size="28" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="account-name">{{ detailInfo.accountName }}</text>
|
||||
<text class="type-text" :class="detailInfo.dealType === '亏损' ? 'loss' : 'profit'">{{ detailInfo.dealType }}</text>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="bars" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="account-name">{{ item.accountName }}</text>
|
||||
<text class="time-text">{{ item.createTime }}</text>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<view class="header-card">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="28" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="compose" size="28" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="account-name">{{ detailInfo.name }}</text>
|
||||
</view>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="compose" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="account-name">{{ item.name }}</text>
|
||||
</view>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="redo-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="link" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-time">{{ detailInfo.createTime }}</text>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="redo-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="link" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-date">{{ item.createTime }}</text>
|
||||
</view>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<view class="section">
|
||||
<view class="header-card">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="28" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="checkmarkempty" size="28" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="pos-name">{{ detailInfo.outAccountName }}</text>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<view class="item-header">
|
||||
<view class="first-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="checkmarkempty" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-name">{{ item.outAccountName }}</text>
|
||||
<text class="card-date">{{ item.createTime }}</text>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="left-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="star-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<view class="card-name-row">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="vip-filled" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code" v-if="detailInfo.code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="vip-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}</text>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="home-filled" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="home-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}</text>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="star" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code" v-if="detailInfo.code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="star" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}</text>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="fire" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code" v-if="detailInfo.code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="fire" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}<text class="card-code" v-if="item.code">({{ item.code }})</text></text>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="upload-filled" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code" v-if="detailInfo.code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="upload-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}<text class="card-code" v-if="item.code">({{ item.code }})</text></text>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="navigate-filled" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="merchant-name" v-if="detailInfo.merchantName"> - {{ detailInfo.merchantName }}</text></text>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="navigate-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}<text class="card-code" v-if="dictStr(item.type, posTypeList)"> - {{ dictStr(item.type, posTypeList) }}</text></text>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="wallet-filled" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="arrow-up" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code" v-if="detailInfo.code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="arrow-up" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}<text class="card-code" v-if="item.code">({{ item.code }})</text></text>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="calendar-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="time-text">{{ item.repaymentDate }}</text>
|
||||
<text class="type-text">第{{ item.periods }}期</text>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<view class="item-header">
|
||||
<view class="first-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="calendar-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-name">{{ item.bankNameCode }}</text>
|
||||
<text class="card-date">{{ item.installmentDate }}</text>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="bars" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="chatboxes" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-date">{{ item.createTime }}</text>
|
||||
</view>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="date-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="bars" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="chatboxes" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="bill-name" v-if="item.name">{{ item.name }}</text>
|
||||
<text class="card-date">({{ item.billDatePeriod }})</text>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<view class="item-header">
|
||||
<view class="header-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="calendar" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="account-name">{{ item.repaymentAccountName }}</text>
|
||||
<text class="status-badge" :class="item.postingState === '1' ? 'paid' : 'unpaid'">{{ dictStr(item.postingState, postingStateList) }}</text>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<view class="item-header">
|
||||
<view class="first-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="calendar" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-name">{{ item.bankNameCode }}</text>
|
||||
<text class="card-date">{{ item.installmentDate }}</text>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<view class="list-item" @click="enterDetails(item)">
|
||||
<view class="item-header">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="person-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-status">{{ dictStr(item.state, settleStateList) }}</text>
|
||||
<text class="card-date">{{ item.installmentDate }}</text>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="bars" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="flag-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="card-date">{{ item.createTime }}</text>
|
||||
</view>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-header">
|
||||
<view class="date-row">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="bars" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="flag-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<text class="bill-name" v-if="item.name">{{ item.name }}</text>
|
||||
<text class="card-date">({{ item.billDatePeriod }})</text>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="list" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="gift-filled" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.name }}<text class="card-code" v-if="detailInfo.code">({{ detailInfo.code }})</text></text>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="list" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="gift-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-name">{{ item.name }}<text class="card-code" v-if="item.code">({{ item.code }})</text></text>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="detail-card">
|
||||
<view class="card-header">
|
||||
<view class="header-icon">
|
||||
<uni-icons type="calendar" size="24" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="cart-filled" size="24" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="header-info">
|
||||
<text class="card-name">{{ detailInfo.kind }}</text>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<view class="item-header">
|
||||
<view class="card-name-section">
|
||||
<view class="card-icon">
|
||||
<uni-icons type="calendar" size="20" color="#ffffff"></uni-icons>
|
||||
<uni-icons type="cart-filled" size="20" color="#ffffff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-date">{{ item.recordTime }}</text>
|
||||
|
||||
Reference in New Issue
Block a user