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 // 推送成功
|
Ik3cloudStatusSuccess Ik3cloudStatus = 3 // 推送成功
|
||||||
Ik3cloudStatusFail Ik3cloudStatus = 4 // 推送失败
|
Ik3cloudStatusFail Ik3cloudStatus = 4 // 推送失败
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type PaymentType = int64
|
||||||
|
|
||||||
|
const (
|
||||||
|
PaymentTypePurchase PaymentType = 1 // 采购付款单
|
||||||
|
PaymentTypeCost PaymentType = 2 // 费用付款单
|
||||||
|
)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ type RequestSearch struct {
|
|||||||
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"`
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ type CostItem struct {
|
|||||||
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"`
|
|
||||||
ExpectedPayDate *time.Time `json:"expectedPayDate"`
|
|
||||||
CreatedAt *time.Time `json:"createdAt"`
|
CreatedAt *time.Time `json:"createdAt"`
|
||||||
UpdatedAt *time.Time `json:"updatedAt"`
|
UpdatedAt *time.Time `json:"updatedAt"`
|
||||||
}
|
}
|
||||||
@@ -55,8 +53,6 @@ type ArgsCostAdd struct {
|
|||||||
DepartmentId int64 // 部门
|
DepartmentId int64 // 部门
|
||||||
Remarks string // 备注
|
Remarks string // 备注
|
||||||
InvoiceSerial string // 发票号
|
InvoiceSerial string // 发票号
|
||||||
DueDate *time.Time // 到期日期
|
|
||||||
ExpectedPayDate *time.Time // 期望付款日期
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add @TITLE 添加
|
// Add @TITLE 添加
|
||||||
|
|||||||
Reference in New Issue
Block a user