feat(erp): 添加应付模块功能
- 新增应付模块,支持应付列表和详情接口 - 添加应付单据的保存功能 - 实现与客户端的通信调用逻辑 - 定义应付相关的数据结构和参数类型 - 支持分页查询和搜索条件过滤
This commit is contained in:
@@ -11,7 +11,8 @@ const (
|
||||
ActionFactory Action = "BD_Supplier" // 工厂
|
||||
ActionContact Action = "BD_CommonContact" // 联系人
|
||||
ActionCustom Action = "BD_Customer" // 客户
|
||||
ActionPayment Action = "AR_receivable" // 付款单
|
||||
ActionReceivable Action = "AR_receivable" // 付款单
|
||||
ActionPayable Action = "AP_Payable" // 付款单
|
||||
ActionProduct Action = "BD_MATERIAL" // 物料
|
||||
)
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@ type Ik3cloud struct {
|
||||
Contact contact // 联系人
|
||||
Factory factory // 工厂
|
||||
Custom custom // 客户
|
||||
Payment payment // 付款
|
||||
Product product // 产品
|
||||
Receivable receivable // 应收
|
||||
Payable payable // 应付
|
||||
}
|
||||
type Entity struct {
|
||||
Id int64 `json:"Id"`
|
||||
|
||||
26
ik3cloud/payable.go
Normal file
26
ik3cloud/payable.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type payable struct {
|
||||
}
|
||||
type ArgsPayableSave struct {
|
||||
PayableId int64 // 应付单id
|
||||
Number string // 编码
|
||||
CustomNumber string // 客户编码
|
||||
FactoryNumber string // 工厂编码
|
||||
}
|
||||
|
||||
// Save @TITLE 保存应付
|
||||
func (p *payable) Save(ctx context.Context, args ArgsPayableSave) (entity Entity, err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type payment struct {
|
||||
}
|
||||
type ArgsPaymentSave struct {
|
||||
PaymentId int64 // 付款单id
|
||||
Number string // 编码
|
||||
CustomNumber string // 客户编码
|
||||
}
|
||||
|
||||
// Save @TITLE 保存客户
|
||||
func (p *payment) Save(ctx context.Context, args ArgsPaymentSave) (entity Entity, err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
25
ik3cloud/receivable.go
Normal file
25
ik3cloud/receivable.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type receivable struct {
|
||||
}
|
||||
type ArgsReceivableSave struct {
|
||||
ReceivableId int64 // 应收单id
|
||||
Number string // 编码
|
||||
CustomNumber string // 客户编码
|
||||
}
|
||||
|
||||
// Save @TITLE 保存应收
|
||||
func (r *receivable) Save(ctx context.Context, args ArgsReceivableSave) (entity Entity, err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user