From d31e9582109c8506a8c4bed192b772ff21ba780a Mon Sep 17 00:00:00 2001 From: kanade <kanade@kumo.work> Date: Thu, 8 Aug 2024 14:53:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp/purchase.go | 2 +- erp/workflow.go | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/erp/purchase.go b/erp/purchase.go index 0239aca..e4f7fe2 100644 --- a/erp/purchase.go +++ b/erp/purchase.go @@ -124,7 +124,7 @@ func (p *purchase) Info(ctx context.Context, purchaseId int64) (reply ReplyPurch type ArgsPurchaseEdit struct { PurchaseId int64 // 采购合同id - Po string // po + PoSerial string // PoSerial OrderDate *time.Time // 下单日期 FactoryAddress string // 工厂地址 FactoryContact string // 工厂联系人 diff --git a/erp/workflow.go b/erp/workflow.go index c300245..a7e4aa5 100644 --- a/erp/workflow.go +++ b/erp/workflow.go @@ -82,3 +82,36 @@ func (w *workflow) Info(ctx context.Context, args ArgsWorkflowInfo) (reply Reply err = xClient.Call(ctx, "Info", args, &reply) return } + +type ArgsWorkflowAdopt struct { + StaffId int64 // 审核人 + WorkflowId int64 // 工作流 +} + +// Adopt @TITLE 审核通过 +func (w *workflow) Adopt(ctx context.Context, args ArgsWorkflowAdopt) (err error) { + xClient, err := client.GetClient(w) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Adopt", args, &reply) + return +} + +type ArgsWorkflowReject struct { + StaffId int64 // 审核人 + WorkflowId int64 // 工作流 + Reason string // 审核结果 +} + +// Reject @TITLE 审核驳回 +func (w *workflow) Reject(ctx context.Context, args ArgsWorkflowReject) (err error) { + xClient, err := client.GetClient(w) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Reject", args, &reply) + return +}