问题修复
This commit is contained in:
parent
2c56d5dbe6
commit
857852c2e3
@ -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
|
||||
}
|
||||
|
37
erp/sale.go
37
erp/sale.go
@ -278,3 +278,40 @@ func (s *sale) Clone(ctx context.Context, args ArgsSaleClone) (reply int64, err
|
||||
err = xClient.Call(ctx, "Clone", args, &reply)
|
||||
return
|
||||
}
|
||||
|
||||
type ArgsSaleHistory struct {
|
||||
Page bean.Page
|
||||
Search SaleHistorySearch
|
||||
}
|
||||
type SaleHistorySearch struct {
|
||||
ProductId int64 // 产品id
|
||||
}
|
||||
type ReplySaleHistory struct {
|
||||
List []SaleHistoryItem `json:"list"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type SaleHistoryItem struct {
|
||||
SaleId int64 `json:"saleId"`
|
||||
PiSerial string `json:"piSerial"`
|
||||
ContractDate time.Time `json:"contractDate"`
|
||||
CustomName string `json:"customName"`
|
||||
CustomShortName string `json:"customShortName"`
|
||||
SalePrice decimal.Decimal `json:"salePrice"`
|
||||
SaleCount int64 `json:"saleCount"`
|
||||
SaleAmount decimal.Decimal `json:"saleAmount"`
|
||||
SaleCurrency string `json:"saleCurrency"`
|
||||
SaleCurrencyName string `json:"saleCurrencyName"`
|
||||
SaleCurrencySymbol string `json:"saleCurrencySymbol"`
|
||||
SaleCurrencyRate decimal.Decimal `json:"saleCurrencyRate"`
|
||||
CreatedStaffId int64 `json:"createdStaffId"`
|
||||
}
|
||||
|
||||
// History @TITLE 历史记录
|
||||
func (s *sale) History(ctx context.Context, args ArgsSaleHistory) (reply ReplySaleHistory, err error) {
|
||||
xClient, err := client.GetClient(s)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "History", args, &reply)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user