|
|
|
@ -58,7 +58,7 @@ type SupplierItem struct {
|
|
|
|
|
Status uint // 状态
|
|
|
|
|
Prepayment decimal.Decimal // 预付款余额
|
|
|
|
|
WarnStatus uint // 预警状态
|
|
|
|
|
ApplyUserId uint // 创建人
|
|
|
|
|
ApplyUserId uint // 创建人Id
|
|
|
|
|
CreatedAt int64 // 创建时间
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -71,3 +71,63 @@ 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)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|