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 } type ReplySupplierApplyInfo struct { AuditStatus uint SupplierName string // 供应商名称 Account string // 账户 Liaison string // 联系人 Phone string // 手机号 Annex string // 附件 Reason string // 驳回原因 AuditUserId uint // 审核人id AuditTime int64 // 审核时间 } // 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 // 手机号 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) }