diff --git a/erp/constant.go b/erp/constant.go index d1dd977..cae43fd 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -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 // 审核状态 diff --git a/erp/payment.go b/erp/payment.go index 640b552..2741e29 100644 --- a/erp/payment.go +++ b/erp/payment.go @@ -5,19 +5,22 @@ 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 { - PaymentSerial string // 付款单号 - AccountingSerial string // 做账合同号 + PaymentIds []int64 // 付款单id + PaymentSerial string // 付款单号 + AccountingSerial string // 做账合同号 CreatedAtStart *time.Time CreatedAtEnd *time.Time PurchaseStaffIds []int64 // 采购人员 @@ -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"` diff --git a/erp/payment/audit.go b/erp/payment/audit.go new file mode 100644 index 0000000..92b9bc6 --- /dev/null +++ b/erp/payment/audit.go @@ -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 +} diff --git a/erp/payment/payment.go b/erp/payment/payment.go new file mode 100644 index 0000000..7d086fc --- /dev/null +++ b/erp/payment/payment.go @@ -0,0 +1,5 @@ +package payment + +type Payment struct { + Audit audit +} diff --git a/erp/receipt.go b/erp/receipt.go index 965aa6c..b25cae6 100644 --- a/erp/receipt.go +++ b/erp/receipt.go @@ -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"` diff --git a/erp/request.go b/erp/request.go index 00746e3..4cf0f23 100644 --- a/erp/request.go +++ b/erp/request.go @@ -19,6 +19,7 @@ type ArgsRequestList struct { } type RequestSearch struct { RequestSerial string // 报销单号 + InvoiceSerial string // 发票号 CreatedAtStart *time.Time // 创建开始时间 CreatedAtEnd *time.Time // 创建结束时间 RequestIds []int64 // 申请单id