You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
service/supplier/supplierApply.go

121 lines
2.9 KiB

package supplier
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
)
type supplierApply struct {
}
type ArgsSupplierApplyLists struct {
Search SupplierApplySearch
Page bean.Page
}
type SupplierApplySearch struct {
SupplierName string
AuditStatus uint
ApplyUserId uint
}
type ReplySupplierApplyLists struct {
Lists []SupplierApplyItem
Total int64
}
type SupplierApplyItem struct {
ApplyId uint
SupplierName string // 供应商名称
ApplyUserId uint // 申请人
AuditStatus uint // 审核状态
AuditUserId uint // 审核人
AuditTime int64 // 审核时间
CreatedAt int64 // 申请时间
}
// Lists @Title 审核列表
func (s *supplierApply) Lists(ctx context.Context, args ArgsSupplierApplyLists) (reply ReplySupplierApplyLists, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return ReplySupplierApplyLists{}, err
}
err = xClient.Call(ctx, "Lists", args, &reply)
return
}
2 years ago
type ReplySupplierApplyInfo struct {
AuditStatus uint
SupplierName string // 供应商名称
Account string // 账户
Liaison string // 联系人
Phone string // 手机号
Annex string // 附件
Reason string // 驳回原因
AuditUserId uint // 审核人id
AuditTime int64 // 审核时间
2 years ago
}
// Info @Title 审核详情
func (s *supplierApply) Info(ctx context.Context, applyId uint) (reply ReplySupplierApplyInfo, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return ReplySupplierApplyInfo{}, err
}
err = xClient.Call(ctx, "Info", applyId, &reply)
return
}
type ArgsSupplierApplyAdopt struct {
ApplyId uint
AuditUserId uint // 审核人Id
}
// Adopt @Title 审核通过
func (s *supplierApply) Adopt(ctx context.Context, args ArgsSupplierApplyAdopt) error {
xClient, err := client.GetClient(s)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Adopt", args, &reply)
}
type ArgsSupplierApplyReject struct {
ApplyId uint
AuditUserId uint // 审核人Id
Reason string // 驳回原因
}
// Reject @Title 审核驳回
func (s *supplierApply) Reject(ctx context.Context, args ArgsSupplierApplyReject) error {
xClient, err := client.GetClient(s)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Reject", args, &reply)
}
type ArgsSupplierApplyReAudit struct {
ApplyId uint
SupplierName string // 供应商名称
Account string // 账户
Password string // 密码
Liaison string // 联系人
Phone string // 手机号
2 years ago
PayType uint // 结算类型
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)
}