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

@@ -1,48 +1,73 @@
<template>
<view class="container">
<u-navbar
leftIconSize="40rpx"
leftIconColor="#ffffff"
title="还款明细"
:bgColor="'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'"
:titleStyle="{ color: '#ffffff', fontSize: '36rpx', fontWeight: '600' }"
>
</u-navbar>
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
<view class="search-view">
<u-input v-model="queryParams.name" border="false" disabled ="false" type="select" v-show="true" >
<u-input v-model="queryParams.name" border="false" disabled ="false" type="select" v-show="true" class="search-input">
</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> -->
<u-icon name="checkmark-circle-fill" color="#666666" size="28" style="margin-left:10px" label="总利息汇总"
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="handleUpdateInterest()"></u-icon>
<view class="summary-btn" @click="handleUpdateInterest()">
<uni-icons type="checkmark-circle-fill" size="18" color="#ffffff"></uni-icons>
<text>总利息汇总</text>
</view>
</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">
<view class="item-row">
<text class="row-label">还款日期</text>
<text class="row-value">{{ item.repaymentDate }}</text>
<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">信用卡分期还款</text>
</view>
<view class="info-row">
<text class="time-text">{{ item.repaymentDate }}</text>
<text class="type-text">{{ item.periods }}</text>
<text class="amount-value">{{ item.currentAmount }}</text>
</view>
</view>
<view class="item-row">
<text class="row-label">入账状态</text>
<text class="row-value">{{ dictStr(item.postingState, postingStateList) }}</text>
<view class="card-body">
<view class="info-item">
<text class="info-label">应还本金</text>
<text class="info-value">{{ item.principal }}</text>
</view>
<view class="info-item">
<text class="info-label">利息</text>
<text class="info-value">{{ item.interest }}</text>
</view>
<view class="info-item">
<text class="info-label">还款状态</text>
<text class="info-value" :class="item.postingState === '1' ? 'paid' : 'unpaid'">{{ dictStr(item.postingState, postingStateList) }}</text>
</view>
</view>
<view class="item-row">
<text class="row-label">还款期数</text>
<text class="row-value">{{ item.periods }}</text>
<view class="operate" @click.stop v-if="item.postingState !== '1'">
<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 class="item-row">
<text class="row-label">还款金额</text>
<text class="row-value">{{ item.currentAmount }}</text>
</view>
<view class="item-row">
<text class="row-label">应还本金</text>
<text class="row-value">{{ item.principal }}</text>
</view>
<view class="item-row">
<text class="row-label">利息</text>
<text class="row-value">{{ item.interest }}</text>
</view>
<view class="operate" >
<view class="btn filling" @click="handleEdit(item)">修改</view>
<view class="btn filling" @click="handleDelete(item)">删除</view>
<view class="operate" @click.stop v-else>
<view class="btn-view" @click="handleView(item)">
<uni-icons type="eye" size="16" color="#52c41a"></uni-icons>
<text>查看</text>
</view>
</view>
</view>
</u-list-item>
<view>
</view>
@@ -170,6 +195,10 @@ function handleUpdateInterest() {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}` })
isShow.value = true
}
function handleView(item) {
uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}&viewOnly=1` })
isShow.value = true
}
// function handleAdd() {
// uni.navigateTo({ url: `/pages/work/bill/creditInstallmentHistory/addEdit` })
// isShow.value = true
@@ -192,15 +221,6 @@ function handleUpdateInterest() {
</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;
@@ -208,158 +228,201 @@ function handleUpdateInterest() {
justify-content: space-between;
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;
}
.filter-panel {
width: 100%;
position: absolute;
left: 0;
top: 96rpx;
background-color: rgba(0, 0, 0, 0.5);
.filter-panel-content {
background-color: #ffff;
padding: 0 30rpx 30rpx;
.filter-title {
color: #000000;
font-size: 30rpx;
font-weight: 500;
padding: 30rpx 0;
}
.state-list {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.state-item {
width: 210rpx;
height: 72rpx;
border: 1rpx solid rgba(0, 0, 0, 0.25);
border-radius: 72rpx;
text-align: center;
line-height: 72rpx;
margin: 0 20rpx 20rpx 0;
font-size: 28rpx;
color: #000000;
}
.active {
background-color: rgba(222, 241, 255, 1);
border: 1rpx solid rgba(22, 119, 255, 1);
}
}
.summary-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);
}
.btn-box {
display: flex;
padding: 24rpx 30rpx;
background-color: #fff;
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
text {
color: #ffffff;
font-size: 28rpx;
font-weight: 600;
}
}
}
.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;
}
.status1 {
background: #F0F0F0;
color: #8C8C8C;
}
.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;
}
.status2 {
background: rgba(38, 129, 255, 0.2);
color: #2681FF;
}
.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;
}
.status3 {
background: #F7F7F7;
color: #2681FF;
}
.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);
}
.status4 {
background: rgba(255, 85, 51, 0.2);
color: #FF5533;
}
.time-text {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.9);
font-weight: 500;
line-height: 1.3;
flex-shrink: 0;
}
.status5 {
background: #F7F7F7;
color: rgba(0, 0, 0, 0.85);
}
.type-text {
font-size: 26rpx;
font-weight: 600;
color: #ffffff;
line-height: 1.3;
flex: 1;
min-width: 0;
text-align: center;
}
.status7 {
background: rgba(255, 129, 51, 0.2);
color: #FF8133;
}
.status8 {
background: rgba(65, 217, 165, 0.2);
color: #41D9A5;
}
.amount-value {
font-size: 36rpx;
font-weight: 700;
color: #52c41a;
line-height: 1.2;
flex-shrink: 0;
}
}
.item-row {
padding: 16rpx 0;
.card-body {
padding: 24rpx;
background: #fff;
display: flex;
gap: 16rpx;
}
.row-label {
color: rgba(0, 0, 0, 0.55);
.info-item {
flex: 1;
display: flex;
flex-direction: column;
gap: 6rpx;
min-width: 0;
.info-label {
font-size: 22rpx;
color: #999;
font-weight: 400;
}
.row-value {
color: rgba(0, 0, 0, 0.85)
.info-value {
font-size: 26rpx;
color: #333;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&.paid {
color: #52c41a;
font-weight: 600;
}
&.unpaid {
color: #ff8c00;
font-weight: 600;
}
}
}
.operate {
display: flex;
justify-content: flex-end;
gap: 12rpx;
padding: 24rpx;
background: #fff;
.btn {
width: 146rpx;
height: 56rpx;
line-height: 56rpx;
border-radius: 8rpx;
margin-left: 5rpx;
text-align: center;
.btn-edit,
.btn-delete,
.btn-view {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 6rpx;
height: 64rpx;
border-radius: 12rpx;
font-size: 26rpx;
font-weight: 500;
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);
}
.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);
}
.btn-view {
background: rgba(82, 196, 26, 0.1);
color: #52c41a;
border: 1rpx solid rgba(82, 196, 26, 0.3);
}
}
}