fix: 账户交易记录修改完善。

This commit is contained in:
tianyongbao
2026-03-01 09:54:28 +08:00
parent d58726c033
commit 2f4b581bbd
3 changed files with 40 additions and 2 deletions

View File

@@ -248,6 +248,19 @@ onLoad((option) => {
getDicts('account_type').then(result => {
form.value.typeName = dictStr(form.value.type, result.data)
})
}
// 回填交易类型名称(默认值'2'
if (form.value.dealType) {
getDicts('deal_type').then(result => {
form.value.dealTypeName = dictStr(form.value.dealType, result.data)
})
}
// 回填交易类别名称(默认值'1'
if (form.value.dealCategory) {
getDicts('deal_category').then(result => {
form.value.dealCategoryName = dictStr(form.value.dealCategory, result.data)
})
}
} else {
// 编辑或复制模式 - 先加载数据,再处理账户列表

View File

@@ -165,6 +165,11 @@ onLoad((option) => {
form.value.inAccountId = option.creditCardId
}
// 接收账单金额作为默认还款金额
if (option.billAmount) {
form.value.amount = parseFloat(option.billAmount)
}
if(form.value.id!=null){
title.value="信用卡还款-修改"
}else{

View File

@@ -90,12 +90,16 @@
<view class="btn-detail" @click="enterDetails(item)">
<uni-icons type="list" size="16" color="#52c41a"></uni-icons>
<text>账单明细</text>
<text>明细</text>
</view>
<view class="btn-deal" @click="handleAddDeal(item)">
<uni-icons type="cart" size="16" color="#1890ff"></uni-icons>
<text>交易</text>
</view>
<view class="btn-repay" @click="handleRepay(item)">
<uni-icons type="wallet" size="16" color="#fa8c16"></uni-icons>
<text>还款</text>
</view>
<view class="btn-edit" @click="handleEdit(item)">
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
<text>修改</text>
@@ -309,6 +313,14 @@ function selectStatus(value) {
uni.navigateTo({ url })
isShow.value = true
}
function handleRepay(item) {
// 跳转到信用卡还款页面传递信用卡ID和账单金额
let url = `/pages/work/accounts/creditTransferRecord/addEdit?creditCardId=${item.creditCardId}&billAmount=${item.billAmount}`
uni.navigateTo({ url })
isShow.value = true
}
</script>
@@ -691,6 +703,7 @@ page {
flex-wrap: wrap;
.btn-deal,
.btn-repay,
.btn-detail,
.btn-edit,
.btn-delete {
@@ -698,7 +711,7 @@ page {
align-items: center;
justify-content: center;
gap: 6rpx;
padding: 0 20rpx;
padding: 0 10rpx;
height: 64rpx;
border-radius: 12rpx;
font-size: 26rpx;
@@ -717,6 +730,13 @@ page {
font-weight: 600;
}
.btn-repay {
background: rgba(250, 140, 22, 0.1);
color: #fa8c16;
border: 2rpx solid #fa8c16;
font-weight: 600;
}
.btn-detail {
background: rgba(82, 196, 26, 0.1);
color: #52c41a;