diff --git a/erp/constant.go b/erp/constant.go index c8d9a85..5ebc063 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -4,6 +4,7 @@ type BusinessType = string // 业务类型 const ( BusinessTypeSaleAudit BusinessType = "saleAudit" // 销售合同审核 BusinessTypeSaleAuditClose BusinessType = "saleAuditClose" // 销售合同关单审核 + BusinessTypeSaleAppendAudit BusinessType = "saleAuditAppend" // 销售合同追加商品 BusinessTypePurchaseAudit BusinessType = "purchaseAudit" // 采购合同审核 BusinessTypeShipmentAudit BusinessType = "shipmentAudit" // 订舱单审核 BusinessTypeAccountingAudit BusinessType = "accountingAudit" // 做账合同审核 @@ -12,6 +13,7 @@ const ( var BusinessTypeName = map[BusinessType]string{ BusinessTypeSaleAudit: "销售合同审核", BusinessTypeSaleAuditClose: "销售合同关单审核", + BusinessTypeSaleAppendAudit: "销售合同追加商品审核", BusinessTypePurchaseAudit: "采购合同审核", BusinessTypeShipmentAudit: "订舱单审核", BusinessTypeAccountingAudit: "做账合同审核", diff --git a/erp/sale/append.go b/erp/sale/append.go new file mode 100644 index 0000000..c3bf460 --- /dev/null +++ b/erp/sale/append.go @@ -0,0 +1,94 @@ +package sale + +import ( + "context" + "git.kumo.work/shama/service/client" +) + +type append struct { +} + +// List @TITLE 产品列表 +func (a *append) List(ctx context.Context, args ArgsProductList) (reply ReplyProductList, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "List", args, &reply) + return +} + +type ArgsAppendAllSearch struct { + SaleId int64 // 销售合同id + WorkflowId int64 // 审核id +} + +// All @TITLE 获取产品 +func (a *append) All(ctx context.Context, args ArgsAppendAllSearch) (reply []ProductItem, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "All", args, &reply) + return +} + +// Add @TITLE 添加商品 +func (a *append) Add(ctx context.Context, args ArgsProductAdd) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Add", args, &reply) +} + +// Info @TITLE 产品详情 +func (a *append) Info(ctx context.Context, saleProductId int64) (reply ReplyProductInfo, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "Info", saleProductId, &reply) + return +} + +// Infos @TITLE 产品详情 +func (a *append) Infos(ctx context.Context, saleProductIds []int64) (reply []ReplyProductInfo, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "Infos", saleProductIds, &reply) + return +} + +// Edit @TITLE 编辑产品 +func (a *append) Edit(ctx context.Context, args ArgsProductEdit) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Edit", args, &reply) +} + +// MultiEdit @TITLE 批量编辑 +func (a *append) MultiEdit(ctx context.Context, args []MultiData) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "MultiEdit", args, &reply) +} + +// Delete @TITLE 删除产品 +func (a *append) Delete(ctx context.Context, saleProductIds []int64) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Delete", saleProductIds, &reply) +} diff --git a/erp/sale/audit.go b/erp/sale/audit.go index 55b0b98..06698af 100644 --- a/erp/sale/audit.go +++ b/erp/sale/audit.go @@ -34,3 +34,14 @@ func (a *audit) Cancel(ctx context.Context, args ArgsAuditSubmit) (err error) { err = xClient.Call(ctx, "Cancel", args, &reply) return } + +// Append @TITLE 追加商品审核 +func (a *audit) Append(ctx context.Context, args ArgsAuditSubmit) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Append", args, &reply) + return +} diff --git a/erp/sale/sale.go b/erp/sale/sale.go index e686a0a..f7fb925 100644 --- a/erp/sale/sale.go +++ b/erp/sale/sale.go @@ -5,4 +5,5 @@ type Sale struct { Product product Audit audit Benefit benefit + Append append } diff --git a/erp/workflow/node.go b/erp/workflow/node.go index cf6d33d..e4e356a 100644 --- a/erp/workflow/node.go +++ b/erp/workflow/node.go @@ -46,6 +46,8 @@ type ReplyNodeList struct { } type NodeItem struct { Id int64 `json:"id"` + WorkflowId int64 `json:"workflowId"` + ReviewStaffId int64 `json:"reviewStaffId"` BusinessId int64 `json:"businessId"` BusinessName string `json:"businessName"` BusinessType string `json:"businessType"`