fix: 工作台页面,整体ui功能优化。

This commit is contained in:
tianyongbao
2025-11-14 02:13:02 +08:00
parent f4b0366a39
commit 459ab82cf2
62 changed files with 8331 additions and 3968 deletions

View File

@@ -5,8 +5,10 @@
<u--input v-model="queryParams.name" border="false" placeholder="请输入投资账户名称" class="search-input"
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</u--input>
<u-icon name="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></u-icon>
<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">
@@ -14,8 +16,9 @@
<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="#666666" size="28" label="筛选"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
<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>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
@@ -54,8 +57,10 @@
</view>
</view>
<view class="btn-box">
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
<u-button text="重置" @click="resetQuery()"
customStyle="flex: 1; background: #f5f7fa; color: #666666; border: none; border-radius: 12rpx; font-size: 30rpx; height: 88rpx;"></u-button>
<u-button type="primary" text="确定" @click="searchSubmit()"
customStyle="flex: 2; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; border-radius: 12rpx; font-size: 30rpx; font-weight: 600; height: 88rpx; box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3); margin-left: 16rpx;"></u-button>
</view>
<u-datetime-picker
:closeOnClickOverlay="true"
@@ -72,36 +77,33 @@
</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">
<view class="item-header" @click="enterDetails(item)">
<u--text suffixIcon="arrow-right" lines="2" iconStyle="font-size: 18px; color: #333333; font-weight:bold"
:text="item.accountName+dictStr(item.dealType, dealTypeList) +''+item.amount" size="30rpx" color="#333333" :bold="true"></u--text>
<view class="list-item" @click="enterDetails(item)">
<view class="item-header">
<view class="header-row">
<view class="card-icon">
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
</view>
<text class="account-name">{{ item.accountName }}</text>
</view>
<view class="info-row">
<text class="time-text">{{ item.createTime }}</text>
<text class="type-text">{{ 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="item-row">
<text class="row-label">交易类型</text>
<text class="row-value">{{ dictStr(item.dealType, dealTypeList) }}</text>
<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>
</view>
<view class="item-row">
<text class="row-label">交易时间</text>
<text class="row-value">{{ item.createTime }}</text>
</view>
<view class="item-row">
<text class="row-label">交易金额</text>
<text class="row-value">{{ item.amount }}</text>
</view>
<view class="item-row">
<text class="row-label">当前余额</text>
<text class="row-value">{{ item.currentBalance }}</text>
</view>
<view class="item-row">
<text class="row-label">备注</text>
<text class="row-value">{{ item.remark }}</text>
</view>
<view class="operate" >
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view> -->
<!-- <view class="btn filling" @click="handleEdit(item)">修改</view> -->
<view class="btn filling" @click="handleDelete(item)">删除</view>
<view class="operate" @click.stop>
<view class="btn-delete" @click="handleDelete(item)">
<uni-icons type="trash" size="16" color="#f5576c"></uni-icons>
<text>删除</text>
</view>
</view>
</view>
</u-list-item>
@@ -334,11 +336,38 @@ function selectAccountType(item) {
justify-content: space-between;
align-items: center;
position: relative;
z-index: 100;
.search-input {
background: #F5F5F5;
background: #f5f7fa;
color: #333333;
margin-right: 36rpx;
flex: 1;
margin-right: 16rpx;
border-radius: 24rpx;
border: 1rpx solid #e8edf3;
}
.add-btn {
display: flex;
align-items: center;
gap: 6rpx;
padding: 12rpx 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 24rpx;
box-shadow: 0 4rpx 12rpx 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);
}
text {
color: #ffffff;
font-size: 28rpx;
font-weight: 600;
}
}
.filter-panel {
@@ -349,14 +378,15 @@ function selectAccountType(item) {
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
background-color: #ffffff;
padding: 0 30rpx 30rpx;
border-radius: 16rpx 16rpx 0 0;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
color: #2c3e50;
font-size: 32rpx;
font-weight: 600;
padding: 32rpx 0 24rpx;
}
.state-list {
@@ -377,114 +407,162 @@ function selectAccountType(item) {
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: 2rpx solid transparent;
color: #ffffff;
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
font-weight: 600;
}
}
}
.btn-box {
display: flex;
gap: 16rpx;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
box-shadow: 0rpx -4rpx 16rpx rgba(0, 0, 0, 0.08);
}
}
}
.list-item {
margin: 0 24rpx 24rpx;
padding: 32rpx;
background-color: #fff;
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 16rpx;
flex-direction: column;
gap: 16rpx;
padding: 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
.header-row {
display: flex;
align-items: center;
gap: 12rpx;
}
.card-icon {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.25);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.account-name {
font-size: 26rpx;
font-weight: 500;
color: #ffffff;
line-height: 1.3;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12rpx;
padding-top: 12rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2);
}
.time-text {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.9);
font-weight: 500;
line-height: 1.3;
flex-shrink: 0;
}
.type-text {
font-size: 26rpx;
font-weight: 600;
color: #ffffff;
line-height: 1.3;
flex: 1;
min-width: 0;
text-align: center;
}
.amount-value {
font-size: 36rpx;
font-weight: 700;
line-height: 1.2;
flex-shrink: 0;
&.profit {
color: #52c41a;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
&.loss {
color: #f5576c;
}
}
}
.item-row {
padding: 16rpx 0;
.row-label {
color: rgba(0, 0, 0, 0.55);
}
.row-value {
color: rgba(0, 0, 0, 0.85)
.card-body {
padding: 20rpx 24rpx;
background: #fff;
border-top: 1rpx solid #f5f7fa;
.remark-section {
display: flex;
gap: 8rpx;
.remark-label {
font-size: 24rpx;
color: #999;
font-weight: 500;
flex-shrink: 0;
}
.remark-text {
font-size: 24rpx;
color: #666;
line-height: 1.5;
flex: 1;
word-break: break-all;
}
}
}
.operate {
display: flex;
gap: 12rpx;
padding: 24rpx;
background: #fff;
justify-content: flex-end;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
.btn-delete {
display: flex;
align-items: center;
justify-content: center;
gap: 6rpx;
padding: 0 32rpx;
height: 64rpx;
border-radius: 12rpx;
font-size: 26rpx;
font-weight: 500;
transition: all 0.3s ease;
background: rgba(245, 87, 108, 0.1);
color: #f5576c;
border: 1rpx solid rgba(245, 87, 108, 0.3);
&:active {
transform: scale(0.95);
}
}
}
}