Merge branch 'master' of git.oa00.com:supply-chain/service

finance
黄伟 2 years ago
commit e451122019

@ -180,3 +180,49 @@ func (a *audit) GetProof(ctx context.Context, userServiceId uint) (reply ReplyPr
err = xClient.Call(ctx, "GetProof", userServiceId, &reply)
return
}
type ArgsRateChange struct {
UserServiceId uint // 客户服务id
ChangeUserId uint // 修改人id
NewRateId uint // 新费率id
}
// Change @Title 修改费率
func (a *audit) Change(ctx context.Context, args ArgsRateChange) (err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
reply := 0
err = xClient.Call(ctx, "Change", args, &reply)
return
}
type ArgsRateChangeHistory struct {
UserId uint
Page bean.Page
}
type ReplyRateChangeHistory struct {
Lists []RateChangeHistoryItem `json:"lists"`
Total int64 `json:"total"`
}
type RateChangeHistoryItem struct {
Id uint `json:"id"`
UserId uint `json:"userId"` // 用户id
ChangeUserId uint `json:"changeUserId"` // 修改人
ServiceId uint `json:"serviceId"` // 服务id
OldRateId uint `json:"oldRateId"` // 老费率
NewRateId uint `json:"newRateId"` // 新费率
}
// RateChangeHistory @Title 服务修改记录
func (a *audit) RateChangeHistory(ctx context.Context, args ArgsRateChangeHistory) (reply ReplyRateChangeHistory, err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
err = xClient.Call(ctx, "RateChangeHistory", args, &reply)
return
}

@ -41,6 +41,7 @@ type AfsItem struct {
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
ReturnAddress []ReturnAddressItem `json:"returnAddress"`
Notes string `json:"notes"`
}
// Lists @Title 售后列表
@ -80,6 +81,7 @@ type ReplyAfsDetail struct {
SupplyOrderSubSn string `json:"supplyOrderSubSn"` // 供应链订单号
NewSupplyOrderSn string `json:"newSupplyOrderSn"` // 供应链新订单号
Address string `json:"address"` // 售后退货地址
ReturnAddress []ReturnAddressItem `json:"returnAddress"` // 退货地址列表
}
type AfsPackageSend struct {
@ -144,6 +146,17 @@ func (a *afs) Reject(ctx context.Context, args ArgsAfsReject) (err error) {
return
}
// ForcedClose @Title 强制关单
func (a *afs) ForcedClose(ctx context.Context, args ArgsAfsReject) (err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
reply := 0
err = xClient.Call(ctx, "ForcedClose", args, &reply)
return
}
type ArgsAfsDeliver struct {
AfsSn string `json:"afsSn"`
ReturnAddressId uint `json:"returnAddressId"`

@ -0,0 +1,117 @@
package supplier
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
)
const (
EnterpriseAuditStatusNone = 1 // 未审核
EnterpriseAuditStatusAdopt = 2 // 通过
EnterpriseAuditStatusReject = 3 // 驳回
)
type enterprise struct {
}
type ArgsEnterpriseLists struct {
Search EnterpriseSearch
Page bean.Page
}
type EnterpriseSearch struct {
Name string // 企业名称
AuditStatus uint // 审核状态 1=待审核 2=通过 3=驳回
}
type ReplyEnterpriseLists struct {
Lists []EnterpriseItem `json:"lists"`
Total int64 `json:"total"`
}
type EnterpriseItem struct {
Id uint `json:"id"`
Name string `json:"name"`
CreatedAt int64 `json:"createdAt"`
AuditStatus uint `json:"auditStatus"`
AuditUserId uint `json:"auditUserId"`
AuditAt int64 `json:"auditAt"`
}
// Lists @Title 审核列表
func (e *enterprise) Lists(ctx context.Context, args ArgsEnterpriseLists) (reply ReplyEnterpriseLists, err error) {
xClient, err := client.GetClient(e)
if err != nil {
return ReplyEnterpriseLists{}, err
}
err = xClient.Call(ctx, "Lists", args, &reply)
return
}
type ReplyEnterpriseInfo struct {
Id uint `json:"id"`
AuditStatus uint `json:"auditStatus"`
AuditUserId uint `json:"auditUserId"`
AuditAt int64 `json:"auditAt"`
Reason string `json:"reason"`
Name string `json:"name"`
CreditCode string `json:"creditCode"`
BusinessAddress string `json:"businessAddress"`
LegalPersonName string `json:"legalPersonName"`
PayTaxes uint `json:"payTaxes"`
TaxNumber string `json:"taxNumber"`
BankName string `json:"bankName"`
BankCode string `json:"bankCode"`
BankAddress string `json:"bankAddress"`
Phone string `json:"phone"`
CreatedAt int64 `json:"createdAt"`
BusinessLicense string `json:"businessLicense"`
IdPhotoFront string `json:"idPhotoFront"`
IdPhotoBack string `json:"idPhotoBack"`
AccountPhoto string `json:"accountPhoto"`
ContactName string `json:"contactName"`
ContactEmail string `json:"contactEmail"`
ContactPhone string `json:"contactPhone"`
Position string `json:"position"`
}
// Info @Title 审核详情
func (e *enterprise) Info(ctx context.Context, enterpriseId uint) (reply ReplyEnterpriseInfo, err error) {
xClient, err := client.GetClient(e)
if err != nil {
return ReplyEnterpriseInfo{}, err
}
err = xClient.Call(ctx, "Info", enterpriseId, &reply)
return
}
type ArgsEnterpriseAdopt struct {
AuditUserId uint // 审核人id
EnterpriseId uint // 企业id
Account string // 账号
Password string // 密码
PayType uint // 结算类型 1=预付款 2=月结
}
// Adopt @Title 审核通过
func (e *enterprise) Adopt(ctx context.Context, args ArgsEnterpriseAdopt) error {
xClient, err := client.GetClient(e)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Adopt", args, &reply)
}
type ArgsEnterpriseReject struct {
AuditUserId uint // 审核人id
EnterpriseId uint // 企业id
Reason string // 驳回原因
}
// Reject @Title 审核驳回
func (e *enterprise) Reject(ctx context.Context, args ArgsEnterpriseReject) error {
xClient, err := client.GetClient(e)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Reject", args, &reply)
}

@ -19,6 +19,7 @@ type Supplier struct {
Afs afs
AfsAudit afsAudit
BatchGoods batch.Goods
Enterprise enterprise
}
type supplier struct {
@ -132,6 +133,16 @@ func (s *supplier) InfoByBatchOrderSn(ctx context.Context, batchOrderSn string)
return
}
// InfoByRetailOrderSn @Title 通过零售订单获取供应商信息
func (s *supplier) InfoByRetailOrderSn(ctx context.Context, retailOrderSn string) (reply ReplySupplierInfo, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return ReplySupplierInfo{}, err
}
err = xClient.Call(ctx, "InfoByRetailOrderSn", retailOrderSn, &reply)
return
}
type ArgsSupplierEdit struct {
SupplierId uint
SupplierName string // 供应商名称

Loading…
Cancel
Save