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

@@ -104,3 +104,10 @@ const (
Ik3cloudStatusSuccess Ik3cloudStatus = 3 // 推送成功 Ik3cloudStatusSuccess Ik3cloudStatus = 3 // 推送成功
Ik3cloudStatusFail Ik3cloudStatus = 4 // 推送失败 Ik3cloudStatusFail Ik3cloudStatus = 4 // 推送失败
) )
type PaymentType = int64
const (
PaymentTypePurchase PaymentType = 1 // 采购付款单
PaymentTypeCost PaymentType = 2 // 费用付款单
)

View File

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

View File

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