From f762c25b7b9eb1177ca4929efa16adfc156a6f03 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 9 Jul 2025 16:03:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(purchase):=20=E5=A2=9E=E5=8A=A0=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E4=BA=A7=E5=93=81=E6=89=B9=E6=AC=A1=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 PurchaseProduct 结构中添加 Batch 字段,用于管理产品批次 - 新增 PurchaseProductBatch 结构,包含批次号和采购数量 -此改动有助于更细致地管理和追踪采购产品的批次信息 --- erp/purchase.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/erp/purchase.go b/erp/purchase.go index bb0898d..60a8286 100644 --- a/erp/purchase.go +++ b/erp/purchase.go @@ -71,15 +71,19 @@ type ArgsPurchaseAdd struct { Products []PurchaseProduct } type PurchaseProduct struct { - SaleProductId int64 // 销售合同产品id - FactoryId int64 // 采购工厂id - Num int64 // 采购数量 - Price decimal.Decimal // 采购单价 - Currency string // 币种 - CurrencyName string // 币种名称 - CurrencySymbol string // 币种符号 - CurrencyRate decimal.Decimal // 币种汇率 - MeasureUnit string // 数量单位 + SaleProductId int64 // 销售合同产品id + FactoryId int64 // 采购工厂id + Price decimal.Decimal // 采购单价 + Currency string // 币种 + CurrencyName string // 币种名称 + CurrencySymbol string // 币种符号 + CurrencyRate decimal.Decimal // 币种汇率 + MeasureUnit string // 数量单位 + Batch []PurchaseProductBatch // 产品批次 +} +type PurchaseProductBatch struct { + BatchNo int64 `binding:"required" label:"批次号"` + Num int64 // 采购数量 } // Add @TITLE 添加采购合同