diff --git a/erp/purchase/product.go b/erp/purchase/product.go index 68e3e05..e0c4a1c 100644 --- a/erp/purchase/product.go +++ b/erp/purchase/product.go @@ -3,6 +3,7 @@ package purchase import ( "context" "git.kumo.work/shama/service/client" + "git.kumo.work/shama/service/lib/bean" "github.com/shopspring/decimal" ) @@ -94,3 +95,40 @@ func (p *product) Delete(ctx context.Context, purchaseProductIds []int64) (err e err = xClient.Call(ctx, "Delete", purchaseProductIds, &reply) return } + +type ArgsListAccounting struct { + Page bean.Page + Search ListAccountingSearch +} +type ListAccountingSearch struct { + CustomIds []int64 // 客户 + PiSerial string // PI + ProductSerial string // 货号 + ProductCustomSerial string // 客户货号 + PoSerial string // PO +} + +type ReplyListAccounting struct { + List []ListAccountingItem `json:"list"` + Total int64 `json:"total"` +} +type ListAccountingItem struct { + Id int64 `json:"id"` + PiSerial string `json:"piSerial"` + PoSerial string `json:"poSerial"` + FactoryName string `json:"factoryName"` + ProductSerial string `json:"productSerial"` + ProductCustomSerial string `json:"productCustomSerial"` + ProductName string `json:"productName"` + HasAccountingCount int64 `json:"hasAccountingCount"` +} + +// ListAccounting @TITLE 做账商品列表 +func (p *product) ListAccounting(ctx context.Context, args ArgsListAccounting) (reply ReplyListAccounting, err error) { + xClient, err := client.GetClient(p) + if err != nil { + return + } + err = xClient.Call(ctx, "ListAccounting", args, &reply) + return +} diff --git a/erp/sale/product.go b/erp/sale/product.go index 9c0b38c..e8f7845 100644 --- a/erp/sale/product.go +++ b/erp/sale/product.go @@ -73,7 +73,7 @@ type ProductListItem struct { SaleCreatedAt *time.Time `json:"saleCreatedAt"` PurchasedCount int64 `json:"purchasedCount"` ShipmentCount int64 `json:"shipmentCount"` - ShipmentdCount int64 `json:"shipmentdCount"` + ShippedCount int64 `json:"shippedCount"` } // List @TITLE 产品列表 @@ -122,7 +122,9 @@ type ProductItem struct { PurchaseCount int64 `json:"purchaseCount"` PurchasedCount int64 `json:"purchasedCount"` ShipmentCount int64 `json:"shipmentCount"` - ShipmentdCount int64 `json:"shipmentdCount"` + ShippedCount int64 `json:"shippedCount"` + AccountingCount int64 `json:"accountingCount"` + AccountedCount int64 `json:"accountedCount"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` Children []*ProductItem `json:"children"` @@ -256,6 +258,12 @@ type ReplyProductInfo struct { PackageDescription string `json:"packageDescription"` PackageEngDescription string `json:"packageEngDescription"` PackageInfoFile bean2.FileData `json:"packageInfoFile"` + PurchaseCount int64 `json:"purchaseCount"` + PurchasedCount int64 `json:"purchasedCount"` + ShipmentCount int64 `json:"shipmentCount"` + ShippedCount int64 `json:"shippedCount"` + AccountingCount int64 `json:"accountingCount"` + AccountedCount int64 `json:"accountedCount"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` Packages []ProductPackageInfo `json:"packages"`