feat: 完成应收款管理模块
后端:
- 创建 Receivable 实体类(应收款编号、需求ID、项目ID、客户ID、金额、状态、逾期天数)
- 创建 ReceivableMapper 接口
- 创建 ReceivableService 业务逻辑层
- 分页查询、保存/更新应收款
- 自动计算未收款金额和逾期天数
- 记录收款并自动更新状态
- 创建 ReceivableController 控制器(RESTful API)
前端:
- 创建 receivable.js API 文件(7个接口)
应收款管理模块核心功能完成!✅
This commit is contained in:
parent
6742515446
commit
0323717110
76
fund-admin/src/api/receivable.js
Normal file
76
fund-admin/src/api/receivable.js
Normal file
@ -0,0 +1,76 @@
|
||||
import request from '../utils/request'
|
||||
|
||||
/**
|
||||
* 获取应收款列表(分页)
|
||||
*/
|
||||
export const getReceivableList = (params) => {
|
||||
return request({
|
||||
url: '/proj/api/v1/receivable/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应收款详情
|
||||
*/
|
||||
export const getReceivableById = (receivableId) => {
|
||||
return request({
|
||||
url: `/proj/api/v1/receivable/${receivableId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建应收款
|
||||
*/
|
||||
export const createReceivable = (data) => {
|
||||
return request({
|
||||
url: '/proj/api/v1/receivable',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新应收款
|
||||
*/
|
||||
export const updateReceivable = (receivableId, data) => {
|
||||
return request({
|
||||
url: `/proj/api/v1/receivable/${receivableId}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应收款
|
||||
*/
|
||||
export const deleteReceivable = (receivableId) => {
|
||||
return request({
|
||||
url: `/proj/api/v1/receivable/${receivableId}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录收款
|
||||
*/
|
||||
export const recordPayment = (receivableId, amount) => {
|
||||
return request({
|
||||
url: `/proj/api/v1/receivable/${receivableId}/payment`,
|
||||
method: 'post',
|
||||
params: { amount }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新应收款状态
|
||||
*/
|
||||
export const updateReceivableStatus = (receivableId, status) => {
|
||||
return request({
|
||||
url: `/proj/api/v1/receivable/${receivableId}/status`,
|
||||
method: 'put',
|
||||
params: { status }
|
||||
})
|
||||
}
|
||||
@ -1 +1 @@
|
||||
Subproject commit 743d7038c11151d9e405f8a99f750ba48b143a17
|
||||
Subproject commit 91ba1879f285919f8c9d01f74e2a5c6a1842511e
|
||||
Loading…
x
Reference in New Issue
Block a user