fix: 工作台所有页面,ui功能优化。

This commit is contained in:
tianyongbao
2025-11-18 08:29:50 +08:00
parent ffd41d989a
commit d1fd0a4d1d
59 changed files with 3630 additions and 2647 deletions

View File

@@ -1,26 +1,24 @@
<template>
<view class="container">
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入投资账户名称" class="search-input"
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<view class="add-btn" @click="handleAdd()">
<uni-icons type="plus-filled" size="18" color="#ffffff"></uni-icons>
<text>新增</text>
</view>
</view>
</u-sticky>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择交易时间" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#667eea" size="28" label="筛选"
labelPos="left" labelSize="28rpx" labelColor="#667eea" @click="filterPanel = !filterPanel"
style="display: flex; align-items: center; gap: 6rpx; padding: 8rpx 16rpx; background: rgba(102, 126, 234, 0.1); border-radius: 20rpx; border: 1rpx solid rgba(102, 126, 234, 0.3);"></u-icon>
<view class="search-view">
<u--input v-model="queryParams.name" border="false" placeholder="请输入投资账户名称" class="search-input"
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<view class="add-btn" @click="handleAdd()">
<uni-icons type="plusempty" size="18" color="#667eea"></uni-icons>
<text>新增</text>
</view>
</view>
<view class="search-view">
<u-input v-model="queryParams.time" border="false" type="select" readonly placeholder="请选择交易时间" suffixIcon="calendar"
suffixIconStyle="color: #909399" class="search-input">
</u-input>
<view class="filter-btn" @click="filterPanel = !filterPanel">
<uni-icons type="list" size="18" color="#667eea"></uni-icons>
<text>筛选</text>
</view>
<u-transition :show="filterPanel" mode="fade">
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
<view class="filter-title">交易类型</view>
@@ -78,7 +76,6 @@
</view>
</u-transition>
</view>
</u-sticky>
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item" @click="enterDetails(item)">
@@ -88,18 +85,21 @@
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
</view>
<text class="account-name">{{ item.accountName }}</text>
<text class="time-text">{{ item.createTime }}</text>
</view>
<view class="info-row">
<text class="time-text">{{ item.createTime }}</text>
<text class="type-text">{{ dictStr(item.dealType, dealTypeList) }}</text>
<text class="remark-text">{{ item.remark || '无备注' }}</text>
<text class="type-text" :class="item.dealType === '2' ? 'loss' : 'profit'">{{ dictStr(item.dealType, dealTypeList) }}</text>
<text class="amount-value" :class="item.dealType === '2' ? 'loss' : 'profit'">{{ item.dealType === '2' ? '-' : '+' }}{{ item.amount }}</text>
</view>
</view>
<view class="card-body" v-if="item.remark">
<view class="remark-section">
<text class="remark-label">备注</text>
<text class="remark-text">{{ item.remark }}</text>
<view class="card-body">
<view class="info-row">
<view class="info-item info-item-balance">
<text class="info-label">余额</text>
<text class="info-value balance">{{ item.currentBalance || 0 }}</text>
</view>
</view>
</view>
@@ -333,6 +333,14 @@ function selectAccountType(item) {
</script>
<style lang="scss" scoped>
page {
overflow: hidden;
}
.container {
background-color: #f5f7fa;
}
.btnAdd {
width: 146rpx;
height: 56rpx;
@@ -348,16 +356,18 @@ function selectAccountType(item) {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
.search-input {
background: #f5f7fa;
background: rgba(102, 126, 234, 0.08);
color: #333333;
flex: 1;
margin-right: 16rpx;
border-radius: 24rpx;
border: 1rpx solid #e8edf3;
border: 2rpx solid rgba(102, 126, 234, 0.3);
}
.add-btn {
@@ -365,22 +375,53 @@ function selectAccountType(item) {
align-items: center;
gap: 6rpx;
padding: 12rpx 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background: rgba(102, 126, 234, 0.08);
border-radius: 24rpx;
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
border: 2rpx solid rgba(102, 126, 234, 0.3);
transition: all 0.3s ease;
flex-shrink: 0;
&:active {
transform: scale(0.95);
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.3);
background: rgba(102, 126, 234, 0.12);
}
text {
color: #ffffff;
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;
&: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-panel {
@@ -399,24 +440,64 @@ function selectAccountType(item) {
color: #2c3e50;
font-size: 32rpx;
font-weight: 600;
padding: 32rpx 0 24rpx;
padding: 32rpx 0 24rpx 20rpx;
position: relative;
display: flex;
align-items: center;
&::before {
content: '';
width: 6rpx;
height: 32rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 3rpx;
margin-right: 12rpx;
flex-shrink: 0;
}
}
.select-header {
color: #2c3e50;
font-size: 32rpx;
font-weight: 600;
padding: 32rpx 0 24rpx 20rpx;
position: relative;
display: flex;
align-items: center;
&::before {
content: '';
width: 6rpx;
height: 32rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 3rpx;
margin-right: 12rpx;
flex-shrink: 0;
}
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
gap: 16rpx;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
padding: 0 32rpx;
height: 68rpx;
border: 2rpx solid #e8edf3;
border-radius: 34rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
line-height: 68rpx;
font-size: 28rpx;
color: #000000;
color: #666666;
transition: all 0.3s ease;
background: #ffffff;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
&:active {
transform: scale(0.95);
}
}
.active {
@@ -524,6 +605,15 @@ function selectAccountType(item) {
text-overflow: ellipsis;
white-space: nowrap;
}
.time-text {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
line-height: 1;
white-space: nowrap;
flex-shrink: 0;
}
.info-row {
display: flex;
@@ -533,23 +623,33 @@ function selectAccountType(item) {
padding-top: 6rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2);
}
.time-text {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.9);
font-weight: 500;
line-height: 1;
flex-shrink: 0;
}
.type-text {
font-size: 24rpx;
font-weight: 500;
.remark-text {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.85);
line-height: 1;
font-weight: 400;
line-height: 1.3;
flex: 1;
min-width: 0;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.type-text {
font-size: 28rpx;
font-weight: 600;
line-height: 1;
flex-shrink: 0;
margin-right: 8rpx;
&.profit {
color: #52c41a;
}
&.loss {
color: #f5576c;
}
}
.amount-value {
@@ -572,24 +672,45 @@ function selectAccountType(item) {
padding: 20rpx 24rpx;
background: #fff;
border-top: 1rpx solid #f5f7fa;
}
.info-row {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
margin-bottom: 0;
.remark-section {
.info-item {
flex: 0 0 calc(50% - 12rpx);
display: flex;
gap: 8rpx;
flex-direction: column;
gap: 4rpx;
min-width: 0;
margin-bottom: -5rpx;
.remark-label {
font-size: 24rpx;
color: #999;
font-weight: 500;
flex-shrink: 0;
&.info-item-balance {
flex: 0 0 auto;
}
.remark-text {
.info-label {
font-size: 24rpx;
color: #666;
line-height: 1.5;
color: #667eea;
font-weight: 500;
background: rgba(102, 126, 234, 0.08);
padding: 6rpx 12rpx;
border-radius: 8rpx;
align-self: flex-start;
}
.info-value {
font-size: 26rpx;
color: #fa8c16;
font-weight: 700;
flex: 1;
word-break: break-all;
line-height: 1.5;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}