From 8ade6e1f4cc26ec2ee0804d4d9286a2b2719df29 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 1 Sep 2022 15:46:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 15 ++++++++------- supplier/supplierApply.go | 33 ++++++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/supplier/supplier.go b/supplier/supplier.go index 75e2de4..a47e938 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -53,13 +53,14 @@ type ReplySupplierLists struct { } type SupplierItem struct { - Id uint - SupplierName string // 供应商名称 - Status uint // 状态 - Prepayment decimal.Decimal // 预付款余额 - WarnStatus uint // 预警状态 - ApplyUserId uint // 创建人 - CreatedAt int64 // 创建时间 + Id uint + SupplierName string // 供应商名称 + Status uint // 状态 + Prepayment decimal.Decimal // 预付款余额 + WarnStatus uint // 预警状态 + ApplyUserId uint // 创建人Id + ApplyUserName string // 创建人名称 + CreatedAt int64 // 创建时间 } // Lists @Title 供应商列表 diff --git a/supplier/supplierApply.go b/supplier/supplierApply.go index 34e0242..29fa733 100644 --- a/supplier/supplierApply.go +++ b/supplier/supplierApply.go @@ -47,11 +47,14 @@ func (s *supplierApply) Lists(ctx context.Context, args ArgsSupplierApplyLists) type ReplySupplierApplyInfo struct { AuditStatus uint - SupplierName string - Account string - Liaison string - Phone string - Annex string + SupplierName string // 供应商名称 + Account string // 账户 + Liaison string // 联系人 + Phone string // 手机号 + Annex string // 附件 + Reason string // 驳回原因 + AuditUserId uint // 审核人id + AuditTime int64 // 审核时间 } // Info @Title 审核详情 @@ -94,3 +97,23 @@ func (s *supplierApply) Reject(ctx context.Context, args ArgsSupplierApplyReject reply := 0 return xClient.Call(ctx, "Reject", args, &reply) } + +type ArgsSupplierApplyReAudit struct { + ApplyId uint + SupplierName string // 供应商名称 + Account string // 账户 + Password string // 密码 + Liaison string // 联系人 + Phone string // 手机号 + Annex string // 附件 +} + +// ReAudit @Title 重新审核 +func (s *supplierApply) ReAudit(ctx context.Context, args ArgsSupplierApplyReAudit) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "ReAudit", args, &reply) +} From 24de88ef74476a0b9e64df67ae9e2b33c5ce2059 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 1 Sep 2022 16:24:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/goods.go | 21 +++++++++++---------- supplier/supplier.go | 15 +++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/supplier/goods.go b/supplier/goods.go index 5bf7b07..d299c9f 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -73,16 +73,17 @@ type ArgsGoodsInfo struct { } type ReplyGoodsInfo struct { - Id uint `json:"id"` - Name string `json:"name"` - SupplierId uint `json:"supplierId"` - CategoryId uint `json:"categoryId"` - BrandId uint `json:"brandId"` - Imgs []string `json:"imgs"` - Content string `json:"content"` - Attributes []GoodsAttributeItem `json:"attributes"` - Skus []SkuItem `json:"skus"` - Status uint `json:"status"` + Id uint `json:"id"` + Name string `json:"name"` + SupplierId uint `json:"supplierId"` + SupplierName string `json:"supplierName"` + CategoryId uint `json:"categoryId"` + BrandId uint `json:"brandId"` + Imgs []string `json:"imgs"` + Content string `json:"content"` + Attributes []GoodsAttributeItem `json:"attributes"` + Skus []SkuItem `json:"skus"` + Status uint `json:"status"` } type GoodsAttributeItem struct { diff --git a/supplier/supplier.go b/supplier/supplier.go index a47e938..f98d469 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -53,14 +53,13 @@ type ReplySupplierLists struct { } type SupplierItem struct { - Id uint - SupplierName string // 供应商名称 - Status uint // 状态 - Prepayment decimal.Decimal // 预付款余额 - WarnStatus uint // 预警状态 - ApplyUserId uint // 创建人Id - ApplyUserName string // 创建人名称 - CreatedAt int64 // 创建时间 + Id uint + SupplierName string // 供应商名称 + Status uint // 状态 + Prepayment decimal.Decimal // 预付款余额 + WarnStatus uint // 预警状态 + ApplyUserId uint // 创建人Id + CreatedAt int64 // 创建时间 } // Lists @Title 供应商列表 From 4b5e5fb0e331225c4cc39c7fcae656a30b2c5fee Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 1 Sep 2022 16:40:17 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=AF=E7=94=A8/?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E4=BE=9B=E5=BA=94=E5=95=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/supplier/supplier.go b/supplier/supplier.go index f98d469..3898ff8 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -71,3 +71,23 @@ func (s *supplier) Lists(ctx context.Context, args ArgsSupplierLists) (reply Rep err = xClient.Call(ctx, "Lists", args, &reply) return } + +// Enabled @Title 启用供应商 +func (s *supplier) Enabled(ctx context.Context, supplierId uint) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Enabled", supplierId, &reply) +} + +// Disabled @Title 启用供应商 +func (s *supplier) Disabled(ctx context.Context, supplierId uint) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Disabled", supplierId, &reply) +} From 5874450cf7abb5c1d15634f06726dc8001aeb00d Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 1 Sep 2022 17:39:02 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/supplier/supplier.go b/supplier/supplier.go index 3898ff8..0a7bd0d 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -91,3 +91,43 @@ func (s *supplier) Disabled(ctx context.Context, supplierId uint) error { reply := 0 return xClient.Call(ctx, "Disabled", supplierId, &reply) } + +type ReplySupplierInfo struct { + SupplierId uint + SupplierName string // 供应商名称 + Account string // 账户名 + PayType uint // 结算方式 + Liaison string // 联系人 + Phone string // 手机号 + Annex string // 附件 +} + +// Info @Title 供应商详情 +func (s *supplier) Info(ctx context.Context, supplierId uint) (reply ReplySupplierInfo, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return ReplySupplierInfo{}, err + } + err = xClient.Call(ctx, "Info", supplierId, &reply) + return +} + +type ArgsSupplierEdit struct { + SupplierId uint + SupplierName string // 供应商名称 + Password string // 密码 + PayType uint // 结算方式 + Liaison string // 联系然 + Phone string // 手机号 + Annex string // 附件 +} + +// Edit @Title 供应商详情 +func (s *supplier) Edit(ctx context.Context, args ArgsSupplierEdit) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Edit", args, &reply) +}