feat(erp): 添加付款单审核功能
- 新增 BusinessTypePayment 类型用于付款单审核 - 添加 payment 包结构体定义 - 扩展 PaymentSearch 结构体支持 PaymentIds 查询字段 - 在 Payment 结构体中增加 prepaidAmount 和 paidAmount 字段 - 新增 receipt 和 request 查询参数中的发票号字段 - 添加付款单审核提交接口实现
This commit is contained in:
@@ -14,6 +14,7 @@ const (
|
||||
BusinessTypeAccountingAuditV2 BusinessType = "accountingAuditV2" // 做账合同审核
|
||||
BusinessTypeExpense BusinessType = "expenseAudit" // 报销单
|
||||
BusinessTypeRequest BusinessType = "requestAudit" // 申请单
|
||||
BusinessTypePayment BusinessType = "paymentAudit" // 申请单
|
||||
)
|
||||
|
||||
var BusinessTypeName = map[BusinessType]string{
|
||||
@@ -28,6 +29,7 @@ var BusinessTypeName = map[BusinessType]string{
|
||||
BusinessTypeAccountingAuditV2: "做账合同审核",
|
||||
BusinessTypeExpense: "报销单审核",
|
||||
BusinessTypeRequest: "申请单审核",
|
||||
BusinessTypePayment: "付款单审核",
|
||||
}
|
||||
|
||||
type AuditStatus = int64 // 审核状态
|
||||
|
||||
@@ -5,17 +5,20 @@ import (
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
payment2 "git.kumo.work/shama/service/erp/payment"
|
||||
"git.kumo.work/shama/service/lib/bean"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type payment struct {
|
||||
payment2.Payment
|
||||
}
|
||||
type ArgsPaymentList struct {
|
||||
Page bean.Page
|
||||
Search PaymentSearch
|
||||
}
|
||||
type PaymentSearch struct {
|
||||
PaymentIds []int64 // 付款单id
|
||||
PaymentSerial string // 付款单号
|
||||
AccountingSerial string // 做账合同号
|
||||
CreatedAtStart *time.Time
|
||||
@@ -35,7 +38,9 @@ type PaymentItem struct {
|
||||
PayableSerial string `json:"payableSerial"`
|
||||
InvoiceSerial string `json:"invoiceSerial"`
|
||||
FactoryName string `json:"factoryName"`
|
||||
PrepaidAmount decimal.Decimal `json:"prepaidAmount"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
PaidAmount decimal.Decimal `json:"paidAmount"`
|
||||
Currency string `json:"currency"`
|
||||
CurrencyName string `json:"currencyName"`
|
||||
CurrencySymbol string `json:"currencySymbol"`
|
||||
|
||||
26
erp/payment/audit.go
Normal file
26
erp/payment/audit.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package payment
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
)
|
||||
|
||||
type audit struct {
|
||||
}
|
||||
type ArgsAuditSubmit struct {
|
||||
StaffId int64 // 操作人
|
||||
PaymentId int64 // 付款单
|
||||
AuditStaffIds []int64 // 审核人
|
||||
}
|
||||
|
||||
// Submit @TITLE 提交审核
|
||||
func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) {
|
||||
xClient, err := client.GetClient(a)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
err = xClient.Call(ctx, "Submit", args, &reply)
|
||||
return
|
||||
}
|
||||
5
erp/payment/payment.go
Normal file
5
erp/payment/payment.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package payment
|
||||
|
||||
type Payment struct {
|
||||
Audit audit
|
||||
}
|
||||
@@ -28,6 +28,7 @@ type ReceiptSearch struct {
|
||||
ReceiptDateEnd *time.Time // 创建结束时间
|
||||
BanFlag int64 // 禁用标记 1=禁用 2=启用
|
||||
ClaimStatus int64 // 认领状态 1=待认领 2=部分认领 3=已认领
|
||||
InvoiceSerialEq string // 发票号
|
||||
}
|
||||
type ReplyReceiptList struct {
|
||||
List []ReceiptItem `json:"list"`
|
||||
|
||||
@@ -19,6 +19,7 @@ type ArgsRequestList struct {
|
||||
}
|
||||
type RequestSearch struct {
|
||||
RequestSerial string // 报销单号
|
||||
InvoiceSerial string // 发票号
|
||||
CreatedAtStart *time.Time // 创建开始时间
|
||||
CreatedAtEnd *time.Time // 创建结束时间
|
||||
RequestIds []int64 // 申请单id
|
||||
|
||||
Reference in New Issue
Block a user