feat(erp): 新增打款功能模块支持报销单和申请单
- 新增 BusinessTypeRequest 业务类型常量及"申请单"名称映射 - 报销单和申请单新增打款状态筛选字段 TransferStatuses - 报销单和申请单新增 TransferId、TransferStatus、TransferAt、TransferErrMsg 打款相关字段 - 新增 transfer 请求子模块,实现 Submit 提交打款接口 - 货运模块新增 DueRecDate 预计收汇日期字段
This commit is contained in:
@@ -38,10 +38,12 @@ var BusinessAuditTypeName = map[BusinessAuditType]string{
|
||||
type BusinessType = string // 业务类型
|
||||
const (
|
||||
BusinessTypeExpense BusinessType = "expense" // 报销
|
||||
BusinessTypeRequest BusinessType = "request" // 报销
|
||||
)
|
||||
|
||||
var BusinessTypeName = map[BusinessType]string{
|
||||
BusinessTypeExpense: "报销",
|
||||
BusinessTypeExpense: "报销单",
|
||||
BusinessTypeRequest: "申请单",
|
||||
}
|
||||
|
||||
type AuditStatus = int64 // 审核状态
|
||||
|
||||
@@ -38,6 +38,7 @@ type ExpenseSearch struct {
|
||||
Ik3cloudStatuses []int64 // 金蝶推送状态
|
||||
Ik3cloudAtStart *time.Time // 金蝶推送开始时间
|
||||
Ik3cloudAtEnd *time.Time // 金蝶推送结束时间
|
||||
TransferStatuses []int64 // 打款状态
|
||||
}
|
||||
type ReplyExpenseList struct {
|
||||
List []ExpenseItem `json:"list"`
|
||||
@@ -156,6 +157,10 @@ type ReplyExpenseInfo struct {
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
TransferId int64 `json:"transferId"`
|
||||
TransferStatus int64 `json:"transferStatus"`
|
||||
TransferAt *time.Time `json:"transferAt"`
|
||||
TransferErrMsg string `json:"transferErrMsg"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ type RequestSearch struct {
|
||||
Ik3cloudStatuses []int64 // 金蝶推送状态
|
||||
Ik3cloudAtStart *time.Time // 金蝶推送开始时间
|
||||
Ik3cloudAtEnd *time.Time // 金蝶推送结束时间
|
||||
TransferStatuses []int64 // 打款状态
|
||||
}
|
||||
type ReplyRequestList struct {
|
||||
List []RequestItem `json:"list"`
|
||||
@@ -91,6 +92,10 @@ type RequestItem struct {
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
TransferId int64 `json:"transferId"`
|
||||
TransferStatus int64 `json:"transferStatus"`
|
||||
TransferAt *time.Time `json:"transferAt"`
|
||||
TransferErrMsg string `json:"transferErrMsg"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
@@ -199,6 +204,10 @@ type ReplyRequestInfo struct {
|
||||
Ik3cloudStatus int64 `json:"ik3CloudStatus"`
|
||||
Ik3cloudErrMsg string `json:"ik3CloudErrMsg"`
|
||||
Ik3cloudUpdatedAt *time.Time `json:"ik3CloudUpdatedAt"`
|
||||
TransferId int64 `json:"transferId"`
|
||||
TransferStatus int64 `json:"transferStatus"`
|
||||
TransferAt *time.Time `json:"transferAt"`
|
||||
TransferErrMsg string `json:"transferErrMsg"`
|
||||
CreatedAt *time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package request
|
||||
|
||||
type Request struct {
|
||||
Cost cost
|
||||
Audit audit
|
||||
Prepaid prepaid
|
||||
Cost cost
|
||||
Audit audit
|
||||
Prepaid prepaid
|
||||
Transfer transfer
|
||||
}
|
||||
|
||||
26
erp/request/transfer.go
Normal file
26
erp/request/transfer.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type transfer struct {
|
||||
}
|
||||
type ArgsTransferSubmit struct {
|
||||
StaffId int64 // 操作人
|
||||
RequestId int64 // 申请单id
|
||||
TransferType string // 打款类型
|
||||
}
|
||||
|
||||
// Submit @TITLE 提交打款
|
||||
func (t *transfer) Submit(ctx context.Context, args ArgsTransferSubmit) (err error) {
|
||||
xClient, err := client.GetClient(t)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||
return
|
||||
}
|
||||
@@ -90,6 +90,7 @@ type ShipmentAdd struct {
|
||||
PaymentCycle *int64 // 付款周期
|
||||
PaymentTerms string // 条款
|
||||
CommissionRate *decimal.Decimal // 佣金比例
|
||||
DueRecDate *time.Time // 预计收汇日期日期
|
||||
TradeCountry string // 贸易国别
|
||||
RecBank string // 收汇银行
|
||||
RecBankEng string // 收汇银行英文
|
||||
|
||||
Reference in New Issue
Block a user