This commit is contained in:
守护自己的云 2024-09-30 14:41:27 +08:00
parent 9502903793
commit 64ea8da4fe
2 changed files with 48 additions and 2 deletions

View File

@ -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
}

View File

@ -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"`