问题修复

This commit is contained in:
2024-10-23 15:16:45 +08:00
parent 2c56d5dbe6
commit 857852c2e3
2 changed files with 74 additions and 0 deletions

View File

@@ -177,3 +177,40 @@ func (p *purchase) Cancel(ctx context.Context, purchaseId int64) (err error) {
err = xClient.Call(ctx, "Cancel", purchaseId, &reply)
return
}
type ArgsPurchaseHistory struct {
Page bean.Page
Search PurchaseHistorySearch
}
type PurchaseHistorySearch struct {
ProductId int64 // 产品id
}
type ReplyPurchaseHistory struct {
List []PurchaseHistoryItem `json:"list"`
Total int64 `json:"total"`
}
type PurchaseHistoryItem struct {
PurchaseId int64 `json:"purchaseId"`
PiSerial string `json:"piSerial"`
OrderDate time.Time `json:"orderDate"`
FactorySerial string `json:"factorySerial"`
FactoryName string `json:"factoryName"`
PurchasePrice decimal.Decimal `json:"purchasePrice"`
PurchaseCount int64 `json:"purchaseCount"`
PurchaseAmount decimal.Decimal `json:"purchaseAmount"`
PurchaseCurrency string `json:"purchaseCurrency"`
PurchaseCurrencyName string `json:"purchaseCurrencyName"`
PurchaseCurrencySymbol string `json:"purchaseCurrencySymbol"`
PurchaseCurrencyRate decimal.Decimal `json:"purchaseCurrencyRate"`
CreatedStaffId int64 `json:"createdStaffId"`
}
// History @TITLE 历史记录
func (p *purchase) History(ctx context.Context, args ArgsPurchaseHistory) (reply ReplyPurchaseHistory, err error) {
xClient, err := client.GetClient(p)
if err != nil {
return
}
err = xClient.Call(ctx, "History", args, &reply)
return
}