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

finance
黄伟 2 years ago
commit 4e7187e37b

@ -41,6 +41,7 @@ type AfsItem struct {
CreatedAt int64 `json:"createdAt"` CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"` UpdatedAt int64 `json:"updatedAt"`
ReturnAddress []ReturnAddressItem `json:"returnAddress"` ReturnAddress []ReturnAddressItem `json:"returnAddress"`
Notes string `json:"notes"`
} }
// Lists @Title 售后列表 // Lists @Title 售后列表
@ -54,31 +55,33 @@ func (a *afs) Lists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists
} }
type ReplyAfsDetail struct { type ReplyAfsDetail struct {
Id uint `json:"id"` Id uint `json:"id"`
AuditId uint `json:"auditId"` AuditId uint `json:"auditId"` // 审核Id
AfsSn string `json:"afsSn"` AfsSn string `json:"afsSn"` // 售后单号
Status uint `json:"status"` Status uint `json:"status"` // 售后状态
AuditStatus uint `json:"auditStatus"` AuditStatus uint `json:"auditStatus"` // 主管审核状态
ApproveNotes string `json:"approveNotes"` ApproveNotes string `json:"approveNotes"` // 备注
Result string `json:"result"` Result string `json:"result"` // 处理结果
CreatedAt int64 `json:"createdAt"` CreatedAt int64 `json:"createdAt"` // 创建时间
UpdatedAt int64 `json:"updatedAt"` UpdatedAt int64 `json:"updatedAt"` // 更新时间
SkuName string `json:"skuName"` SkuName string `json:"skuName"` // 商品名称
ImgUrl string `json:"imgUrl"` ImgUrl string `json:"imgUrl"` // 商品图片
SkuId uint `json:"skuId"` SkuId uint `json:"skuId"` // 商品Id
Price decimal.Decimal `json:"price"` Price decimal.Decimal `json:"price"` // 商品单价
Quantity uint `json:"quantity"` Quantity uint `json:"quantity"` // 数量
HopeTypeName string `json:"hopeTypeName"` HopeTypeName string `json:"hopeTypeName"` // 期望售后类型
TypeReasonName string `json:"typeReasonName"` TypeReasonName string `json:"typeReasonName"` // 售后原因
Imgs []string `json:"imgs"` Imgs []string `json:"imgs"` // 售后图片
LogisticsCompany string `json:"logisticsCompany"` RefundFee decimal.Decimal `json:"refundFee"` // 退款金额
WaybillCode string `json:"waybillCode"` PackageSend uint `json:"packageSend"` // 发货状态
SendAt int64 `json:"sendAt"` AfsPackageSend AfsPackageSend `json:"afsPackageSend"` // 售后物流信息
NewOrderSn string `json:"newOrderSn"` SourceName string `json:"sourceName"` // 所属供应商
RefundFee decimal.Decimal `json:"refundFee"` OrderSubSn string `json:"orderSubSn"` // 沙马订单号
PackageSend uint `json:"packageSend"` NewOrderSubSn string `json:"newOrderSubSn"` // 新订单号
AfsPackageSend AfsPackageSend `json:"afsPackageSend"` SupplyOrderSubSn string `json:"supplyOrderSubSn"` // 供应链订单号
ReturnAddress ReturnAddressItem `json:"returnAddress"` NewSupplyOrderSn string `json:"newSupplyOrderSn"` // 供应链新订单号
Address string `json:"address"` // 售后退货地址
ReturnAddress []ReturnAddressItem `json:"returnAddress"` // 退货地址列表
} }
type AfsPackageSend struct { type AfsPackageSend struct {
@ -87,6 +90,7 @@ type AfsPackageSend struct {
LogisticsCompany string `json:"logisticsCompany"` LogisticsCompany string `json:"logisticsCompany"`
WaybillCode string `json:"waybillCode"` WaybillCode string `json:"waybillCode"`
SendGoodsDate int64 `json:"sendGoodsDate"` SendGoodsDate int64 `json:"sendGoodsDate"`
Address string `json:"address"`
} }
// Detail @Title 售后详情 // Detail @Title 售后详情
@ -142,6 +146,17 @@ func (a *afs) Reject(ctx context.Context, args ArgsAfsReject) (err error) {
return 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 { type ArgsAfsDeliver struct {
AfsSn string `json:"afsSn"` AfsSn string `json:"afsSn"`
ReturnAddressId uint `json:"returnAddressId"` ReturnAddressId uint `json:"returnAddressId"`

@ -124,7 +124,6 @@ func (a *afsAudit) Info(ctx context.Context, afsAuditId uint) (reply ReplyAfsDet
if err != nil { if err != nil {
return return
} }
args := 0 err = xClient.Call(ctx, "Info", afsAuditId, &reply)
err = xClient.Call(ctx, "Info", args, &reply)
return return
} }

@ -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 Afs afs
AfsAudit afsAudit AfsAudit afsAudit
BatchGoods batch.Goods BatchGoods batch.Goods
Enterprise enterprise
} }
type supplier struct { type supplier struct {
@ -132,6 +133,16 @@ func (s *supplier) InfoByBatchOrderSn(ctx context.Context, batchOrderSn string)
return 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 { type ArgsSupplierEdit struct {
SupplierId uint SupplierId uint
SupplierName string // 供应商名称 SupplierName string // 供应商名称

@ -207,40 +207,46 @@ func (a *afterService) NewOrder(ctx context.Context, args ArgsAfterServiceNewOrd
} }
type ReplyAfterServiceDetail struct { type ReplyAfterServiceDetail struct {
Id uint `json:"id"` Id uint `json:"id"`
AfsSn string `json:"afsSn"` AfsSn string `json:"afsSn"` // 售后单号
Status uint `json:"status"` Status uint `json:"status"` // 状态
ApproveNotes string `json:"approveNotes"` ApproveNotes string `json:"approveNotes"` // 备注
Result string `json:"result"` Result string `json:"result"` // 处理结果
CreatedAt int64 `json:"createdAt"` CreatedAt int64 `json:"createdAt"` // 创建时间
UpdatedAt int64 `json:"updatedAt"` UpdatedAt int64 `json:"updatedAt"` // 更新时间
SkuName string `json:"skuName"` SkuName string `json:"skuName"` // 商品名称
ImgUrl string `json:"imgUrl"` ImgUrl string `json:"imgUrl"` // 商品图片
SkuId uint `json:"skuId"` SkuId uint `json:"skuId"` // skuId
SupplySkuId uint `json:"supplySkuId"` SupplySkuId uint `json:"supplySkuId"` // 供应商skuId
Price decimal.Decimal `json:"price"` Price decimal.Decimal `json:"price"` // 采购单价
SupplyPrice decimal.Decimal `json:"supplyPrice"` SupplyPrice decimal.Decimal `json:"supplyPrice"` // 供货价
Quantity uint `json:"quantity"` Quantity uint `json:"quantity"` // 数量
HopeTypeName string `json:"hopeTypeName"` HopeTypeName string `json:"hopeTypeName"` // 期望售后类型
TypeReasonName string `json:"typeReasonName"` TypeReasonName string `json:"typeReasonName"` // 售后原因
Imgs []string `json:"imgs"` Imgs []string `json:"imgs"` // 售后图片
LogisticsCompany string `json:"logisticsCompany"` PackageSend uint `json:"packageSend"` // 发货状态
WaybillCode string `json:"waybillCode"` AfsPackageSend AfsPackageSend `json:"afsPackageSend"` // 售后信息
SendAt int64 `json:"sendAt"` OrderSubSn uint64 `json:"orderSubSn"` // 订单号
PackageSend uint `json:"packageSend"` SourceOrderSubSn string `json:"sourceOrderSubSn"` // 供应商的订单号
AfsPackageSend AfsPackageSend `json:"afsPackageSend"` SourceId uint `json:"sourceId"` // 供应商id
OrderSubSn uint64 `json:"orderSubSn"` ChannelId uint `json:"channelId"` // 客户id
SourceId uint `json:"sourceId"` NewOrderSubSn string `json:"newOrderSubSn"` // 新订单信息
ChannelId uint `json:"channelId"` NewSourceOrderSubSn string `json:"newSourceOrderSubSn"` // 新供应商订单信息
ReceiverName string `json:"receiverName"` // 收件人名称
ReceiverPhone string `json:"receiverPhone"` // 收件手机号
ReceiverAddress string `json:"receiverAddress"` // 收件人地址
StockOutAt int64 `json:"stockOutAt"` // 订单发货时间
RefundFee decimal.Decimal `json:"refundFee"` // 沙马退款金额
SourceRefundFee decimal.Decimal `json:"sourceRefundFee"` // 供应商退款金额
} }
type AfsPackageSend struct { type AfsPackageSend struct {
Name string `json:"name"` Name string `json:"name"` // 售后收件人
Mobile string `json:"mobile"` Mobile string `json:"mobile"` /// 售后手机号
ZipCode string `json:"zipCode"` ZipCode string `json:"zipCode"`
Address string `json:"address"` Address string `json:"address"` // 售后地址
LogisticsCompany string `json:"logisticsCompany"` LogisticsCompany string `json:"logisticsCompany"` // 快递公司
WaybillCode string `json:"waybillCode"` WaybillCode string `json:"waybillCode"` // 运单号
SendGoodsDate int64 `json:"sendGoodsDate"` SendGoodsDate int64 `json:"sendGoodsDate"` // 发货时间
} }
// Detail @Title 售后详情 // Detail @Title 售后详情

@ -108,6 +108,16 @@ func (s *skuAudit) Adopt(ctx context.Context, args ArgsSkuAuditAdopt) error {
return xClient.Call(ctx, "Adopt", args, &reply) return xClient.Call(ctx, "Adopt", args, &reply)
} }
// AdoptAll @Title 全部审核通过
func (s *skuAudit) AdoptAll(ctx context.Context, auditUserId uint) error {
reply := 0
xClient, err := client.GetClient(s)
if err != nil {
return err
}
return xClient.Call(ctx, "AdoptAll", auditUserId, &reply)
}
type ArgsSkuAuditReject struct { type ArgsSkuAuditReject struct {
AuditUserId uint // 审核人 AuditUserId uint // 审核人
AuditIds []uint // 审核单id AuditIds []uint // 审核单id

Loading…
Cancel
Save