feat(erp): 添加付款类型常量和费用付款单相关字段
- 新增 PaymentType 类型和 Purchase、Cost 枚举值 - 在 RequestSearch 结构体中添加 AccountingSerial 字段 - 在 RequestItem 结构体中添加 AccountingSerial、PayableSerial、PaymentType 等字段 - 在请求结构体中移除已弃用的 DueDate 和 ExpectedPayDate 字段 - 添加 PrepaidAmount 和 PaidAmount 金额相关字段
This commit is contained in:
@@ -104,3 +104,10 @@ const (
|
||||
Ik3cloudStatusSuccess Ik3cloudStatus = 3 // 推送成功
|
||||
Ik3cloudStatusFail Ik3cloudStatus = 4 // 推送失败
|
||||
)
|
||||
|
||||
type PaymentType = int64
|
||||
|
||||
const (
|
||||
PaymentTypePurchase PaymentType = 1 // 采购付款单
|
||||
PaymentTypeCost PaymentType = 2 // 费用付款单
|
||||
)
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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 添加
|
||||
|
||||
Reference in New Issue
Block a user