This commit is contained in:
守护自己的云 2024-09-10 17:07:31 +08:00
parent 94ca32e113
commit 3838a43615
3 changed files with 39 additions and 1 deletions

View File

@ -30,4 +30,5 @@ type ExportType = string // 导出类型
const (
ExportTypeSalePi = "salePi" // 销售pi导出
ExportTypeSaleBenefit = "saleBenefit" // 效益测算导出
)

View File

@ -50,6 +50,7 @@ type ProductItem struct {
Barcode string `json:"barcode"`
SellCountry string `json:"sellCountry"`
Info string `json:"info"`
QuotePrice *decimal.Decimal `json:"quotePrice"`
CreatedStaffId int64 `json:"createdStaffId"`
DepartmentId int64 `json:"departmentId"`
CreatedAt *time.Time `json:"createdAt"`

View File

@ -5,6 +5,7 @@ import (
"git.kumo.work/shama/service/client"
bean2 "git.kumo.work/shama/service/erp/bean"
product2 "git.kumo.work/shama/service/erp/product"
"git.kumo.work/shama/service/lib/bean"
"github.com/shopspring/decimal"
"time"
)
@ -12,6 +13,41 @@ import (
type product struct {
product2.Product
}
type ArgsProductList struct {
Page bean.Page
Search ProductSearch
}
type ProductSearch struct {
PiSerial string // PiSerial
PoSerial string // PoSerial
CustomSerial string // 客户货号
Serial string // 货号
CreatedStaffIds []int64 // 录入人
}
type ReplyProductList struct {
Total int64 `json:"total"`
List []ProductListItem `json:"list"`
}
type ProductListItem struct {
ProductItem
CreatedStaffId int64 `json:"createdStaffId"`
CreatedAt *time.Time `json:"createdAt"`
PiSerial string `json:"piSerial"`
PoSerial string `json:"poSerial"`
CustomShortName string `json:"customShortName"`
CustomName string `json:"customName"`
}
// List @TITLE 产品列表
func (p *product) List(ctx context.Context, args ArgsProductList) (reply ReplyProductList, err error) {
xClient, err := client.GetClient(p)
if err != nil {
return
}
err = xClient.Call(ctx, "List", args, &reply)
return
}
type ProductItem struct {
Id int64 `json:"id"`
Mold int64 `json:"mold"`