fix: 前端页面功能优化。

This commit is contained in:
tianyongbao
2025-11-14 20:06:41 +08:00
parent 459ab82cf2
commit 93420ca772
10 changed files with 680 additions and 478 deletions

View File

@@ -90,45 +90,36 @@
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item" @click="enterDetails(item)">
<view class="item-header">
<view class="date-row">
<view class="first-row">
<view class="card-icon">
<uni-icons type="wallet-filled" size="20" color="#ffffff"></uni-icons>
</view>
<text class="card-name">{{ item.accountName }}</text>
<text class="card-date">{{ item.createTime }}</text>
</view>
<view class="info-row">
<text class="card-name">{{ item.accountName }}</text>
<view class="profit-tag" :class="item.dealType === '1' ? 'income' : 'expense'">
<text>{{ dictStr(item.dealType, dealTypeList) }}</text>
<view class="second-row">
<text class="account-type">{{ dictStr(item.type, accountTypeList) }}</text>
<text class="deal-category">{{ dictStr(item.dealCategory, dealCategoryList) }}</text>
<text class="child-category" v-if="item.childCategory && item.childCategory != item.dealCategory">{{ item.childCategoryName }}</text>
<view class="right-group">
<view class="profit-tag" :class="item.dealType === '1' ? 'income' : 'expense'">
<text>{{ dictStr(item.dealType, dealTypeList) }}</text>
</view>
<text class="card-amount" :class="item.dealType === '1' ? 'income' : 'expense'"><text class="amount-value">{{ item.amount }}</text></text>
</view>
<text class="card-amount" :class="item.dealType === '1' ? 'income' : 'expense'"><text class="amount-value">{{ item.amount }}</text></text>
</view>
</view>
<view class="card-body" @click.stop>
<view class="info-grid">
<view class="card-body">
<view class="info-row">
<view class="info-item">
<text class="info-label">记账类型</text>
<text class="info-value">{{ dictStr(item.type, accountTypeList) }}</text>
</view>
<view class="info-item">
<text class="info-label">当前余额</text>
<text class="info-label">余额</text>
<text class="info-value">{{ item.currentBalance }}</text>
</view>
</view>
<view class="info-grid">
<view class="info-item">
<text class="info-label">交易类别</text>
<text class="info-value">{{ dictStr(item.dealCategory, dealCategoryList) }}</text>
<view class="info-item" v-if="item.remark">
<text class="info-label">备注</text>
<text class="info-remark">{{ item.remark }}</text>
</view>
<view class="info-item" v-if="item.childCategory && item.childCategory != item.dealCategory">
<text class="info-label">交易子类别</text>
<text class="info-value">{{ item.childCategoryName }}</text>
</view>
</view>
<view class="info-full" v-if="item.remark">
<text class="info-label">备注</text>
<text class="info-remark">{{ item.remark }}</text>
</view>
</view>
@@ -552,7 +543,7 @@ function selectAccountType(item) {
padding: 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.date-row {
.first-row {
display: flex;
align-items: center;
gap: 12rpx;
@@ -568,25 +559,9 @@ function selectAccountType(item) {
justify-content: center;
flex-shrink: 0;
}
.card-date {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.9);
font-weight: 500;
line-height: 1.3;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16rpx;
padding-top: 12rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2);
}
.card-name {
font-size: 28rpx;
font-size: 30rpx;
font-weight: 600;
color: #ffffff;
line-height: 1.3;
@@ -596,12 +571,61 @@ function selectAccountType(item) {
text-overflow: ellipsis;
white-space: nowrap;
}
.card-date {
font-size: 30rpx;
color: rgba(255, 255, 255, 0.9);
font-weight: 500;
line-height: 1.3;
white-space: nowrap;
flex-shrink: 0;
}
.second-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
padding-top: 12rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2);
}
.deal-category {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.9);
font-weight: 500;
white-space: nowrap;
flex-shrink: 0;
}
.account-type {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
white-space: nowrap;
flex: 1;
}
.child-category {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.8);
font-weight: 400;
white-space: nowrap;
flex-shrink: 0;
}
.right-group {
display: flex;
align-items: center;
gap: 12rpx;
flex-shrink: 0;
}
.profit-tag {
padding: 6rpx 16rpx;
padding: 6rpx 14rpx;
border-radius: 12rpx;
font-size: 24rpx;
font-weight: 500;
font-weight: 600;
line-height: 1;
flex-shrink: 0;
@@ -617,8 +641,8 @@ function selectAccountType(item) {
}
.card-amount {
font-size: 24rpx;
font-weight: 500;
font-size: 26rpx;
font-weight: 600;
line-height: 1.3;
white-space: nowrap;
flex-shrink: 0;
@@ -632,7 +656,7 @@ function selectAccountType(item) {
}
.amount-value {
font-size: 40rpx;
font-size: 34rpx;
font-weight: 700;
margin-right: 4rpx;
}
@@ -640,59 +664,55 @@ function selectAccountType(item) {
}
.card-body {
padding: 24rpx;
background: #fff;
padding: 16rpx 24rpx;
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
display: flex;
flex-direction: column;
gap: 16rpx;
}
.info-grid {
display: flex;
gap: 16rpx;
}
.info-row {
display: flex;
align-items: center;
gap: 24rpx;
.info-item {
display: flex;
align-items: center;
gap: 12rpx;
flex-shrink: 0;
&:last-child {
flex: 1;
min-width: 0;
}
}
.info-item {
flex: 1;
display: flex;
flex-direction: column;
gap: 6rpx;
min-width: 0;
.info-label {
font-size: 22rpx;
color: #999;
font-weight: 400;
flex-shrink: 0;
padding: 4rpx 12rpx;
background: rgba(102, 126, 234, 0.08);
border-radius: 8rpx;
}
.info-label {
font-size: 22rpx;
color: #999;
font-weight: 400;
}
.info-value {
font-size: 26rpx;
color: #333;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.info-full {
display: flex;
flex-direction: column;
gap: 8rpx;
padding-top: 8rpx;
border-top: 1rpx solid #f0f0f0;
.info-label {
font-size: 22rpx;
color: #999;
font-weight: 400;
}
.info-remark {
font-size: 26rpx;
color: #666;
line-height: 1.5;
word-break: break-all;
.info-value {
font-size: 28rpx;
color: #667eea;
font-weight: 600;
flex-shrink: 0;
}
.info-remark {
font-size: 24rpx;
color: #666;
line-height: 1.4;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-style: italic;
}
}
}

View File

@@ -7,7 +7,6 @@
>
</u-navbar>
<view class="section">
<view class="section-title">{{ title}}</view>
<view class="form-view">
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" label-width="auto"
:labelStyle="{ color: '#333333', fontSize: '30rpx' }">

View File

@@ -9,7 +9,7 @@
<view class="detail-card">
<view class="card-header">
<view class="card-title">
<uni-icons type="heart" size="24" color="#fff"></uni-icons>
<uni-icons type="heart" size="20" color="#fff"></uni-icons>
<text class="card-name">{{ detailInfo.name }}</text>
</view>
</view>
@@ -89,7 +89,7 @@ onLoad((option) => {
.card-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 32rpx;
padding: 12rpx 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
@@ -97,12 +97,13 @@ onLoad((option) => {
.card-title {
display: flex;
align-items: center;
gap: 12rpx;
gap: 8rpx;
.card-name {
color: #fff;
font-size: 36rpx;
font-size: 28rpx;
font-weight: bold;
line-height: 1;
}
}
}

View File

@@ -22,10 +22,14 @@
</view>
</view>
<view class="btn-box">
<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 class="btn-reset" @click="resetQuery()">
<uni-icons type="reload" size="16" color="#909399"></uni-icons>
<text>重置</text>
</view>
<view class="btn-confirm" @click="searchSubmit()">
<uni-icons type="checkmarkempty" size="16" color="#ffffff"></uni-icons>
<text>确定</text>
</view>
</view>
</view>
</u-transition>
@@ -207,17 +211,26 @@ function selectStatus(item) {
}
function handleDelete(item) {
uni.showModal({
title: '提示',
content: '确定要删除',
success: function (res) {
if (res.confirm) {
delHeartJourney(item.id)
uni.navigateTo({ url: `/pages/work/heartJourney/list` })
} else if (res.cancel) {
console.log('取消');
}
}
});
title: '确认删除',
content: '确定要删除这条记录吗?',
confirmText: '删除',
cancelText: '取消',
confirmColor: '#f5576c',
cancelColor: '#909399',
success: function (res) {
if (res.confirm) {
delHeartJourney(item.id).then(() => {
uni.showToast({
title: '删除成功',
icon: 'success'
})
pageNum.value = 1
listData.value = []
getList()
})
}
}
});
}
</script>
@@ -326,6 +339,49 @@ function selectStatus(item) {
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
.btn-reset,
.btn-confirm {
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
height: 88rpx;
border-radius: 12rpx;
font-size: 30rpx;
font-weight: 600;
transition: all 0.3s ease;
&:active {
transform: scale(0.98);
opacity: 0.9;
}
text {
line-height: 1;
}
}
.btn-reset {
flex: 1;
background: #f5f7fa;
border: 2rpx solid #dcdfe6;
text {
color: #606266;
}
}
.btn-confirm {
flex: 1;
background: #667eea;
box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.2);
border: none;
text {
color: #ffffff;
}
}
}
}
}
@@ -341,7 +397,7 @@ function selectStatus(item) {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx;
padding: 12rpx 20rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.card-name-section {
@@ -352,14 +408,14 @@ function selectStatus(item) {
}
.card-icon {
width: 56rpx;
height: 56rpx;
width: 40rpx;
height: 40rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 16rpx;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
margin-right: 10rpx;
flex-shrink: 0;
backdrop-filter: blur(10rpx);
}
@@ -373,9 +429,9 @@ function selectStatus(item) {
.card-name {
color: #ffffff;
font-size: 32rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 1.2;
line-height: 1.3;
}
}
}

View File

@@ -90,37 +90,37 @@ import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
import { ref } from "vue";
const commonGridList=ref([
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart-filled', color: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', permission: 'invest:heartJourney:list' },
{ path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'list', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', permission: 'invest:accountDealRecord:list' },
{ path: '/pages/work/accounts/posadvice/list', text: 'POS刷卡推荐', icon: 'star-filled', color: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)', permission: 'invest:posmachine:list' },
{ path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'reload', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)', permission: 'invest:posmachine:list' },
{ path: '/pages/work/accounts/creditTransferRecord/list', text: '信用卡还款', icon: 'redo', color: 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)', permission: 'invest:creditCard' },
{ path: '/pages/work/accounts/investAccountDeal/list', text: '投资交易记录', icon: 'chatboxes', color: 'linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/accounts/investTransferRecord/list', text: '投资账户记账', icon: 'checkbox-filled', color: 'linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/accounts/debitTransferRecord/list', text: '储蓄账户转账', icon: 'loop', color: 'linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)', permission: 'invest:debitCard' },
{ path: '/pages/work/accounts/accountDealRecord/list', text: '账户交易记录', icon: 'list', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:accountDealRecord:list' },
{ path: '/pages/work/accounts/posadvice/list', text: 'POS刷卡推荐', icon: 'star-filled', color: 'linear-gradient(135deg, #d38cff 0%, #9d50bb 100%)', permission: 'invest:posmachine:list' },
{ path: '/pages/work/accounts/posTransferRecord/list', text: 'POS机刷卡记账', icon: 'checkmarkempty', color: 'linear-gradient(135deg, #17c0eb 0%, #f368e0 100%)', permission: 'invest:posmachine:list' },
{ path: '/pages/work/accounts/creditTransferRecord/list', text: '信用卡还款', icon: 'redo', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)', permission: 'invest:creditCard' },
{ path: '/pages/work/accounts/investAccountDeal/list', text: '投资交易记录', icon: 'bars', color: 'linear-gradient(135deg, #00b4db 0%, #0083b0 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/accounts/investTransferRecord/list', text: '投资账户记账', icon: 'compose', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/accounts/debitTransferRecord/list', text: '储蓄账户转账', icon: 'loop', color: 'linear-gradient(135deg, #11998e 0%, #38ef7d 100%)', permission: 'invest:debitCard' },
{ path: '/pages/work/bill/creditCardBill/list', text: '信用卡账单', icon: 'wallet-filled', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:creditCardBill:list' },
{ path: '/pages/work/bill/onlineLendHistory/list', text: '贷款账单', icon: 'fire-filled', color: 'linear-gradient(135deg, #f857a6 0%, #ff5858 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/bill/creditInstallmentHistory/list', text: '信用卡分期账单', icon: 'calendar-filled', color: 'linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)', permission: 'invest:creditCard' },
{ path: '/pages/work/bill/creditQueryRecord/list', text: '征信查询记录', icon: 'search', color: 'linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)', permission: 'invest:creditQueryRecord:list' }
{ path: '/pages/work/bill/onlineLendHistory/list', text: '贷款账单', icon: 'calendar', color: 'linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/bill/creditInstallmentHistory/list', text: '信用卡分期账单', icon: 'calendar-filled', color: 'linear-gradient(135deg, #f6d365 0%, #fda085 100%)', permission: 'invest:creditCard' },
{ path: '/pages/work/bill/creditQueryRecord/list', text: '征信查询记录', icon: 'search', color: 'linear-gradient(135deg, #5f72bd 0%, #9b23ea 100%)', permission: 'invest:creditQueryRecord:list' }
])
const baseGridList=ref([
{ path: '/pages/work/base/debitCard/list', text: '储蓄账户管理', icon: 'wallet-filled', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:debitCard' },
{ path: '/pages/work/base/creditCard/list', text: '信用卡管理', icon: 'wallet', color: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', permission: 'invest:creditCard' },
{ path: '/pages/work/base/lend/list', text: '借贷账户管理', icon: 'upload-filled', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/base/posmachine/list', text: 'pos机管理', icon: 'shop-filled', color: 'linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)', permission: 'invest:posmachine:list' },
{ path: '/pages/work/base/financials/list', text: '理财账户管理', icon: 'star', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/base/stocks/list', text: '股票账户管理', icon: 'bars', color: 'linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/base/futures/list', text: '期货账户管理', icon: 'navigate', color: 'linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/product/productInfor/list', text: '商品信息', icon: 'gift-filled', color: 'linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%)', permission: 'invest:productInfor:list' }
{ path: '/pages/work/base/debitCard/list', text: '储蓄账户管理', icon: 'home-filled', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:debitCard' },
{ path: '/pages/work/base/creditCard/list', text: '信用卡管理', icon: 'vip-filled', color: 'linear-gradient(135deg, #fa709a 0%, #fee140 100%)', permission: 'invest:creditCard' },
{ path: '/pages/work/base/lend/list', text: '借贷账户管理', icon: 'upload-filled', color: 'linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/base/posmachine/list', text: 'pos机管理', icon: 'navigate-filled', color: 'linear-gradient(135deg, #0be881 0%, #0fbcf9 100%)', permission: 'invest:posmachine:list' },
{ path: '/pages/work/base/financials/list', text: '理财账户管理', icon: 'star', color: 'linear-gradient(135deg, #f6d365 0%, #fda085 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/base/stocks/list', text: '股票账户管理', icon: 'arrow-up', color: 'linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/base/futures/list', text: '期货账户管理', icon: 'fire', color: 'linear-gradient(135deg, #fc5c65 0%, #fd79a8 100%)', permission: 'invest:futureStocks:list' },
{ path: '/pages/work/product/productInfor/list', text: '商品信息', icon: 'gift-filled', color: 'linear-gradient(135deg, #fd79a8 0%, #e84393 100%)', permission: 'invest:productInfor:list' }
])
const billGridList=ref([
{ path: '/pages/work/bill/peopleLendHistory/list', text: '人情账单', icon: 'person-filled', color: 'linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/bill/futuresBill/list', text: '期货账单', icon: 'navigate-filled', color: 'linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)', permission: 'invest:futureStocksBill:list' },
{ path: '/pages/work/bill/stocksBill/list', text: '股票账单', icon: 'flag-filled', color: 'linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)', permission: 'invest:futureStocksBill:list' }
{ path: '/pages/work/bill/peopleLendHistory/list', text: '人情账单', icon: 'person-filled', color: 'linear-gradient(135deg, #fa8231 0%, #f7971e 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/bill/futuresBill/list', text: '期货账单', icon: 'eye-filled', color: 'linear-gradient(135deg, #636e72 0%, #2d3436 100%)', permission: 'invest:futureStocksBill:list' },
{ path: '/pages/work/bill/stocksBill/list', text: '股票账单', icon: 'flag-filled', color: 'linear-gradient(135deg, #5f72bd 0%, #9b23ea 100%)', permission: 'invest:futureStocksBill:list' }
])
const accountGridList=ref([
{ path: '/pages/work/accounts/accounts/list', text: '记账账户', icon: 'home-filled', color: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', permission: 'invest:accounts:list' },
{ path: '/pages/work/accounts/lendTransferRecord/list', text: '借贷账户记账', icon: 'link', color: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/product/productPriceRecord/list', text: '物价记录', icon: 'cart-filled', color: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', permission: 'invest:productPriceRecord:list' }
{ path: '/pages/work/accounts/accounts/list', text: '记账账户', icon: 'wallet', color: 'linear-gradient(135deg, #f6d365 0%, #fda085 100%)', permission: 'invest:accounts:list' },
{ path: '/pages/work/accounts/lendTransferRecord/list', text: '借贷账户记账', icon: 'link', color: 'linear-gradient(135deg, #fd79a8 0%, #e84393 100%)', permission: 'invest:onlineLend' },
{ path: '/pages/work/product/productPriceRecord/list', text: '物价记录', icon: 'cart-filled', color: 'linear-gradient(135deg, #0be881 0%, #0fbcf9 100%)', permission: 'invest:productPriceRecord:list' }
])
const heartJourneyGridList=ref([
{ path: '/pages/work/heartJourney/list', text: '心路历程', icon: 'heart', permission: 'invest:heartJourney:list' }