feat(erp): 添加付款类型常量和费用付款单相关字段

- 新增 PaymentType 类型和 Purchase、Cost 枚举值
- 在 RequestSearch 结构体中添加 AccountingSerial 字段
- 在 RequestItem 结构体中添加 AccountingSerial、PayableSerial、PaymentType 等字段
- 在请求结构体中移除已弃用的 DueDate 和 ExpectedPayDate 字段
- 添加 PrepaidAmount 和 PaidAmount 金额相关字段
This commit is contained in:
2026-01-21 13:36:08 +08:00
parent 17adfabb44
commit aad11de594
3 changed files with 55 additions and 29 deletions

View File

@@ -23,18 +23,16 @@ type ReplyCostList struct {
Total int64 `json:"total"`
}
type CostItem struct {
Id int64 `json:"id"`
RequestId int64 `json:"requestId"`
TypeNumber string `json:"typeNumber"`
TypeName string `json:"typeName"`
Amount decimal.Decimal `json:"amount"`
DepartmentId int64 `json:"departmentId"`
InvoiceSerial string `json:"invoiceSerial"`
Remarks string `json:"remarks"`
DueDate *time.Time `json:"dueDate"`
ExpectedPayDate *time.Time `json:"expectedPayDate"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
Id int64 `json:"id"`
RequestId int64 `json:"requestId"`
TypeNumber string `json:"typeNumber"`
TypeName string `json:"typeName"`
Amount decimal.Decimal `json:"amount"`
DepartmentId int64 `json:"departmentId"`
InvoiceSerial string `json:"invoiceSerial"`
Remarks string `json:"remarks"`
CreatedAt *time.Time `json:"createdAt"`
UpdatedAt *time.Time `json:"updatedAt"`
}
// List @TITLE 列表
@@ -48,15 +46,13 @@ func (c *cost) List(ctx context.Context, args ArgsCostList) (reply ReplyCostList
}
type ArgsCostAdd struct {
RequestId int64 // 报销单ID
TypeNumber string // 费用类型
TypeName string // 费用类型名称
Amount decimal.Decimal // 金额
DepartmentId int64 // 部门
Remarks string // 备注
InvoiceSerial string // 发票号
DueDate *time.Time // 到期日期
ExpectedPayDate *time.Time // 期望付款日期
RequestId int64 // 报销单ID
TypeNumber string // 费用类型
TypeName string // 费用类型名称
Amount decimal.Decimal // 金额
DepartmentId int64 // 部门
Remarks string // 备注
InvoiceSerial string // 发票号
}
// Add @TITLE 添加