fix: 界面功能优化,完成基础信息和心路历程优化。

This commit is contained in:
tianyongbao
2025-11-13 02:05:38 +08:00
parent 6231c2494f
commit f4b0366a39
29 changed files with 4327 additions and 1651 deletions

View File

@@ -5,10 +5,13 @@
<u--input v-model="queryParams.name" border="false" placeholder="请输入借贷账户名称" class="search-input"
@blur="searchBlur" suffixIcon="search" suffixIconStyle="color: #909399">
</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="plus-circle-fill" color="#666666" size="28" style="margin-left:10px" label="新增"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleAdd()"></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>
<view class="add-btn" @click="handleAdd()">
<uni-icons type="plus-filled" size="18" color="#ffffff"></uni-icons>
<text>新增</text>
</view>
<u-transition :show="filterPanel" mode="fade">
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
<view class="filter-panel-content">
@@ -19,8 +22,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);"></u-button>
</view>
</view>
</u-transition>
@@ -28,31 +33,50 @@
</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="dictStr(item.lendType, lendTypeList)+'-'+item.name+''+item.code+'' " size="30rpx" color="#333333" :bold="true"></u--text>
<view class="list-item" @click="enterDetails(item)">
<view class="item-header">
<view class="card-name-section">
<view class="card-icon">
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
</view>
<view class="card-info">
<text class="card-name">{{ dictStr(item.lendType, lendTypeList) }} - {{ item.name }}</text>
</view>
</view>
<view class="status-badge" :class="getStatusClass(item.status, dictStr(item.status, statusList))">
<text>{{ dictStr(item.status, statusList) }}</text>
</view>
</view>
<!-- <view class="item-row">
<text class="row-label">类型</text>
<text class="row-value">{{ dictStr(item.lendType, lendTypeList) }}</text>
</view> -->
<view class="item-row">
<text class="row-label">账户状态</text>
<text class="row-value">{{ dictStr(item.status, statusList) }}</text>
<view class="card-body">
<view class="info-row">
<view class="info-item">
<text class="info-label">账号</text>
<text class="info-value">{{ item.code }}</text>
</view>
<view class="info-item">
<text class="info-label">余额</text>
<text class="info-value orange">{{ item.balance }}</text>
</view>
</view>
<view class="info-row" v-if="item.remark">
<view class="info-item">
<text class="info-label">备注</text>
<text class="info-value">{{ item.remark }}</text>
</view>
</view>
</view>
<view class="item-row">
<text class="row-label">余额</text>
<text class="row-value">{{ item.balance }}</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-edit" @click="handleEdit(item)">
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
<text>修改</text>
</view>
<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>
@@ -143,6 +167,16 @@ function settingConfirm(e) {
function settingCancel() {
settingPickShow.value = false
}
function getStatusClass(status, statusText) {
if (statusText && statusText.includes('正常')) {
return 'status-normal'
}
if (statusText && (statusText.includes('销卡') || statusText.includes('销户'))) {
return 'status-error'
}
return 'status-default'
}
function dictStr(val, arr) {
let str = ''
arr.map(item => {
@@ -211,15 +245,6 @@ function selectStatus(item) {
</script>
<style lang="scss" scoped>
.btnAdd {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
display:float;
text-align: center;
}
.search-view {
padding: 12rpx 32rpx;
background-color: #ffffff;
@@ -228,157 +253,282 @@ function selectStatus(item) {
align-items: center;
position: relative;
margin-bottom: 24rpx;
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;
margin-left: 10rpx;
&: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 {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
.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 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 {
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;
.status {
.status-item {
width: 120rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 4rpx;
font-size: 24rpx;
padding: 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.card-name-section {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
}
.card-icon {
width: 56rpx;
height: 56rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
flex-shrink: 0;
backdrop-filter: blur(10rpx);
}
.card-info {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
.card-name {
color: #ffffff;
font-size: 32rpx;
font-weight: 600;
line-height: 1.2;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.status-badge {
padding: 12rpx 28rpx;
border-radius: 24rpx;
font-size: 26rpx;
font-weight: 600;
letter-spacing: 0.5rpx;
flex-shrink: 0;
&.status-default {
background: #f0f0f0;
color: #666666;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
&.status-normal {
background: #fa8c16 !important;
color: #ffffff !important;
box-shadow: 0 2rpx 8rpx rgba(250, 140, 22, 0.3) !important;
}
.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;
&.status-error {
background: #ff4d4f;
color: #ffffff;
box-shadow: 0 2rpx 8rpx rgba(255, 77, 79, 0.3);
}
}
}
.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: 24rpx;
.info-row {
display: flex;
margin-bottom: 12rpx;
gap: 12rpx;
&:last-child {
margin-bottom: 0;
}
.info-item {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 20rpx;
background: #f8f9fa;
border-radius: 8rpx;
min-height: 72rpx;
.info-label {
color: #7f8c8d;
font-size: 26rpx;
flex-shrink: 0;
white-space: nowrap;
min-width: 120rpx;
}
.info-value {
color: #2c3e50;
font-size: 28rpx;
font-weight: 500;
text-align: right;
flex: 1;
margin-left: 16rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&.orange {
color: #fa8c16;
font-weight: 600;
}
}
}
}
}
.operate {
display: flex;
justify-content: flex-end;
padding: 0 24rpx 24rpx;
gap: 16rpx;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
.btn-edit,
.btn-delete {
display: flex;
align-items: center;
gap: 6rpx;
padding: 12rpx 24rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
font-size: 26rpx;
transition: all 0.3s ease;
&:active {
transform: scale(0.95);
}
}
.circulation {
background: rgba(0, 0, 0, 0.04);
margin-right: 24rpx;
color: rgba(0, 0, 0, 0.85);
.btn-edit {
background: rgba(102, 126, 234, 0.1);
color: #667eea;
border: 1rpx solid rgba(102, 126, 234, 0.3);
text {
color: #667eea;
}
}
.filling {
background: #2681FF;
border-radius: 8rpx;
color: #FFFFFF;
.btn-delete {
background: rgba(245, 87, 108, 0.1);
color: #f5576c;
border: 1rpx solid rgba(245, 87, 108, 0.3);
text {
color: #f5576c;
}
}
}
}