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

@@ -18,14 +18,15 @@ type ArgsRequestList struct {
Search RequestSearch
}
type RequestSearch struct {
RequestSerial string // 报销单号
InvoiceSerial string // 发票号
CreatedAtStart *time.Time // 创建开始时间
CreatedAtEnd *time.Time // 创建结束时间
RequestIds []int64 // 申请单id
BanFlag int64 // 禁用标记 1=禁用 2=启用
BankAccount string // 银行账号
BankName string // 账号名称
RequestSerial string // 报销单号
InvoiceSerial string // 发票号
CreatedAtStart *time.Time // 创建开始时间
CreatedAtEnd *time.Time // 创建结束时间
RequestIds []int64 // 申请单id
BanFlag int64 // 禁用标记 1=禁用 2=启用
BankAccount string // 银行账号
BankName string // 账号名称
AccountingSerial string // 做账合同号
}
type ReplyRequestList struct {
List []RequestItem `json:"list"`
@@ -37,6 +38,10 @@ type RequestItem struct {
FactoryName string `json:"factoryName"`
FactoryBank string `json:"factoryBank"`
FactoryBankAccount string `json:"factoryBankAccount"`
AccountingSerial string `json:"accountingSerial"`
PayableSerial string `json:"payableSerial"`
InvoiceSerial string `json:"invoiceSerial"`
PaymentType int64 `json:"paymentType"`
RequestSerial string `json:"requestSerial"`
Currency string `json:"currency"`
CurrencyName string `json:"currencyName"`
@@ -45,7 +50,9 @@ type RequestItem struct {
Remarks string `json:"remarks"`
BankAccount string `json:"bankAccount"`
BankName string `json:"bankName"`
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
Amount decimal.Decimal `json:"amount"`
PaidAmount decimal.Decimal `json:"paidAmount"`
BanFlag int64 `json:"banFlag"`
WorkflowId int64 `json:"workflowId"`
WorkflowStatus int64 `json:"workflowStatus"`
@@ -97,6 +104,16 @@ func (r *request) Add(ctx context.Context, args ArgsRequestAdd) (requestId int64
return
}
// Gen @TITLE 生成付款单
func (r *request) Gen(ctx context.Context, payableId int64) (err error) {
xClient, err := client.GetClient(r)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Gen", payableId, &reply)
}
type ReplyRequestInfo struct {
Id int64 `json:"id"`
RequestSerial string `json:"requestSerial"`
@@ -104,11 +121,17 @@ type ReplyRequestInfo struct {
FactoryName string `json:"factoryName"`
FactoryBank string `json:"factoryBank"`
FactoryBankAccount string `json:"factoryBankAccount"`
AccountingSerial string `json:"accountingSerial"`
PayableSerial string `json:"payableSerial"`
InvoiceSerial string `json:"invoiceSerial"`
PaymentType int64 `json:"paymentType"`
Currency string `json:"currency"`
CurrencyName string `json:"currencyName"`
CurrencySymbol string `json:"currencySymbol"`
CurrencyRate decimal.Decimal `json:"currencyRate"`
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
Amount decimal.Decimal `json:"amount"`
PaidAmount decimal.Decimal `json:"paidAmount"`
Remarks string `json:"remarks"`
BankAccount string `json:"bankAccount"`
BankName string `json:"bankName"`