fix: 账户交易记录修改完善。
This commit is contained in:
@@ -248,6 +248,19 @@ onLoad((option) => {
|
|||||||
getDicts('account_type').then(result => {
|
getDicts('account_type').then(result => {
|
||||||
form.value.typeName = dictStr(form.value.type, result.data)
|
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 {
|
} else {
|
||||||
// 编辑或复制模式 - 先加载数据,再处理账户列表
|
// 编辑或复制模式 - 先加载数据,再处理账户列表
|
||||||
|
|||||||
@@ -165,6 +165,11 @@ onLoad((option) => {
|
|||||||
form.value.inAccountId = option.creditCardId
|
form.value.inAccountId = option.creditCardId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 接收账单金额作为默认还款金额
|
||||||
|
if (option.billAmount) {
|
||||||
|
form.value.amount = parseFloat(option.billAmount)
|
||||||
|
}
|
||||||
|
|
||||||
if(form.value.id!=null){
|
if(form.value.id!=null){
|
||||||
title.value="信用卡还款-修改"
|
title.value="信用卡还款-修改"
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -90,12 +90,16 @@
|
|||||||
|
|
||||||
<view class="btn-detail" @click="enterDetails(item)">
|
<view class="btn-detail" @click="enterDetails(item)">
|
||||||
<uni-icons type="list" size="16" color="#52c41a"></uni-icons>
|
<uni-icons type="list" size="16" color="#52c41a"></uni-icons>
|
||||||
<text>账单明细</text>
|
<text>明细</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-deal" @click="handleAddDeal(item)">
|
<view class="btn-deal" @click="handleAddDeal(item)">
|
||||||
<uni-icons type="cart" size="16" color="#1890ff"></uni-icons>
|
<uni-icons type="cart" size="16" color="#1890ff"></uni-icons>
|
||||||
<text>交易</text>
|
<text>交易</text>
|
||||||
</view>
|
</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)">
|
<view class="btn-edit" @click="handleEdit(item)">
|
||||||
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
|
<uni-icons type="compose" size="16" color="#667eea"></uni-icons>
|
||||||
<text>修改</text>
|
<text>修改</text>
|
||||||
@@ -309,6 +313,14 @@ function selectStatus(value) {
|
|||||||
uni.navigateTo({ url })
|
uni.navigateTo({ url })
|
||||||
isShow.value = true
|
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>
|
</script>
|
||||||
|
|
||||||
@@ -691,6 +703,7 @@ page {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.btn-deal,
|
.btn-deal,
|
||||||
|
.btn-repay,
|
||||||
.btn-detail,
|
.btn-detail,
|
||||||
.btn-edit,
|
.btn-edit,
|
||||||
.btn-delete {
|
.btn-delete {
|
||||||
@@ -698,7 +711,7 @@ page {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 6rpx;
|
gap: 6rpx;
|
||||||
padding: 0 20rpx;
|
padding: 0 10rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@@ -717,6 +730,13 @@ page {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-repay {
|
||||||
|
background: rgba(250, 140, 22, 0.1);
|
||||||
|
color: #fa8c16;
|
||||||
|
border: 2rpx solid #fa8c16;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-detail {
|
.btn-detail {
|
||||||
background: rgba(82, 196, 26, 0.1);
|
background: rgba(82, 196, 26, 0.1);
|
||||||
color: #52c41a;
|
color: #52c41a;
|
||||||
|
|||||||
Reference in New Issue
Block a user