|
|
@ -91,3 +91,43 @@ func (s *supplier) Disabled(ctx context.Context, supplierId uint) error {
|
|
|
|
reply := 0
|
|
|
|
reply := 0
|
|
|
|
return xClient.Call(ctx, "Disabled", supplierId, &reply)
|
|
|
|
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)
|
|
|
|
|
|
|
|
}
|
|
|
|