feat: Refactor transaction handling and add new features
- Updated ReasonGroupList.vue to modify classify button behavior for adding new classifications. - Refactored TransactionDetail.vue to integrate PopupContainer and enhance transaction detail display. - Improved TransactionDetailDialog.vue with updated classify button functionality. - Simplified BalanceView.vue by removing manual entry button. - Enhanced PeriodicRecord.vue to update classify button interactions. - Removed unused add transaction dialog from TransactionsRecord.vue. - Added new API endpoints in TransactionRecordController for parsing transactions and handling offsets. - Introduced BillForm.vue and ManualBillAdd.vue for streamlined bill entry. - Implemented OneLineBillAdd.vue for intelligent transaction parsing. - Created GlobalAddBill.vue for a unified bill addition interface.
This commit is contained in:
@@ -200,3 +200,42 @@ export const nlpAnalysis = (userInput) => {
|
||||
data: { userInput }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取抵账候选列表
|
||||
* @param {number} id - 当前交易ID
|
||||
* @returns {Promise<{success: boolean, data: Array}>}
|
||||
*/
|
||||
export const getCandidatesForOffset = (id) => {
|
||||
return request({
|
||||
url: `/TransactionRecord/GetCandidatesForOffset/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 抵账(删除两笔交易)
|
||||
* @param {number} id1 - 交易ID 1
|
||||
* @param {number} id2 - 交易ID 2
|
||||
* @returns {Promise<{success: boolean}>}
|
||||
*/
|
||||
export const offsetTransactions = (id1, id2) => {
|
||||
return request({
|
||||
url: '/TransactionRecord/OffsetTransactions',
|
||||
method: 'post',
|
||||
data: { id1, id2 }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 一句话录账解析
|
||||
* @param {string} text - 用户输入的自然语言文本
|
||||
* @returns {Promise<{success: boolean, data: Object}>}
|
||||
*/
|
||||
export const parseOneLine = (text) => {
|
||||
return request({
|
||||
url: '/TransactionRecord/ParseOneLine',
|
||||
method: 'post',
|
||||
data: { text }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user