diff --git a/erp/shipment/customs.go b/erp/shipment/customs.go index 6bd47a0..e1e4c24 100644 --- a/erp/shipment/customs.go +++ b/erp/shipment/customs.go @@ -77,8 +77,15 @@ func (c *customs) Info(ctx context.Context, customsId int64) (reply ReplyCustoms return } +type ReplyCustomsProductItem struct { + SaleProductItem + CustomsProductId int64 `json:"customsProductId"` + HsUnit string `json:"hsUnit"` + HsNum *int64 `json:"hsNum"` +} + // Products @TITLE 获取产品 -func (c *customs) Products(ctx context.Context, customsId int64) (reply []SaleProductItem, err error) { +func (c *customs) Products(ctx context.Context, customsId int64) (reply []ReplyCustomsProductItem, err error) { xClient, err := client.GetClient(c) if err != nil { return @@ -87,6 +94,27 @@ func (c *customs) Products(ctx context.Context, customsId int64) (reply []SalePr return } +type ArgsCustomsProductsEdit struct { + CustomsId int64 + Products []CustomsProduct +} +type CustomsProduct struct { + CustomsProductId int64 // 报关产品id + HsUnit string // 海关单位 + HsNum *int64 // 海关数量 +} + +// ProductsEdit @TITLE 产品编辑 +func (c *customs) ProductsEdit(ctx context.Context, args ArgsCustomsProductsEdit) (err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + reply := 0 + err = xClient.Call(ctx, "ProductsEdit", args, &reply) + return +} + // Gifts @TITLE 获取赠品 func (c *customs) Gifts(ctx context.Context, customsId int64) (reply []GiftItem, err error) { xClient, err := client.GetClient(c)