diff --git a/erp/constant.go b/erp/constant.go index cac9c74..508f490 100644 --- a/erp/constant.go +++ b/erp/constant.go @@ -5,6 +5,7 @@ const ( BusinessTypeSaleAudit BusinessType = "saleAudit" // 销售合同审核 BusinessTypeSaleAuditClose BusinessType = "saleAuditClose" // 销售合同关单审核 BusinessTypeSaleAppendAudit BusinessType = "saleAuditAppend" // 销售合同追加商品 + BusinessTypeSaleChangeAudit BusinessType = "saleAuditChange" // 销售合同修改产品 BusinessTypePurchaseAudit BusinessType = "purchaseAudit" // 采购合同审核 BusinessTypeShipmentAudit BusinessType = "shipmentAudit" // 订舱单审核 BusinessTypeShipmentModifyAudit BusinessType = "shipmentModifyAudit" // 订舱单修改单审核 @@ -15,6 +16,7 @@ var BusinessTypeName = map[BusinessType]string{ BusinessTypeSaleAudit: "销售合同审核", BusinessTypeSaleAuditClose: "销售合同关单审核", BusinessTypeSaleAppendAudit: "销售合同追加商品审核", + BusinessTypeSaleChangeAudit: "销售合同编辑产品审核", BusinessTypePurchaseAudit: "采购合同审核", BusinessTypeShipmentAudit: "订舱单审核", BusinessTypeShipmentModifyAudit: "订舱修改单审核", diff --git a/erp/sale/audit.go b/erp/sale/audit.go index 06698af..5fb5523 100644 --- a/erp/sale/audit.go +++ b/erp/sale/audit.go @@ -45,3 +45,25 @@ func (a *audit) Append(ctx context.Context, args ArgsAuditSubmit) (err error) { err = xClient.Call(ctx, "Append", args, &reply) return } + +type ArgsAuditChange struct { + StaffId int64 // 操作人 + SaleId int64 // 销售合同id + AuditStaffIds []int64 // 审核人 + Products []ChangeProductItem // 产品信息 +} +type ChangeProductItem struct { + Id int64 // 产品id + SaleCount int64 // 销售数量 +} + +// Change @TITLE 编辑商品审核 +func (a *audit) Change(ctx context.Context, args ArgsAuditChange) (err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "Change", args, &reply) + return +}