feat: 添加待确认分类功能,支持获取和确认未分类交易记录;优化相关组件和服务
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 10s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 10s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
This commit is contained in:
@@ -195,21 +195,21 @@ const viewDetail = async (transaction) => {
|
||||
|
||||
// 详情保存后的回调
|
||||
const onDetailSave = async (saveData) => {
|
||||
// 重新加载当前日期的交易列表
|
||||
if (saveData && dateTransactions.value) {
|
||||
var updatedIndex = dateTransactions.value.findIndex(tx => tx.id === saveData.id);
|
||||
if (updatedIndex !== -1) {
|
||||
// 更新已有记录
|
||||
dateTransactions.value[updatedIndex].amount = saveData.amount;
|
||||
dateTransactions.value[updatedIndex].balance = saveData.balance;
|
||||
dateTransactions.value[updatedIndex].type = saveData.type;
|
||||
dateTransactions.value[updatedIndex].upsetedType = '';
|
||||
dateTransactions.value[updatedIndex].classify = saveData.classify;
|
||||
dateTransactions.value[updatedIndex].upsetedClassify = '';
|
||||
dateTransactions.value[updatedIndex].reason = saveData.reason;
|
||||
}
|
||||
var item = dateTransactions.value.find(tx => tx.id === saveData.id);
|
||||
if(!item) return
|
||||
|
||||
// 如果分类发生了变化 移除智能分类的内容,防止被智能分类覆盖
|
||||
if(item.classify !== saveData.classify) {
|
||||
// 通知智能分类按钮组件移除指定项
|
||||
smartClassifyButtonRef.value?.removeClassifiedTransaction(saveData.id)
|
||||
item.upsetedClassify = ''
|
||||
}
|
||||
|
||||
// 更新当前日期交易列表中的数据
|
||||
Object.assign(item, saveData);
|
||||
|
||||
|
||||
|
||||
// 重新加载当前月份的统计数据
|
||||
const now = selectedDate.value || new Date();
|
||||
fetchDailyStatistics(now.getFullYear(), now.getMonth() + 1);
|
||||
|
||||
Reference in New Issue
Block a user