From ced2bc460a2cf4a570f8114652538bda5e20e3f9 Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 11 Jul 2025 16:22:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(purchase):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E5=B7=A5=E5=8E=82=E6=8E=A5=E5=8F=A3=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除旧的 FactoryId 和 PurchaseProductIds 字段 - 新增 PurchaseId、FactoryId 和 Products 字段- 新增 ProductChangeFactoryProductItem 和 BatchItem 结构体 --- erp/purchase/product.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/erp/purchase/product.go b/erp/purchase/product.go index ad216fb..0570b22 100644 --- a/erp/purchase/product.go +++ b/erp/purchase/product.go @@ -71,8 +71,18 @@ func (p *product) Edit(ctx context.Context, args ArgsProductEdit) (err error) { } type ArgsProductChangeFactory struct { - FactoryId int64 // 工厂id - PurchaseProductIds []int64 // 采购商品id + PurchaseId int64 // 采购合同id + FactoryId int64 // 工厂id + Products []ProductChangeFactoryProductItem // 采购商品id +} + +type ProductChangeFactoryProductItem struct { + PurchaseProductId int64 // 采购产品id + Batches []BatchItem // 产品批次 +} +type BatchItem struct { + BatchNo int64 // 批次号 + PurchaseCount int64 // 采购数量 } // ChangeFactory @TITLE 更换工厂